summaryrefslogtreecommitdiff
path: root/ao_flight_test.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-04-25 14:44:33 -0700
committerKeith Packard <keithp@keithp.com>2009-04-25 14:44:33 -0700
commitc65f1a1acd2ca00758833cec5d3f8056d303d3e2 (patch)
tree77478e04d968fa775b3c5ab78ff5e1e27fa6991d /ao_flight_test.c
parent8e7b48b5f090be81980ab00fbce814ae1cc253e4 (diff)
Allow for slower ADC operation. Add power saving code.
This tries to make the flight computer use less power by disabling USB in flight mode, lowering the telemetry rate after ascent. It also disables the RDF beacon during ascent and re-enables it once descent has started.
Diffstat (limited to 'ao_flight_test.c')
-rw-r--r--ao_flight_test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ao_flight_test.c b/ao_flight_test.c
index 2cd7c81e..0b18969e 100644
--- a/ao_flight_test.c
+++ b/ao_flight_test.c
@@ -63,6 +63,9 @@ uint8_t ao_adc_head;
#define ao_timer_set_adc_interval(i)
#define ao_wakeup(wchan) ao_dump_state()
#define ao_cmd_register(c)
+#define ao_usb_disable()
+#define ao_telemetry_set_interval(x)
+#define ao_rdf_set(rdf)
enum ao_igniter {
ao_igniter_drogue = 0,
@@ -201,7 +204,7 @@ ao_dump_state(void)
{
if (ao_flight_state == ao_flight_startup)
return;
- printf ("\t%s accel %g vel %g alt %d\n",
+ printf ("\t\t\t\t\t%s accel %g vel %g alt %d\n",
ao_state_names[ao_flight_state],
(ao_flight_accel - ao_ground_accel) / COUNTS_PER_G * GRAVITY,
(double) ao_flight_vel / 100 / COUNTS_PER_G * GRAVITY,