I believe Jenna wanted an alarm for this situation - though you may want a bit of persistence before you trigger it. I see you have these else conditions in all 3 states. I think we can check for this once in a check function that gets called from the exec no matter which state we're in.
Low state should be checked first since it has a safety implication and the above condition could prevent it for timeout period. If low, we want to go to low state immediately (don't wait for timeout).
Is this condition right? What if we're in wait for pumps stop state? What state will saline bolus exec be in when we're done? Idle, right? Shouldn't we wait for that?
agree we should be consistent, I put it this way since it helped to select vertically for the other part of the code to copy/paste and see all under each other to review the correct numbering.