lowVenousPressureExemptCheck - flag initialized to TRUE in the Init routine. Whenever valve opens (fill), it resets the flag to "FALSE" ,the Exempt counter is not incremented. When valve closes, flag is set back to TRUE and Exempt counter being incremented.
lowVenousPressureExemptCheck - flag initialized to TRUE in the Init routine. Whenever valve opens (fill), it resets the flag to "FALSE" ,the Exempt counter is not incremented. When valve closes, flag is set back to TRUE and Exempt counter being incremented.
I think this function should set the old reset flag to FALSE here. Function doesn't need a parameter because it is only called when valve closes which should always set reset flag to FALSE.
Probably not this simple. We need to consider how much UF volume we've done so far and how much Tx time is remaining. So rate = ( presMaxUFVolumeML - collectedUFVolumeML ) / treatmentTimeRemaining. I made up var names for all but the first in equation above, but just showing how the calculation should go. You can look at UF volume change (where we are changing UF rate to accomodate the change) for reference.