#define AO_RDF_INTERVAL_TICKS AO_SEC_TO_TICKS(5)
#define AO_RDF_LENGTH_MS 500
-#if defined(TELEMETRUM_V_0_1) || defined(TELEMETRUM_V_0_2) || defined(TELEMETRUM_V_1_0) || defined(TELEMETRUM_V_1_1)
+#if defined(TELEMETRUM_V_0_1) || defined(TELEMETRUM_V_0_2) || defined(TELEMETRUM_V_1_0) || defined(TELEMETRUM_V_1_1) || defined(TELEBALLOON_V_1_1) || defined(TELEMETRUM_V_1_2)
#define AO_TELEMETRY_SENSOR AO_TELEMETRY_SENSOR_TELEMETRUM
#endif
static void
ao_send_sensor(void)
{
- uint8_t sample;
- sample = ao_sample_adc;
+ uint8_t sample = ao_adc_ring_prev(ao_sample_adc);
telemetry.generic.tick = ao_adc_ring[sample].tick;
telemetry.generic.type = AO_TELEMETRY_SENSOR;
telemetry.configuration.main_deploy = ao_config.main_deploy;
telemetry.configuration.flight_log_max = ao_config.flight_log_max >> 10;
ao_xmemcpy (telemetry.configuration.callsign,
- ao_config.callsign,
- AO_MAX_CALLSIGN);
+ ao_config.callsign,
+ AO_MAX_CALLSIGN);
ao_xmemcpy (telemetry.configuration.version,
- ao_version,
- AO_MAX_VERSION);
+ CODE_TO_XDATA(ao_version),
+ AO_MAX_VERSION);
ao_radio_send(&telemetry, sizeof (telemetry));
ao_telemetry_config_cur = ao_telemetry_config_max;
}