paparazzi-commits
[Top][All Lists]
Advanced

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

[paparazzi-commits] [4092] add a telemetry startup delay


From: Felix Ruess
Subject: [paparazzi-commits] [4092] add a telemetry startup delay
Date: Mon, 07 Sep 2009 15:06:14 +0000

Revision: 4092
          http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=4092
Author:   flixr
Date:     2009-09-07 15:06:14 +0000 (Mon, 07 Sep 2009)
Log Message:
-----------
add a telemetry startup delay

Modified Paths:
--------------
    paparazzi3/trunk/conf/airframes/booz2_flixr.xml
    paparazzi3/trunk/sw/airborne/booz/booz2_main.c
    paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h

Modified: paparazzi3/trunk/conf/airframes/booz2_flixr.xml
===================================================================
--- paparazzi3/trunk/conf/airframes/booz2_flixr.xml     2009-09-07 14:54:03 UTC 
(rev 4091)
+++ paparazzi3/trunk/conf/airframes/booz2_flixr.xml     2009-09-07 15:06:14 UTC 
(rev 4092)
@@ -207,6 +207,7 @@
                #set GPS lag for horizontal filter
                ap.CFLAGS += -DGPS_LAG=0.8 -DUSE_GPS_ACC4R
 
+        ap.CFLAGS += -DTELEMETRY_STARTUP_DELAY=3
   </makefile>
 
 </airframe>

Modified: paparazzi3/trunk/sw/airborne/booz/booz2_main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_main.c      2009-09-07 14:54:03 UTC 
(rev 4091)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_main.c      2009-09-07 15:06:14 UTC 
(rev 4092)
@@ -119,28 +119,29 @@
   booz2_autopilot_periodic();
   /* 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_set_mode(BOOZ2_AP_MODE_FAILSAFE);               \
-    },                                                                 \
-    {                                                                  \
-      Booz2TelemetryPeriodic();                                                
\
-    },                                                                 \
-    {                                                                  \
-      booz_fms_periodic();                                             \
-    },                                                                 \
-    {                                                                  \
-      /*BoozControlSurfacesSetFromCommands();*/                                
\
-    },                                                                 \
-    {},                                                                        
\
-    {},                                                                        
\
-    {},                                                                        
\
-    {},                                                                        
\
-    {},                                                                        
\
-    {}                                                                 \
-    );                                                                 \
+      if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode != 
BOOZ2_AP_MODE_KILL) \
+        booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE);\
+    },                \
+    {                                                                   \
+      if (cpu_time_sec > TELEMETRY_STARTUP_DELAY)                       \
+        Booz2TelemetryPeriodic();                                       \
+    },                                                                  \
+    {                                                                   \
+      booz_fms_periodic();                                              \
+    },                                                                  \
+    {                                                                   \
+      /*BoozControlSurfacesSetFromCommands();*/                         \
+    },                                                                  \
+    {},                                                                 \
+    {},                                                                 \
+    {},                                                                 \
+    {},                                                                 \
+    {},                                                                 \
+    {}                                                                  \
+                                                    );                  \
 
   //  t1 = T0TC;
   //  diff = t1 - t0;

Modified: paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h 2009-09-07 14:54:03 UTC 
(rev 4091)
+++ paparazzi3/trunk/sw/airborne/booz/booz2_telemetry.h 2009-09-07 15:06:14 UTC 
(rev 4092)
@@ -36,6 +36,10 @@
 
 #include "actuators.h"
 
+#ifndef TELEMETRY_STARTUP_DELAY
+#define TELEMETRY_STARTUP_DELAY 0
+#endif
+
 #define PERIODIC_SEND_ALIVE(_chan) DOWNLINK_SEND_ALIVE(_chan, 16, MD5SUM)
 
 #include "booz2_battery.h"





reply via email to

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