Index: firmware/App/Controllers/ConcentratePumps.c =================================================================== diff -u -rd5fb5e81313178d4b8a1d1f2dbcb6440815ef3de -rdf0df237b2a946a1599a45d9e3585194fd550829 --- firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision d5fb5e81313178d4b8a1d1f2dbcb6440815ef3de) +++ firmware/App/Controllers/ConcentratePumps.c (.../ConcentratePumps.c) (revision df0df237b2a946a1599a45d9e3585194fd550829) @@ -41,7 +41,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_TX_SPD_OUT_OF_RANGE_TOL_PCT 0.02F ///< Concentrate pump treatment speed out of range tolerance when on in percentage. -#define CONCENTRATE_PUMP_HEAT_DIS_SPD_OUT_OF_RANGE_TOL_PCT 0.05F ///< Concentrate pump heat disinfect speed out of range tolerance when on in percentage. +#define CONCENTRATE_PUMP_CLEANING_SPD_OUT_OF_RANGE_TOL_PCT 0.05F ///< Concentrate pump cleaning mode speed out of range tolerance when on in percentage. #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. @@ -1001,9 +1001,14 @@ { // 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 - // The speed tolerance is looser in heat disinfect that the rest of the modes that the concentrate pump are running. + // The speed tolerance is looser in heat disinfect and flush than the rest of the modes that the concentrate pump are running. cpError = cpError / cpTargetSpeed; - tolerance = ( DG_MODE_HEAT == opMode ? CONCENTRATE_PUMP_HEAT_DIS_SPD_OUT_OF_RANGE_TOL_PCT : CONCENTRATE_PUMP_TX_SPD_OUT_OF_RANGE_TOL_PCT ); + tolerance = CONCENTRATE_PUMP_TX_SPD_OUT_OF_RANGE_TOL_PCT; + + if ( ( DG_MODE_HEAT == opMode ) || ( DG_MODE_FLUS == opMode ) ) + { + tolerance = CONCENTRATE_PUMP_CLEANING_SPD_OUT_OF_RANGE_TOL_PCT; + } } isCpSpeedOut = ( cpError > tolerance ? TRUE : FALSE );