Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -rc44e496a684e4ff1c1a19389873a46fd8181334e -r150ea9e4d24f2cb555495749b095d270013c30bb --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision c44e496a684e4ff1c1a19389873a46fd8181334e) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision 150ea9e4d24f2cb555495749b095d270013c30bb) @@ -40,7 +40,7 @@ #define CONCENTRATE_PUMP_SPEED_INCREMENT 2.0F ///< Speed increase (mL/min) when controlling concentrate pump to target step speed. #define CONCENTRATE_PUMP_MIN_SPEED 3.0F ///< Minimum speed for concentrate pump in mL per min. #define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_ON_PCT 0.02F ///< Concentrate pump speed out of range tolerance when on in percentage. -#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_OFF_MLPM 1.0F ///< Concentrate pump speed out of range tolerance when off in mL/min. +#define CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_SLOW_MLPM 1.0F ///< Concentrate pump speed out of range tolerance when slow in mL/min. #define CONCENTRATE_PUMP_LOW_SPEED_THRESHOLD_MLPM 10.0F ///< Concentrate pump low speed threshold in mL/min. #define CONCENTRATE_PUMP_ZERO_FLOW_RATE 0xFFFF ///< Pulse width value when zero flow rate or pump is off. @@ -858,9 +858,9 @@ F32 cpTargetSpeed = concentratePumps[ pumpId ].currentPumpSpeed; F32 cpError = fabs( getMeasuredPumpSpeed( pumpId ) - cpTargetSpeed ); BOOL isCpSpeedOut = FALSE; - F32 tolerance = CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_OFF_MLPM; + F32 tolerance = CONCENTRATE_PUMP_SPD_OUT_OF_RANGE_TOL_WHEN_SLOW_MLPM; - if ( ( cpTargetSpeed > NEARLY_ZERO ) && ( cpTargetSpeed > CONCENTRATE_PUMP_LOW_SPEED_THRESHOLD_MLPM ) ) + if ( cpTargetSpeed > CONCENTRATE_PUMP_LOW_SPEED_THRESHOLD_MLPM ) { // Check if the pump is not in the off state and if it is not and greater than the minimum threshold, divide the error // to target speed. If the pump is off the target speed is 0 so the speed check is done differently