From 149a0f5bdc962c93d073d9756e14f64ed1520e30 Mon Sep 17 00:00:00 2001 From: Krzysiek Egzmont Date: Mon, 9 Oct 2023 16:57:52 +0200 Subject: [PATCH] Revert do not update battery level when TX --- app/app.c | 39 ++++++++++++++++++++------------------- 1 file changed, 20 insertions(+), 19 deletions(-) diff --git a/app/app.c b/app/app.c index e1006ab..aa839f9 100644 --- a/app/app.c +++ b/app/app.c @@ -1783,27 +1783,28 @@ void APP_TimeSlice500ms(void) // Skipped authentic device check - if ((gBatteryCheckCounter & 1) == 0) - { - BOARD_ADC_GetBatteryInfo(&gBatteryVoltages[gBatteryVoltageIndex++], &gBatteryCurrent); - if (gBatteryVoltageIndex > 3) - gBatteryVoltageIndex = 0; - BATTERY_GetReadings(true); - } - - // regular display updates (once every 2 sec) - if need be - if ((gBatteryCheckCounter & 3) == 0) - { - if (gChargingWithTypeC || gSetting_battery_text > 0) - gUpdateStatus = true; - #ifdef ENABLE_SHOW_CHARGE_LEVEL - if (gChargingWithTypeC) - gUpdateDisplay = true; - #endif - } - if (gCurrentFunction != FUNCTION_TRANSMIT) { + + if ((gBatteryCheckCounter & 1) == 0) + { + BOARD_ADC_GetBatteryInfo(&gBatteryVoltages[gBatteryVoltageIndex++], &gBatteryCurrent); + if (gBatteryVoltageIndex > 3) + gBatteryVoltageIndex = 0; + BATTERY_GetReadings(true); + } + + // regular display updates (once every 2 sec) - if need be + if ((gBatteryCheckCounter & 3) == 0) + { + if (gChargingWithTypeC || gSetting_battery_text > 0) + gUpdateStatus = true; + #ifdef ENABLE_SHOW_CHARGE_LEVEL + if (gChargingWithTypeC) + gUpdateDisplay = true; + #endif + } + if (gCurrentFunction != FUNCTION_POWER_SAVE) updateRSSI(gEeprom.RX_VFO);