X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fao_flight.c;h=c43d0711d571b2d79a3ff41e874b066250ca5c2b;hb=251b0971f049cbf2f8db79a32729d47441ce65f3;hp=6de6e7cc324620c0f6b82c3ae317d61d5f6ceb45;hpb=5834a12c1d3d71105c9e3d1ceaf9f3ffac9ff1eb;p=fw%2Faltos diff --git a/src/ao_flight.c b/src/ao_flight.c index 6de6e7cc..c43d0711 100644 --- a/src/ao_flight.c +++ b/src/ao_flight.c @@ -227,6 +227,7 @@ ao_flight(void) /* Turn on telemetry system */ + ao_rdf_set(1); ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD); ao_flight_state = ao_flight_pad; @@ -277,6 +278,9 @@ ao_flight(void) /* Increase telemetry rate */ ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT); + /* disable RDF beacon */ + ao_rdf_set(0); + ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); break; } @@ -325,13 +329,13 @@ ao_flight(void) * apogee detect */ ao_min_vel = abs(ao_flight_vel); - ao_flight_state = ao_flight_apogee; + ao_flight_state = ao_flight_coast; ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); } break; - case ao_flight_apogee: + case ao_flight_coast: - /* apogee detect to drogue deploy: + /* apogee detect: coast to drogue deploy: * * accelerometer: abs(velocity) > min_velocity + 2m/s * OR @@ -438,6 +442,8 @@ ao_flight(void) /* turn off the ADC capture */ ao_timer_set_adc_interval(0); + /* Enable RDF beacon */ + ao_rdf_set(1); ao_wakeup(DATA_TO_XDATA(&ao_flight_state)); } @@ -452,7 +458,7 @@ ao_flight(void) #define AO_VEL_COUNT_TO_MS(count) ((int16_t) ((count) / 2700)) static void -ao_flight_status(void) +ao_flight_status(void) __reentrant { printf("STATE: %7s accel: %d speed: %d altitude: %d main: %d\n", ao_state_names[ao_flight_state],