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
|
#set GPS lag for horizontal filter
|
||||||
ap.CFLAGS += -DGPS_LAG=0.8 -DUSE_GPS_ACC4R
|
ap.CFLAGS += -DGPS_LAG=0.8 -DUSE_GPS_ACC4R
|
||||||
|
|
||||||
|
ap.CFLAGS += -DTELEMETRY_STARTUP_DELAY=3
|
||||||
</makefile>
|
</makefile>
|
||||||
|
|
||||||
</airframe>
|
</airframe>
|
||||||
|
|||||||
@@ -119,28 +119,29 @@ STATIC_INLINE void booz2_main_periodic( void ) {
|
|||||||
booz2_autopilot_periodic();
|
booz2_autopilot_periodic();
|
||||||
/* set actuators */
|
/* set actuators */
|
||||||
actuators_set(booz2_autopilot_motors_on);
|
actuators_set(booz2_autopilot_motors_on);
|
||||||
PeriodicPrescaleBy10( \
|
PeriodicPrescaleBy10( \
|
||||||
{ \
|
{ \
|
||||||
radio_control_periodic(); \
|
radio_control_periodic(); \
|
||||||
if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode != BOOZ2_AP_MODE_KILL)\
|
if (radio_control.status != RADIO_CONTROL_OK && booz2_autopilot_mode != BOOZ2_AP_MODE_KILL) \
|
||||||
booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE); \
|
booz2_autopilot_set_mode(BOOZ2_AP_MODE_FAILSAFE);\
|
||||||
}, \
|
}, \
|
||||||
{ \
|
{ \
|
||||||
Booz2TelemetryPeriodic(); \
|
if (cpu_time_sec > TELEMETRY_STARTUP_DELAY) \
|
||||||
}, \
|
Booz2TelemetryPeriodic(); \
|
||||||
{ \
|
}, \
|
||||||
booz_fms_periodic(); \
|
{ \
|
||||||
}, \
|
booz_fms_periodic(); \
|
||||||
{ \
|
}, \
|
||||||
/*BoozControlSurfacesSetFromCommands();*/ \
|
{ \
|
||||||
}, \
|
/*BoozControlSurfacesSetFromCommands();*/ \
|
||||||
{}, \
|
}, \
|
||||||
{}, \
|
{}, \
|
||||||
{}, \
|
{}, \
|
||||||
{}, \
|
{}, \
|
||||||
{}, \
|
{}, \
|
||||||
{} \
|
{}, \
|
||||||
); \
|
{} \
|
||||||
|
); \
|
||||||
|
|
||||||
// t1 = T0TC;
|
// t1 = T0TC;
|
||||||
// diff = t1 - t0;
|
// diff = t1 - t0;
|
||||||
|
|||||||
@@ -36,6 +36,10 @@
|
|||||||
|
|
||||||
#include "actuators.h"
|
#include "actuators.h"
|
||||||
|
|
||||||
|
#ifndef TELEMETRY_STARTUP_DELAY
|
||||||
|
#define TELEMETRY_STARTUP_DELAY 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#define PERIODIC_SEND_ALIVE(_chan) DOWNLINK_SEND_ALIVE(_chan, 16, MD5SUM)
|
#define PERIODIC_SEND_ALIVE(_chan) DOWNLINK_SEND_ALIVE(_chan, 16, MD5SUM)
|
||||||
|
|
||||||
#include "booz2_battery.h"
|
#include "booz2_battery.h"
|
||||||
|
|||||||
Reference in New Issue
Block a user