Had a bit of an issue today. For some reason, the 2nd channel of my water level sensor became un-calibrated and was reading 200 (as if it was never setup). I came home from work and noticed that my entire reservoir dumped in to my tank (about 3 gallons). IT wasn't a catastrophe, but definitely concerning.
Channel (1) is my sump and (2) is my reservoir.
Can someone review this code and advise if they see any flaws?
(I just added the && ReefAngel.WaterLevel.GetLevel(2) < 150 as a safeguard to ensure that it recognized that it was calibrated properly.
Code: Select all
// Main Top Off
if ( ReefAngel.WaterLevel.GetLevel(2) >= 15 && ReefAngel.WaterLevel.GetLevel(2) < 150 && ReefAngel.Params.PH < 850 && millis() > 1000) // Ensure there is 15% of water in the Top Off reservoir and PH is less than 8.5 and the RA didn't just reboot
{
if ( ReefAngel.WaterLevel.GetLevel(1) <= 80 ) ReefAngel.Relay.On(Topoff);
if ( ReefAngel.WaterLevel.GetLevel(1) >= 100 ) ReefAngel.Relay.Off(Topoff);
}
// End Main Top Off