Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -r756177be99c8e0947f376248b9f0ec82159a4898 -r12bc101e666ab82371b4e0ea1db1ba7a57f3eccd --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 756177be99c8e0947f376248b9f0ec82159a4898) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 12bc101e666ab82371b4e0ea1db1ba7a57f3eccd) @@ -576,13 +576,6 @@ if ( pumpId < NUM_OF_CONCENTRATE_PUMPS ) { speed = getF32OverrideValue( &concentratePumps[ pumpId ].measuredPumpSpeed ); - - if ( concentratePumps[ pumpId ].measuredPumpSpeed.override != OVERRIDE_KEY ) - { - // If the measured speed is not overridden, then check the direction and adjust the positive/negative speed accordingly. - // If the measured speed is in override, just show it they way it is regardless of the direction of the pump - speed = ( CONCENTRATE_PUMP_REVERSE_DIR == concentratePumps[ pumpId ].direction ? speed * -1.0F : speed ); - } } else { @@ -1021,18 +1014,6 @@ 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. The target speed internally is always positive so use direction instead. - // The direction of the target pump and measured speed should agree on. - if ( ( concentratePumps[ pumpId ].direction != CONCENTRATE_PUMP_REVERSE_DIR ) && ( getMeasuredPumpSpeedMLPM( pumpId ) < 0.0F ) ) - { - isCpSpeedOut = TRUE; - } - else if ( ( CONCENTRATE_PUMP_REVERSE_DIR == concentratePumps[ pumpId ].direction ) && ( getMeasuredPumpSpeedMLPM( pumpId ) > 0.0F ) ) - { - isCpSpeedOut = TRUE; - } - checkPersistentAlarm( alarm, isCpSpeedOut, cpError, tolerance ); } @@ -1173,9 +1154,13 @@ if ( ( pumpId < NUM_OF_CONCENTRATE_PUMPS ) && ( TRUE == isTestingActivated() ) ) { - result = TRUE; - concentratePumps[ pumpId ].measuredPumpSpeed.ovData = value; - concentratePumps[ pumpId ].measuredPumpSpeed.override = OVERRIDE_KEY; + if ( value >= 0.0F ) + { + // Only accept the positive values for override since the measured speed cannot be negative + result = TRUE; + concentratePumps[ pumpId ].measuredPumpSpeed.ovData = value; + concentratePumps[ pumpId ].measuredPumpSpeed.override = OVERRIDE_KEY; + } } return result;