X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fkernel%2Fao_telemetry.c;h=6fb30069ee5be977a6112b2058cf3753c5111f7a;hp=2292d229d673a02b6b8ef1ebd87d45720f0fc9dc;hb=f8567a7be7ccd5dcc57ab65e63efe45e62008127;hpb=08550425fca3da73d8f16de567a2c956b85d676e diff --git a/src/kernel/ao_telemetry.c b/src/kernel/ao_telemetry.c index 2292d229..6fb30069 100644 --- a/src/kernel/ao_telemetry.c +++ b/src/kernel/ao_telemetry.c @@ -305,8 +305,14 @@ ao_send_configuration(void) #endif telemetry.configuration.config_major = AO_CONFIG_MAJOR; telemetry.configuration.config_minor = AO_CONFIG_MINOR; +#if AO_idProduct_NUMBER == 0x25 && HAS_ADC + /* TeleGPS gets battery voltage instead of apogee delay */ + telemetry.configuration.apogee_delay = ao_data_ring[ao_data_ring_prev(ao_data_head)].adc.v_batt; +#else telemetry.configuration.apogee_delay = ao_config.apogee_delay; telemetry.configuration.main_deploy = ao_config.main_deploy; +#endif + telemetry.configuration.flight_log_max = ao_config.flight_log_max >> 10; ao_xmemcpy (telemetry.configuration.callsign, ao_config.callsign, @@ -334,9 +340,6 @@ ao_send_location(void) ao_xmemcpy(&telemetry.location.flags, &ao_gps_data.flags, 26); -#if HAS_TRACKER - telemetry.location.state = ao_flight_state | AO_GPS_STATE_VALID; -#endif telemetry.location.tick = ao_gps_tick; ao_mutex_put(&ao_gps_mutex); ao_radio_send(&telemetry, sizeof (telemetry)); @@ -518,7 +521,7 @@ ao_telemetry_set_interval(uint16_t interval) ao_telemetry_companion_cur = cur; #endif - ao_telemetry_config_max = AO_SEC_TO_TICKS(1) / interval; + ao_telemetry_config_max = AO_SEC_TO_TICKS(5) / interval; #if HAS_COMPANION if (ao_telemetry_config_max > cur) cur++;