} else {
ao_flight_state = ao_flight_idle;
- /* Turn on the Green LED in idle mode
+ /* Turn on packet system in idle mode
*/
- ao_led_on(AO_LED_GREEN);
+ ao_packet_slave_start();
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}
/* signal successful initialization by turning off the LED */
/* slow down the ADC sample rate */
ao_timer_set_adc_interval(10);
- /* Enable RDF beacon */
- ao_rdf_set(1);
-
/*
* Start recording min/max accel and pres for a while
* to figure out when the rocket has landed
/* 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));
}
#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],