X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_flight.c;h=240b348a999e7207963d7274d38a01d0719490a7;hb=d96fd33aa8a220d547512eb43c88fc8f5651e39e;hp=1322195beb2ca4d0e1cb5ddab0c99580e7f2abe5;hpb=4ff54bb96f6c00c0c2c7dd32f81403bac331621a;p=fw%2Faltos diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 1322195b..240b348a 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -20,6 +20,10 @@ #include #endif +#if HAS_MPU6000 +#include +#endif + #ifndef HAS_ACCEL #error Please define HAS_ACCEL #endif @@ -134,8 +138,10 @@ ao_flight(void) ao_rdf_set(1); ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD); #endif +#if HAS_LED /* signal successful initialization by turning off the LED */ ao_led_off(AO_LED_RED); +#endif } else { /* Set idle mode */ ao_flight_state = ao_flight_idle; @@ -145,8 +151,10 @@ ao_flight(void) ao_packet_slave_start(); #endif +#if HAS_LED /* signal successful initialization by turning off the LED */ ao_led_off(AO_LED_RED); +#endif } /* wakeup threads due to state change */ ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); @@ -190,8 +198,8 @@ ao_flight(void) #if HAS_GPS /* Record current GPS position by waking up GPS log tasks */ - ao_wakeup(&ao_gps_data); - ao_wakeup(&ao_gps_tracking_data); + ao_gps_new = AO_GPS_NEW_DATA | AO_GPS_NEW_TRACKING; + ao_wakeup(&ao_gps_new); #endif ao_wakeup(DATA_TO_XDATA(&ao_flight_state));