summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-07-05 21:44:53 -0700
committerKeith Packard <keithp@keithp.com>2011-07-05 21:44:53 -0700
commitedf6252450e06fd42fa6dde3acd127baa8fa6d36 (patch)
tree653c09f8a0b06bdf823e6ac7535b298e0023e310
parent938949e39aac834a1c0912f8f307f74fe41418cc (diff)
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 <keithp@keithp.com>
-rw-r--r--src/ao.h5
-rw-r--r--src/ao_telemetry.c3
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);