From 87d76972df9c089c4f391bdbb28eefbd4d95a127 Mon Sep 17 00:00:00 2001 From: Stuart Longland Date: Sun, 19 Mar 2017 12:54:25 +1000 Subject: [PATCH] setpoints: Define an increment step to provide hysteresis. By incrementing the battery voltage on compare, we ensure we are seeing a steadily increasing voltage. If we're not seeing that, then we flag the warning. --- setpoints.h.dist | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setpoints.h.dist b/setpoints.h.dist index f23cde5..f864c6d 100644 --- a/setpoints.h.dist +++ b/setpoints.h.dist @@ -82,6 +82,13 @@ */ #define V_CL_MV (11800) +/*! + * Battery minimum charge step. This is the amount of charge we expect + * the battery to have increased by before we consider flagging a + * warning. + */ +#define V_DELTA_MV (250) + /* --- Timeouts --- */ /*!