summaryrefslogtreecommitdiff
path: root/src/ao.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-03-19 23:46:18 -0700
committerKeith Packard <keithp@keithp.com>2011-03-19 23:46:18 -0700
commit8950df02382f5f0aea5bac078fdf7134b98c43ed (patch)
treee7b9f7b9f5153ef977b8c69e8dfe0b4a1ccc5fe1 /src/ao.h
parent5ba75e95c98d3e441a58d6f75d328d579e1997fe (diff)
altos: Split out tiny telemetry from full telemetry
The TeleMini and TeleNano boards do not have either GPS or accelermeters, and they also run the kalman filter which produces standard unit measurements for the flight height/speed/accel values. This makes the telemetry significantly different. ao_telemetry_tiny.c sends the required data. Note that TeleNano sends the same telemetry as telemini at this point; there are a couple of values which are not useful, but the overhead of sending them is small enough that the hassle of having three telemetry formats seemed excessive. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao.h')
-rw-r--r--src/ao.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ao.h b/src/ao.h
index 075ec63a..0ba98dbd 100644
--- a/src/ao.h
+++ b/src/ao.h
@@ -925,6 +925,18 @@ struct ao_telemetry {
struct ao_gps_tracking_data gps_tracking;
};
+struct ao_telemetry_tiny {
+ uint16_t serial;
+ uint16_t flight;
+ uint8_t flight_state;
+ int16_t height; /* AGL in meters */
+ int16_t speed; /* in m/s * 16 */
+ int16_t accel; /* in m/s² * 16 */
+ int16_t ground_pres; /* sensor units */
+ struct ao_adc adc; /* raw ADC readings */
+ char callsign[AO_MAX_CALLSIGN];
+};
+
/*
* ao_radio_recv tacks on rssi and status bytes
*/
@@ -934,6 +946,12 @@ struct ao_telemetry_recv {
uint8_t status;
};
+struct ao_telemetry_tiny_recv {
+ struct ao_telemetry_tiny telemetry_tiny;
+ int8_t rssi;
+ uint8_t status;
+};
+
/* Set delay between telemetry reports (0 to disable) */
#define AO_TELEMETRY_INTERVAL_PAD AO_MS_TO_TICKS(1000)
@@ -949,6 +967,9 @@ ao_rdf_set(uint8_t rdf);
void
ao_telemetry_init(void);
+void
+ao_telemetry_tiny_init(void);
+
/*
* ao_radio.c
*/