From e5ac0122426edb1edc828695d074f579c3c4950c Mon Sep 17 00:00:00 2001 From: bb09961 <143335221+bb09961@users.noreply.github.com> Date: Thu, 21 Sep 2023 13:04:21 -0500 Subject: [PATCH] Added flow_gallons reset to Station Turn On to address bug #248 If a station did not have a flow meter or open properly, the code was recording the flow amount from the previous station run to the logs. This should reset the flow_gallons counter properly when a station starts. --- main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.cpp b/main.cpp index d6641681..ee7f94e0 100644 --- a/main.cpp +++ b/main.cpp @@ -1055,6 +1055,8 @@ void check_weather() { void turn_on_station(byte sid, ulong duration) { // RAH implementation of flow sensor flow_start=0; + //Added flow_gallons reset to station turn on. + flow_gallons=0; if (os.set_station_bit(sid, 1, duration)) { push_message(NOTIFY_STATION_ON, sid, duration);