d0ughb0y
Active member
d0ughb0y,
Thanks for testing but I must have something else wrong. Both on my test unit and the one I have running with pump in my hand does this:
You close ato switch and status of ato changes, and state of outlet changes without any delays. You open switch and state of ato changes and outlet changes without delays. My frag unit, I verified the pump state is as described.
And if you reset the unit the ATO runs for 1 min before it turns off after it boots.
It is impossible for the same code to work differently on another setup, so you have modifications to your code that is doing this.
After a reboot, the ATO outlet can only turn on if checkATO was executed and will turn on only if the float switch is open. checkATO will not get executed until after a full minute. So what you are describing is impossible to happen if you are running the same code as I am (with only the checkATO change).
I suggest you get the latest code, and only change the checkATO part in outlethandlerB, and you will see it will work. No need to copy the complicated apex algorithm, it really does not improve anything.