diff options
| author | Keith Packard <keithp@keithp.com> | 2011-08-01 22:44:13 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2011-08-27 12:12:41 -0700 | 
| commit | b10fbbf0830053a39e4640a53598b1c027615c63 (patch) | |
| tree | 6e43d1b214a74f525ef8f4bd4ddfc484d8463614 /src/core/ao.h | |
| parent | 1c46c419704f661064d200432eb7efeeb11b3859 (diff) | |
altos: Add 'send all baro' compile-time option
This option creates a new packet type that delivers full sensor-rate
barometer telemetry data to allow for off-line analysis of flight
algorithms using all of the data, rather than the slower rate provided
either over telemetry or stored in the eeprom file.
Define AO_SEND_ALL_BARO and this will get built in. Perhaps this could
be a run-time option...
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/core/ao.h')
| -rw-r--r-- | src/core/ao.h | 31 | 
1 files changed, 31 insertions, 0 deletions
| diff --git a/src/core/ao.h b/src/core/ao.h index c926c001..0cff0436 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -1118,6 +1118,30 @@ struct ao_telemetry_companion {  	/* 32 */  }; +/* #define AO_SEND_ALL_BARO */ + +#define AO_TELEMETRY_BARO		0x80 + +/* + * This packet allows the full sampling rate baro + * data to be captured over the RF link so that the + * flight software can be tested using 'real' data. + * + * Along with this telemetry packet, the flight + * code is modified to send full-rate telemetry all the time + * and never send an RDF tone; this ensure that the full radio + * link is available. + */ +struct ao_telemetry_baro { +	uint16_t				serial;		/*  0 */ +	uint16_t				tick;		/*  2 */ +	uint8_t					type;		/*  4 */ +	uint8_t					samples;	/*  5 number samples */ + +	int16_t					baro[12];	/* 6 samples */ +	/* 32 */ +}; +  union ao_telemetry_all {  	struct ao_telemetry_generic		generic;  	struct ao_telemetry_sensor		sensor; @@ -1125,6 +1149,7 @@ union ao_telemetry_all {  	struct ao_telemetry_location		location;  	struct ao_telemetry_satellite		satellite;  	struct ao_telemetry_companion		companion; +	struct ao_telemetry_baro		baro;  };  /* @@ -1258,9 +1283,15 @@ struct ao_telemetry_raw_recv {  /* Set delay between telemetry reports (0 to disable) */ +#ifdef AO_SEND_ALL_BARO +#define AO_TELEMETRY_INTERVAL_PAD	AO_MS_TO_TICKS(100) +#define AO_TELEMETRY_INTERVAL_FLIGHT	AO_MS_TO_TICKS(100) +#define AO_TELEMETRY_INTERVAL_RECOVER	AO_MS_TO_TICKS(100) +#else  #define AO_TELEMETRY_INTERVAL_PAD	AO_MS_TO_TICKS(1000)  #define AO_TELEMETRY_INTERVAL_FLIGHT	AO_MS_TO_TICKS(100)  #define AO_TELEMETRY_INTERVAL_RECOVER	AO_MS_TO_TICKS(1000) +#endif  void  ao_telemetry_set_interval(uint16_t interval); | 
