Index: firmware/App/Controllers/DrainPump.c =================================================================== diff -u -r986abcfcf047822cad1a10c1ee0924a80dd5f512 -ra3ee6d44d7eb0a1f96772c634ac243d4899419d3 --- firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision 986abcfcf047822cad1a10c1ee0924a80dd5f512) +++ firmware/App/Controllers/DrainPump.c (.../DrainPump.c) (revision a3ee6d44d7eb0a1f96772c634ac243d4899419d3) @@ -337,20 +337,7 @@ } #ifndef IGNORE_DRAIN_PUMP_MONITOR - // The RPM is only checked in open loop state that the pump is run at a fixed RPM. - // The persistent alarm waits for a couple of seconds before raising an alarm, this is supposed to cover - // when the pump is turned on and it takes a while to ramp up to target RPM. - if ( PUMP_CONTROL_MODE_OPEN_LOOP == drainPumpControlModeSet ) - { - // Using abs since the read RPM can be above or below the target - U32 rpmDiff = abs( getDrainPumpTargetRPM() - getDrainPumpMeasuredRPM() ); - // Check if RPM is out of range - BOOL isRPMOutOfRange = ( rpmDiff > MAX_ALLOWED_OPEN_LOOP_RPM_OUT_OF_RANGE ? TRUE : FALSE ); - - checkPersistentAlarm( ALARM_ID_DRAIN_PUMP_RPM_OUT_OF_RANGE, isRPMOutOfRange, getDrainPumpMeasuredRPM(), MAX_ALLOWED_OPEN_LOOP_RPM_OUT_OF_RANGE ); - } - // Check if the pump is in off state and the RPM is greater than the minimum RPM if ( DRAIN_PUMP_OFF_STATE == drainPumpState ) { @@ -364,6 +351,19 @@ activateSafetyShutdown(); } } + // The RPM is only checked in open loop state that the pump is run at a fixed RPM. + // The persistent alarm waits for a couple of seconds before raising an alarm, this is supposed to cover + // when the pump is turned on and it takes a while to ramp up to target RPM. + else if ( PUMP_CONTROL_MODE_OPEN_LOOP == drainPumpControlModeSet ) + { + // Using abs since the read RPM can be above or below the target + U32 rpmDiff = abs( getDrainPumpTargetRPM() - getDrainPumpMeasuredRPM() ); + + // Check if RPM is out of range + BOOL isRPMOutOfRange = ( rpmDiff > MAX_ALLOWED_OPEN_LOOP_RPM_OUT_OF_RANGE ? TRUE : FALSE ); + + checkPersistentAlarm( ALARM_ID_DRAIN_PUMP_RPM_OUT_OF_RANGE, isRPMOutOfRange, getDrainPumpMeasuredRPM(), MAX_ALLOWED_OPEN_LOOP_RPM_OUT_OF_RANGE ); + } #endif // Publish drain pump data on interval