altos: Adapt to changes in telemetry Configuration packet
authorKeith Packard <keithp@keithp.com>
Wed, 6 Jul 2011 04:44:53 +0000 (21:44 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 6 Jul 2011 04:44:53 +0000 (21:44 -0700)
Apogee delay added. flight_log_max changed to two bytes (in kB now).

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

index 08f45275fd4e51e34d3b92a2f738ea786d587782..9a986479154b83d666cc59a887faa9f05d1e5aec 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -1018,8 +1018,9 @@ struct ao_telemetry_configuration {
        uint16_t        flight;                         /*  6 flight number */
        uint8_t         config_major;                   /*  8 Config major version */
        uint8_t         config_minor;                   /*  9 Config minor version */
-       uint16_t        main_deploy;                    /* 10 Main deploy alt in meters */
-       uint32_t        flight_log_max;                 /* 12 Maximum flight log size in bytes */
+       uint16_t        apogee_delay;                   /* 10 Apogee deploy delay in seconds */
+       uint16_t        main_deploy;                    /* 12 Main deploy alt in meters */
+       uint16_t        flight_log_max;                 /* 14 Maximum flight log size in kB */
        char            callsign[AO_MAX_CALLSIGN];      /* 16 Radio operator identity */
        char            version[AO_MAX_VERSION];        /* 24 Software version */
        /* 32 */
index 94ea0b2235bcffbc8acf79835d60d5112a2c3e63..f45d2ab41b5cd592b72b95e15635c90773193dd0 100644 (file)
@@ -94,8 +94,9 @@ ao_send_configuration(void)
                telemetry.configuration.flight = 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;
                telemetry.configuration.main_deploy = ao_config.main_deploy;
-               telemetry.configuration.flight_log_max = ao_config.flight_log_max;
+               telemetry.configuration.flight_log_max = ao_config.flight_log_max >> 10;
                memcpy (telemetry.configuration.callsign,
                        ao_config.callsign,
                        AO_MAX_CALLSIGN);