From a457c2cc9b2fae031e3f9c03099b8eaafae6d914 Mon Sep 17 00:00:00 2001 From: Martin Jaeger <17674105+martinjaeger@users.noreply.github.com> Date: Mon, 27 Jan 2020 14:41:48 +0100 Subject: [PATCH] Fix DC/DC startup condition check --- src/dcdc.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dcdc.cpp b/src/dcdc.cpp index 8471c2d..d999234 100644 --- a/src/dcdc.cpp +++ b/src/dcdc.cpp @@ -124,7 +124,7 @@ int Dcdc::check_start_conditions() lvs->voltage > ls_voltage_max || lvs->voltage < ls_voltage_min || dev_stat.has_error(ERR_BAT_UNDERVOLTAGE | ERR_BAT_OVERVOLTAGE) || - uptime() < (off_timestamp + restart_interval)) + (int)uptime() < (off_timestamp + (int)restart_interval)) { return 0; // no energy transfer allowed }