From bd4becbb9b510d2de119d183ac63bff571abcb98 Mon Sep 17 00:00:00 2001 From: Roberto Imai Date: Fri, 24 Jun 2016 18:32:42 -0700 Subject: [PATCH] Fixed WaterLevelATO timer issue --- RA_ATO/RA_ATO.h | 1 + ReefAngel/ReefAngel.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/RA_ATO/RA_ATO.h b/RA_ATO/RA_ATO.h index 7718b4b..ade3d5d 100644 --- a/RA_ATO/RA_ATO.h +++ b/RA_ATO/RA_ATO.h @@ -93,6 +93,7 @@ class RA_ATOLowClass : public RA_ATOClass class RA_ATOWLClass : public RA_ATOClass { public: + unsigned long Timer; inline bool IsActive() { return false; } }; #endif // WATERLEVELEXPANSION || MULTIWATERLEVELEXPANSION diff --git a/ReefAngel/ReefAngel.cpp b/ReefAngel/ReefAngel.cpp index 20e4520..ff97fa5 100644 --- a/ReefAngel/ReefAngel.cpp +++ b/ReefAngel/ReefAngel.cpp @@ -1133,7 +1133,7 @@ void ReefAngelClass::WaterLevelATO(byte ATORelay, int ATOTimeout, byte LowLevel, Is the low level is reached (meaning we need to top off) and are we not currently topping off Then we set the timer to be now and start the topping pump */ - if ( WaterLevel.GetLevel(Channel) < LowLevel && ( !WLATO.IsTopping()) ) + if ( WaterLevel.GetLevel(Channel) < LowLevel && ( !WLATO.IsTopping()) && bitRead(AlertFlags,ATOTimeOutFlag)==0) { WLATO.Timer = millis(); WLATO.StartTopping();