From 7cd89bc04a56da99ca8c1eec49a4b1bdbb61905d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20J=C3=A4ger?= Date: Mon, 2 Nov 2020 11:07:20 +0100 Subject: [PATCH] PWM switch: Fix start voltage check Previous statement didn't consider the series multiplier in case of 24V battery. --- src/pwm_switch.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pwm_switch.cpp b/src/pwm_switch.cpp index e30b121..c36c3cd 100644 --- a/src/pwm_switch.cpp +++ b/src/pwm_switch.cpp @@ -118,7 +118,7 @@ void PwmSwitch::control() } else { if (bus->sink_current_margin > 0 // charging allowed - && bus->voltage < bus->sink_voltage_bound + && bus->voltage < bus->sink_control_voltage() && ext_voltage > bus->voltage + offset_voltage_start && uptime() > (off_timestamp + restart_interval) && enable == true)