projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enable packet-based communcation to command processor
[fw/altos]
/
src
/
ao_flight.c
diff --git
a/src/ao_flight.c
b/src/ao_flight.c
index be9b3bb6f4cfdbf4e55a9681dac98bbec304b471..e91a5daa74c97cc77f03b6d3030657c6f061a45e 100644
(file)
--- a/
src/ao_flight.c
+++ b/
src/ao_flight.c
@@
-227,6
+227,7
@@
ao_flight(void)
/* Turn on telemetry system
*/
/* Turn on telemetry system
*/
+ ao_rdf_set(1);
ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
ao_flight_state = ao_flight_pad;
ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
ao_flight_state = ao_flight_pad;
@@
-234,9
+235,9
@@
ao_flight(void)
} else {
ao_flight_state = ao_flight_idle;
} 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 */
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
}
/* signal successful initialization by turning off the LED */
@@
-277,6
+278,9
@@
ao_flight(void)
/* Increase telemetry rate */
ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT);
/* 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;
}
ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
break;
}
@@
-438,6
+442,8
@@
ao_flight(void)
/* turn off the ADC capture */
ao_timer_set_adc_interval(0);
/* 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));
}
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
#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],
{
printf("STATE: %7s accel: %d speed: %d altitude: %d main: %d\n",
ao_state_names[ao_flight_state],