summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-07 21:57:43 -0700
committerKeith Packard <keithp@keithp.com>2014-06-07 22:30:26 -0700
commitef85b3bc5300904ebfb878b1c7313a82b5b7aebf (patch)
tree610f22f70caea98d5c62ed060a5a4b193fdffcd9 /src
parentd69547796caf74405f8304d23d4ae318315bbd7b (diff)
altos: Encode TeleGPS battery voltage in configuration packet
TeleGPS doesn't need apogee delay, so re-purpose it for the battery voltage Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/kernel/ao_telemetry.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/ao_telemetry.c b/src/kernel/ao_telemetry.c
index 2292d229..dcda0dd7 100644
--- a/src/kernel/ao_telemetry.c
+++ b/src/kernel/ao_telemetry.c
@@ -305,8 +305,14 @@ ao_send_configuration(void)
#endif
telemetry.configuration.config_major = AO_CONFIG_MAJOR;
telemetry.configuration.config_minor = AO_CONFIG_MINOR;
+#if AO_idProduct_NUMBER == 0x25 && HAS_ADC
+ /* TeleGPS gets battery voltage instead of apogee delay */
+ telemetry.configuration.apogee_delay = ao_data_ring[ao_data_ring_prev(ao_data_head)].adc.v_batt;
+#else
telemetry.configuration.apogee_delay = ao_config.apogee_delay;
telemetry.configuration.main_deploy = ao_config.main_deploy;
+#endif
+
telemetry.configuration.flight_log_max = ao_config.flight_log_max >> 10;
ao_xmemcpy (telemetry.configuration.callsign,
ao_config.callsign,