Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rc5f3dfc2a87c35036f21f969f6e762ae779839f2 -r491bddb51ce331490567666795549c17f78a0e68 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision c5f3dfc2a87c35036f21f969f6e762ae779839f2) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 491bddb51ce331490567666795549c17f78a0e68) @@ -7,8 +7,8 @@ * * @file DialOutFlow.c * -* @author (last) Darren Cox -* @date (last) 10-Mar-2022 +* @author (last) Dara Navaei +* @date (last) 24-May-2022 * * @author (original) Sean * @date (original) 24-Jan-2020 @@ -104,8 +104,7 @@ #define DOP_PWM_ZERO_OFFSET 0.1F ///< 10% PWM duty cycle = zero speed. /// Macro converts a flow rate to an estimated PWM duty cycle %. -#define DOP_PWM_FROM_ML_PER_MIN(rate) ( ( (rate) * 0.0009 ) + 0.0972 + DOP_PWM_ZERO_OFFSET ) // TODO - need to consider BP rate? -//#define DOP_PWM_FROM_ML_PER_MIN(rate) ( (rate) * DOP_ML_PER_MIN_TO_PUMP_RPM_FACTOR * DOP_GEAR_RATIO * DOP_MOTOR_RPM_TO_PWM_DC_FACTOR + DOP_PWM_ZERO_OFFSET ) +#define DOP_PWM_FROM_ML_PER_MIN(rate) ( ( (rate) * 0.0009 ) + 0.0972 + DOP_PWM_ZERO_OFFSET ) /// Conversion from PWM duty cycle % to commanded pump motor speed. #define DOP_PWM_TO_MOTOR_SPEED_RPM(pwm) ( ((pwm) - DOP_PWM_ZERO_OFFSET) * 4000.0F ) @@ -266,17 +265,21 @@ // Don't interrupt pump control unless rate or mode is changing if ( ( fabs( pwmDC - dialOutPumpPWMDutyCyclePct ) > NEARLY_ZERO ) || ( mode != dialOutPumpControlMode ) ) { +#ifndef _RELEASE_ BOOL byPassFlowLimit = FALSE; -#ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMPS_FLOW_LIMITS ) ) { byPassFlowLimit = TRUE; } #endif // Verify flow rate +#ifdef _RELEASE_ + if ( flowRate <= MAX_DIAL_OUT_FLOW_RATE ) +#else if ( ( flowRate <= MAX_DIAL_OUT_FLOW_RATE ) || ( TRUE == byPassFlowLimit ) ) +#endif { resetDialOutFlowMovingAverage(); dopControlSignal = FALSE;