Decrease telemetry rate on the pad to 1/sec instead of 20/sec
authorKeith Packard <keithp@keithp.com>
Mon, 11 May 2009 05:58:31 +0000 (22:58 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 11 May 2009 05:58:31 +0000 (22:58 -0700)
Transmitting telemetry through the radio consumes a significant amount of
battery; reducing the rate to 1/sec will reduce power usage while waiting
for launch.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao.h
ao_flight.c

diff --git a/ao.h b/ao.h
index 4505edf..fb06df0 100644 (file)
--- a/ao.h
+++ b/ao.h
@@ -727,6 +727,7 @@ struct ao_telemetry {
 
 /* Set delay between telemetry reports (0 to disable) */
 
+#define AO_TELEMETRY_INTERVAL_PAD      AO_MS_TO_TICKS(1000)
 #define AO_TELEMETRY_INTERVAL_FLIGHT   AO_MS_TO_TICKS(50)
 #define AO_TELEMETRY_INTERVAL_RECOVER  AO_MS_TO_TICKS(1000)
 
index 43fd98b..f4b5279 100644 (file)
@@ -223,7 +223,7 @@ ao_flight(void)
                                /* Turn on telemetry system
                                 */
                                ao_rdf_set(1);
-                               ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT);
+                               ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_PAD);
 
                                ao_flight_state = ao_flight_launchpad;
                                ao_wakeup(DATA_TO_XDATA(&ao_flight_state));
@@ -259,6 +259,9 @@ ao_flight(void)
                                /* start logging data */
                                ao_log_start();
 
+                               /* Increase telemetry rate */
+                               ao_telemetry_set_interval(AO_TELEMETRY_INTERVAL_FLIGHT);
+
                                /* disable RDF beacon */
                                ao_rdf_set(0);