In a lot of the sub-functions, there are do {} loops that will wait
for button presses and so on.
For example, PH calibration, feeding mode, light setup, etc.
The big danger is if one of the dosing pumps or ATO is on when you enter those modes.
It appears that the relays will remain on while in the mode.
For pH calibration, that could be 20 minutes or even longer if you go off an forget.
You could end up with a flood, or a ton of Alk.
The simple fix is to do something like RelayMask, where you make sure critical relays are off.
A better but way more complex long term fix is to have all those menus state based,
so there is no do loop, but you instead go all the way back to the main loop.
A bit like DisplayMenuHeading is done, but instead of just displaying, it goes to that handler.
dangerous "do" loops
Re: dangerous "do" loops
Thanks for the input. The menu system isn't perfect by any means (from what you can tell). I'll look into it more unless you want to make some fixes and send me your proposed changes.
curt
curt
Re: dangerous "do" loops
I thought the water change and feeding mode was going to main loop since a couple of releases back.
Roberto.
Re: dangerous "do" loops
They are in the main loop. The only ones that are not are any of the setup screens.rimai wrote:I thought the water change and feeding mode was going to main loop since a couple of releases back.
curt