Greyed out battery icon was missing when WiFi was active

This commit is contained in:
Sjef Verhoeven PE5PVB
2023-08-05 01:07:03 +02:00
parent 0abb52f1a5
commit 1b56109ef3
+1 -3
View File
@@ -3547,7 +3547,6 @@ void ShowRSSI() {
} }
void ShowBattery() { void ShowBattery() {
if (!wifi) {
if (millis() >= batupdatetimer + TIMER_BAT_TIMER) { if (millis() >= batupdatetimer + TIMER_BAT_TIMER) {
batupdatetimer = millis(); batupdatetimer = millis();
} else { } else {
@@ -3578,7 +3577,7 @@ void ShowBattery() {
batteryold = battery; batteryold = battery;
} }
if (!advancedRDS && !afscreen && batterydetect) { if (!wifi && !advancedRDS && !afscreen && batterydetect) {
float batteryV = ((float)v / 4095.0) * 2.0 * 3.3 * (1056 / 1000.0); float batteryV = ((float)v / 4095.0) * 2.0 * 3.3 * (1056 / 1000.0);
batteryV = constrain(batteryV, 0.0, 5.0); batteryV = constrain(batteryV, 0.0, 5.0);
if (round(batteryV * 100.0) != round(batteryVold * 100.0)) { if (round(batteryV * 100.0) != round(batteryVold * 100.0)) {
@@ -3596,7 +3595,6 @@ void ShowBattery() {
} }
} }
} }
}
} }
void Communication() { void Communication() {