ao_gps_report_init(void);
/*
- * ao_telemetry.c
+ * ao_telemetry_orig.c
*/
#define AO_MAX_CALLSIGN 8
+#define AO_MAX_TELEMETRY 128
-struct ao_telemetry {
+struct ao_telemetry_orig {
uint16_t serial;
uint16_t flight;
uint8_t flight_state;
* ao_radio_recv tacks on rssi and status bytes
*/
+struct ao_telemetry_raw_recv {
+ uint8_t packet[AO_MAX_TELEMETRY + 2];
+};
+
struct ao_telemetry_orig_recv {
struct ao_telemetry_orig telemetry_orig;
int8_t rssi;
{
__xdata char callsign[AO_MAX_CALLSIGN+1];
__xdata union {
+ struct ao_telemetry_raw_recv raw;
struct ao_telemetry_orig_recv orig;
struct ao_telemetry_tiny_recv tiny;
} u;
printf("CRC INVALID RSSI %3d\n", rssi);
}
break;
+ default:
+ if (ao_monitoring > AO_MAX_TELEMETRY)
+ ao_monitoring = AO_MAX_TELEMETRY;
+ if (!ao_radio_recv(&recv_raw, ao_monitoring))
+ continue;
+ for (state = 0; state < ao_monitoring + 1; state++)
+ printf("%02x ", recv_raw.packet[state]);
+ printf("%02x\n", recv_raw.packet[state]);
+ break;
}
ao_usb_flush();
ao_led_toggle(ao_monitor_led);
#define AO_RDF_LENGTH_MS 500
void
-ao_telemetry(void)
+ao_telemetry_orig(void)
{
uint16_t time;
int16_t delay;
- static __xdata struct ao_telemetry telemetry;
+ static __xdata struct ao_telemetry_orig telemetry;
ao_config_get();
while (!ao_flight_number)
ao_rdf_time = ao_time();
}
-__xdata struct ao_task ao_telemetry_task;
+__xdata struct ao_task ao_telemetry_orig_task;
void
-ao_telemetry_init()
+ao_telemetry_orig_init()
{
- ao_add_task(&ao_telemetry_task, ao_telemetry, "telemetry");
+ ao_add_task(&ao_telemetry_orig_task, ao_telemetry_orig, "telemetry_orig");
}