altos: Lost change that reported flight 0 when log memory was full
authorKeith Packard <keithp@keithp.com>
Mon, 15 Aug 2011 02:19:50 +0000 (19:19 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 15 Aug 2011 02:19:50 +0000 (19:19 -0700)
commit 52ac83fedbfd380d14d4df2e79992bbdfba3552a added coded to check
for a full flight log and complain with a special tone.

It also reported flight 0 over telemetry, and that part of the patch
got lost when moving to the new telemetry format. This patch
resurrects that piece.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/ao_telemetry.c

index 15ba430..8a18ba0 100644 (file)
@@ -101,7 +101,7 @@ ao_send_configuration(void)
        {
                telemetry.generic.type = AO_TELEMETRY_CONFIGURATION;
                telemetry.configuration.device = AO_idProduct_NUMBER;
-               telemetry.configuration.flight = ao_flight_number;
+               telemetry.configuration.flight = ao_log_full() ? 0 : ao_flight_number;
                telemetry.configuration.config_major = AO_CONFIG_MAJOR;
                telemetry.configuration.config_minor = AO_CONFIG_MINOR;
                telemetry.configuration.apogee_delay = ao_config.apogee_delay;