paparazzi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paparazzi-commits] [4979] LINE_START/STOP_FUNCTION for mission task tri


From: Christophe De Wagter
Subject: [paparazzi-commits] [4979] LINE_START/STOP_FUNCTION for mission task triggering
Date: Fri, 18 Jun 2010 07:29:13 +0000

Revision: 4979
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4979
Author:   dewagter
Date:     2010-06-18 07:29:13 +0000 (Fri, 18 Jun 2010)
Log Message:
-----------
LINE_START/STOP_FUNCTION for mission task triggering

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/nav.c
    paparazzi3/trunk/sw/airborne/nav_survey_rectangle.c

Modified: paparazzi3/trunk/sw/airborne/nav.c
===================================================================
--- paparazzi3/trunk/sw/airborne/nav.c  2010-06-18 00:26:15 UTC (rev 4978)
+++ paparazzi3/trunk/sw/airborne/nav.c  2010-06-18 07:29:13 UTC (rev 4979)
@@ -260,6 +260,16 @@
 
 #include "flight_plan.h"
 
+
+#ifndef LINE_START_FUNCTION
+#define LINE_START_FUNCTION {}
+#endif
+#ifndef LINE_STOP_FUNCTION
+#define LINE_STOP_FUNCTION {}
+#endif
+
+
+
 static inline void nav_follow(uint8_t _ac_id, float _distance, float _height) 
{ 
   struct ac_info_ * ac = get_ac_info(_ac_id);
   NavVerticalAutoThrottleMode(0.);
@@ -625,6 +635,7 @@
     if (NavQdrCloseTo(DegOfRad(qdr_out_1)-qdr_anticipation)) {
       oval_status = OR12;
       InitStage();
+      LINE_START_FUNCTION;
     }
     return;
 
@@ -634,6 +645,7 @@
       oval_status = OC2;
       nav_oval_count++;
       InitStage();
+      LINE_STOP_FUNCTION;
     }
     return;
 
@@ -642,6 +654,7 @@
     if (NavQdrCloseTo(DegOfRad(qdr_out_2)-qdr_anticipation)) {
       oval_status = OR21;
       InitStage();
+      LINE_START_FUNCTION;
     }
    return;
 
@@ -650,6 +663,7 @@
     if (nav_approaching_xy(waypoints[p1].x, waypoints[p1].y, waypoints[p2].x, 
waypoints[p2].y, CARROT)) { 
       oval_status = OC1;
       InitStage();
+      LINE_STOP_FUNCTION;
     }
     return;
 

Modified: paparazzi3/trunk/sw/airborne/nav_survey_rectangle.c
===================================================================
--- paparazzi3/trunk/sw/airborne/nav_survey_rectangle.c 2010-06-18 00:26:15 UTC 
(rev 4978)
+++ paparazzi3/trunk/sw/airborne/nav_survey_rectangle.c 2010-06-18 07:29:13 UTC 
(rev 4979)
@@ -11,7 +11,16 @@
 #define SurveyGoingEast() ((survey_orientation == WE) && (survey_to.x > 
survey_from.x))
 #define SurveyGoingWest() ((survey_orientation == WE) && (survey_to.x < 
survey_from.x))
 
+#include "flight_plan.h"
 
+#ifndef LINE_START_FUNCTION
+#define LINE_START_FUNCTION {}
+#endif
+#ifndef LINE_STOP_FUNCTION
+#define LINE_STOP_FUNCTION {}
+#endif
+
+
 void nav_survey_rectangle_init(uint8_t wp1, uint8_t wp2, float grid, 
survey_orientation_t so) {
   nav_survey_west = Min(waypoints[wp1].x, waypoints[wp2].x);
   nav_survey_east = Max(waypoints[wp1].x, waypoints[wp2].x);
@@ -40,6 +49,7 @@
   }
   nav_survey_shift = grid;
   survey_uturn = FALSE;
+  LINE_START_FUNCTION;
 }
 
 
@@ -131,6 +141,7 @@
 
       nav_in_segment = FALSE;
       survey_uturn = TRUE;
+      LINE_STOP_FUNCTION;
     }
   } else { /* U-turn */
     if ((SurveyGoingNorth() && NavCourseCloseTo(0)) ||
@@ -140,6 +151,7 @@
       /* U-turn finished, back on a segment */
       survey_uturn = FALSE;
       nav_in_circle = FALSE;
+      LINE_START_FUNCTION;
     } else {
       NavCircleWaypoint(0, survey_radius);
     }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]