From 1e093978f31e287ec12ee8b8525264e29f0b7d00 Mon Sep 17 00:00:00 2001 From: Thomas Kolb Date: Sat, 24 Sep 2022 16:39:46 +0200 Subject: [PATCH] config: avoid switching between sleep and active state too often Unfortunately, the offset voltage of the opamp for charge current measurement breaks measurement at low currents with a small shunt, so at dusk, when currents become low, it may happen that 0 current is measured while the battery is still being charged. This would falsely trigger the transition to sleep state. To improve this situation, we simply keep the charger active for a longer time. --- src/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.h b/src/config.h index 794488e..a9ea40c 100644 --- a/src/config.h +++ b/src/config.h @@ -30,7 +30,7 @@ #define SLEEP_SOLAR_CURRENT 1 /* Delay between state change and sleep state check (in ms). */ -#define SLEEP_STATE_DELAY 100 +#define SLEEP_STATE_DELAY 60000 /* Delay between charging switch state change and sleep state check(in ms). */ #define SLEEP_SWITCH_DELAY 1000