mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-05 23:49:00 +08:00
add a telemetry startup delay
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -119,28 +119,29 @@ STATIC_INLINE void booz2_main_periodic( void ) {
|
||||
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;
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user