Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r4a55794912e05090054e10c73a8b4ee0236a51dc -r32e90c9bae6d193e54c3af4c64419cae502f5beb --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 4a55794912e05090054e10c73a8b4ee0236a51dc) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 32e90c9bae6d193e54c3af4c64419cae502f5beb) @@ -1022,12 +1022,12 @@ isCpSpeedOut = ( cpError > tolerance ? TRUE : FALSE ); // Check for measured speed and target speed direction after checking the tolerance. Even if the absolute values are in range the direction - // of target and measured speed should be matching - if ( ( concentratePumps[ pumpId ].currentPumpSpeed > 0.0F ) && ( getMeasuredPumpSpeedMLPM( pumpId ) < 0.0F ) ) + // of target and measured speed should be matching. The target speed internally is always positive so use direction instead. + if ( ( concentratePumps[ pumpId ].direction != CONCENTRATE_PUMP_REVERSE_DIR ) && ( getMeasuredPumpSpeedMLPM( pumpId ) < 0.0F ) ) { isCpSpeedOut = TRUE; } - else if ( ( concentratePumps[ pumpId ].currentPumpSpeed < 0.0F ) && ( getMeasuredPumpSpeedMLPM( pumpId ) > 0.0F ) ) + else if ( ( CONCENTRATE_PUMP_REVERSE_DIR == concentratePumps[ pumpId ].direction ) && ( getMeasuredPumpSpeedMLPM( pumpId ) > 0.0F ) ) { isCpSpeedOut = TRUE; }