X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_telemetry.c;h=eb614b0f766a53eb237d6f619f8b4d9183f35899;hb=4bfce11873f34af9621c60f83a8355f85769f6d3;hp=95e53917152c176c6dabc9067ab8ef659a7aa1e3;hpb=258b75498916183ed250d3abb3282fe3d843e7a1;p=fw%2Faltos diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c index 95e53917..eb614b0f 100644 --- a/src/core/ao_telemetry.c +++ b/src/core/ao_telemetry.c @@ -35,7 +35,7 @@ static __pdata uint16_t ao_rdf_time; #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 @@ -132,11 +132,11 @@ ao_send_configuration(void) 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; } @@ -240,8 +240,11 @@ ao_telemetry(void) #endif time += ao_telemetry_interval; delay = time - ao_time(); - if (delay > 0) - ao_delay(delay); + if (delay > 0) { + ao_alarm(delay); + ao_sleep(&telemetry); + ao_clear_alarm(); + } else time = ao_time(); }