From f89b6c412ac3fb1e17e12ec18fcb82108e8649d1 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Sat, 18 Nov 2023 14:18:29 -0500 Subject: [PATCH] Update main.c add battery prints --- main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.c b/main.c index a429858f..dffeea47 100644 --- a/main.c +++ b/main.c @@ -824,10 +824,12 @@ fprintf(stderr, "\n\nbattery_saver_mode : %d current: %f\n", battery_saver_mode, #ifndef HAB if ((batteryCurrent > currentThreshold) && (batteryVoltage < (voltageThreshold + 0.15)) && !sim_mode) { + fprintf(stderr,"Battery voltage low - switch to battery saver\n"); if (battery_saver_mode == OFF) battery_saver(ON); } else if ((battery_saver_mode == ON) && (batteryCurrent < 0)) { + fprintf(stderr,"Battery is being charged - switch battery saver off\n"); if (battery_saver_mode == ON) battery_saver(OFF); } else if ((batteryCurrent > currentThreshold) && (batteryVoltage < voltageThreshold) && !sim_mode) // currentThreshold ensures that this won't happen when running on DC power.