From 0f2c2928f474e802eea0376da7eb1a09a7ae89a2 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 16 Nov 2023 11:52:23 -0500 Subject: [PATCH] Update main.c fix conditional --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index f24542bd..e9979002 100644 --- a/main.c +++ b/main.c @@ -820,7 +820,7 @@ printf("battery_saver_check() : %d \n", battery_saver_check()); if ((batteryCurrent > currentThreshold) && (batteryVoltage < (voltageThreshold + 0.15)) && !sim_mode) { battery_saver(ON); - } else if ((battery_saver_check()) && (batteryCurrent < 0)) + } else if ((battery_saver_check() == 1) && (batteryCurrent < 0)) { battery_saver(OFF); } else if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power.