Override and Mask
Override and Mask
Can someone help me understand what/how Override and Mask works with regards to relays? What is it for and how is it used?
Re: Override and Mask
Override gives you the ability to turn relays on/off regardless of what your code says it should be.
Let's say you have a relay set for heater. It will turn on/off based in temperature.
If you for some reason would like to turn the heater off, you use the mask to turn it off and it will stay off as long as the override is set. Clear the override to return back to normal.
Let's say you have a relay set for heater. It will turn on/off based in temperature.
If you for some reason would like to turn the heater off, you use the mask to turn it off and it will stay off as long as the override is set. Clear the override to return back to normal.
Roberto.
Re: Override and Mask
"you use the mask" - is that the mask or the override?
1.) So the heater is set with the automatic out of the box on/off function (from the wizard)
2.) Some problem is detected in code maybe
3.) ReefAngel.Relay.Override(heater_port);
4.) Heater stays off forever until Override is overridden
5.) How does that happen?
6.) Is Override the "mask"? ReefAngel.Relay.IsMaskOn(heater_port) is true after #3
7.) or Do you set masks directly
1.) So the heater is set with the automatic out of the box on/off function (from the wizard)
2.) Some problem is detected in code maybe
3.) ReefAngel.Relay.Override(heater_port);
4.) Heater stays off forever until Override is overridden
5.) How does that happen?
6.) Is Override the "mask"? ReefAngel.Relay.IsMaskOn(heater_port) is true after #3
7.) or Do you set masks directly
Re: Override and Mask
You may want to look at the source code to see what the underlying libraries are doing.
https://github.com/reefangel/Libraries/ ... /Relay.cpp
The override function does nothing more than set/clear bits on the MaskOff and MaskOn variables.
You can also set/clear the bits yourself if you choose, but it is easier to use the Override function.
https://github.com/reefangel/Libraries/ ... /Relay.cpp
The override function does nothing more than set/clear bits on the MaskOff and MaskOn variables.
You can also set/clear the bits yourself if you choose, but it is easier to use the Override function.
Roberto.