paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [4355] conditioned gps timeout mecanism with USE_GPS


From: antoine drouin
Subject: [paparazzi-commits] [4355] conditioned gps timeout mecanism with USE_GPS
Date: Fri, 27 Nov 2009 14:44:00 +0000

Revision: 4355
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4355
Author:   poine
Date:     2009-11-27 14:43:59 +0000 (Fri, 27 Nov 2009)
Log Message:
-----------
conditioned gps timeout mecanism with USE_GPS

Modified Paths:
--------------
    paparazzi3/trunk/sw/airborne/booz/booz2_main.c

Modified: paparazzi3/trunk/sw/airborne/booz/booz2_main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_main.c      2009-11-27 13:42:48 UTC 
(rev 4354)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_main.c      2009-11-27 14:43:59 UTC 
(rev 4355)
@@ -170,32 +170,34 @@
   /* set actuators     */
   actuators_set(booz2_autopilot_motors_on);
 
-  PeriodicPrescaleBy10(                             \
-    {                                               \
+  PeriodicPrescaleBy10(                                                        
\
+    {                                                                  \
       radio_control_periodic();                                                
\
-      if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode != 
BOOZ2_AP_MODE_KILL && booz2_autopilot_mode != BOOZ2_AP_MODE_NAV)\
-       booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE);               \
-    },                                                                 \
+                        if (radio_control.status != RADIO_CONTROL_OK && 
booz2_autopilot_mode != BOOZ2_AP_MODE_KILL && booz2_autopilot_mode != 
BOOZ2_AP_MODE_NAV) \
+                          booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
+                      },                                               \
     {                                                                  \
-      Booz2TelemetryPeriodic();         \
+      Booz2TelemetryPeriodic();                                                
\
     },                                                                 \
     {                                                                  \
-      booz_fms_periodic();              \
+      booz_fms_periodic();                                             \
     },                                                                 \
     {                                                                  \
       /*BoozControlSurfacesSetFromCommands();*/                                
\
     },                                                                 \
-    { if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode == 
BOOZ2_AP_MODE_NAV && GpsIsLost())    \
-       booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE);               \
-    },                                                                  \
     {},                                                                        
\
     {},                                                                        
\
     {},                                                                        
\
     {},                                                                        
\
+    {},                                                                        
\
     {}                                                                 \
     );                                                                 \
 
+#ifdef USE_GPS
+      if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode == 
BOOZ2_AP_MODE_NAV && GpsIsLost())        \
+       booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE);               \
   booz_gps_periodic();
+#endif
 
 #ifdef USE_CAM
   RunOnceEvery(50,booz2_cam_periodic());





reply via email to

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