From edf6252450e06fd42fa6dde3acd127baa8fa6d36 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 5 Jul 2011 21:44:53 -0700 Subject: [PATCH 1/1] altos: Adapt to changes in telemetry Configuration packet Apogee delay added. flight_log_max changed to two bytes (in kB now). Signed-off-by: Keith Packard --- src/ao.h | 5 +++-- src/ao_telemetry.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ao.h b/src/ao.h index 08f45275..9a986479 100644 --- 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 */ diff --git a/src/ao_telemetry.c b/src/ao_telemetry.c index 94ea0b22..f45d2ab4 100644 --- a/src/ao_telemetry.c +++ b/src/ao_telemetry.c @@ -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); -- 2.30.2