The suggested mechanism to resume treatment without heparin had been to allow resume with minor flag changes to allow the treatment to continue. At this point clearing the alarm may be all that is necessary. Code updated.
This is here is because when they request the configs I set the dictionary to reset mode until the new values have been received from the firmware and then the dictionary is updated with the firmware values. Thanks I moved it to only execute it if the message was received successfully.
This appears to be causing problems 1) at startup and 2) after fast operations (e.g. retract, preload, seek). For #1, not sure what's happening at startup, but apparently the position reported by FPGA is not stable for a little while after startup. Probably need to exempt first second (previous 1sec persistence seemed to work fine) after powerup to prevent false alarms. For #2, I think it just takes a little while for pump to actually come to full stop after pump was running fast. The syringe pump monitor and controller are running in priority task at 100 Hz, so a count of 5 is only 50 ms. Need to play around with this count to see how much time is needed to come to complete stop and then set count to something north of that time (at 10ms per count) for margin.
It looks like we could get here pretty regularly while we're waiting for command transmit to complete (if statement above) which should not be counted as a comm error unless it's taking too long (timeout).