Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rc31c6e4340c28577df4d146165ccbfc8f0a47134 -r497e910ca4972a1a993cb0ae1edf30d225283b34 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision c31c6e4340c28577df4d146165ccbfc8f0a47134) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 497e910ca4972a1a993cb0ae1edf30d225283b34) @@ -311,7 +311,7 @@ // to make sure the hardware (especially the ROF) is not damaged. If it is the case, we need to stop immediately F32 actualPressure = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET ); BOOL isPressureMax = actualPressure >= MAX_ALLOWED_MEASURED_PRESSURE_PSI; - checkPersistentAlarm( PERSISTENT_ALARM_RO_PUMP_PRESSURE_OUT_OF_RANGE, isPressureMax, actualPressure ); + checkPersistentAlarm( PERSISTENT_ALARM_RO_PUMP_PRESSURE_OUT_OF_RANGE, isPressureMax, actualPressure, MAX_ALLOWED_MEASURED_PRESSURE_PSI ); // Read flow at the control set if ( ++flowFilterCounter >= FLOW_SAMPLES_TO_AVERAGE ) @@ -345,16 +345,10 @@ // Figure out whether flow is out of range from which side if ( isFlowOutOfRange ) { - //BOOL isFlowOutOfUpperRange = currentFlow > targetFlow; - //BOOL isFlowOutOfLowerRange = currentFlow < targetFlow; - if ( currentFlow > targetFlow ) - { - checkPersistentAlarm( PERSISTENT_ALARM_RO_FLOW_RATE_OUT_OF_UPPER_RANGE, TRUE, currentFlow ); - } - else - { - checkPersistentAlarm( PERSISTENT_ALARM_RO_FLOW_RATE_OUT_OF_LOWER_RANGE, TRUE, currentFlow ); - } + BOOL isFlowOutOfUpperRange = currentFlow > targetFlow; + BOOL isFlowOutOfLowerRange = currentFlow < targetFlow; + checkPersistentAlarm( PERSISTENT_ALARM_RO_FLOW_RATE_OUT_OF_UPPER_RANGE, isFlowOutOfUpperRange, currentFlow, targetFlow ); + checkPersistentAlarm( PERSISTENT_ALARM_RO_FLOW_RATE_OUT_OF_LOWER_RANGE, isFlowOutOfLowerRange, currentFlow, targetFlow ); } }