#define AO_GPS_VALID (1 << 4)
#define AO_GPS_RUNNING (1 << 5)
#define AO_GPS_DATE_VALID (1 << 6)
+#define AO_GPS_COURSE_VALID (1 << 7)
extern __xdata uint16_t ao_gps_tick;
* ao_telemetry.c
*/
-#define AO_MAX_CALLSIGN 8
-#define AO_TELEMETRY_VERSION 3
+#define AO_MAX_CALLSIGN 8
struct ao_telemetry {
uint16_t serial;
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
*/
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)
-#define AO_TELEMETRY_INTERVAL_FLIGHT AO_MS_TO_TICKS(50)
+#define AO_TELEMETRY_INTERVAL_FLIGHT AO_MS_TO_TICKS(100)
#define AO_TELEMETRY_INTERVAL_RECOVER AO_MS_TO_TICKS(1000)
void
void
ao_telemetry_init(void);
+void
+ao_telemetry_tiny_init(void);
+
/*
* ao_radio.c
*/
void
ao_monitor(void);
+#define AO_MONITORING_OFF 0
+#define AO_MONITORING_FULL 1
+#define AO_MONITORING_TINY 2
+
void
ao_set_monitor(uint8_t monitoring);