diff options
| author | Keith Packard <keithp@keithp.com> | 2011-07-05 21:44:53 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-07-05 21:44:53 -0700 | 
| commit | edf6252450e06fd42fa6dde3acd127baa8fa6d36 (patch) | |
| tree | 653c09f8a0b06bdf823e6ac7535b298e0023e310 /src | |
| parent | 938949e39aac834a1c0912f8f307f74fe41418cc (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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/ao.h | 5 | ||||
| -rw-r--r-- | src/ao_telemetry.c | 3 | 
2 files changed, 5 insertions, 3 deletions
@@ -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);  | 
