Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r98d8996eaace58d6d75b5884d6e8c0d3c2df3b17 -rda838b2d59d8b12a239cd31f8b68b2b1bf78e4ae --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 98d8996eaace58d6d75b5884d6e8c0d3c2df3b17) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision da838b2d59d8b12a239cd31f8b68b2b1bf78e4ae) @@ -7,8 +7,8 @@ * * @file DialInFlow.c * -* @author (last) Sean Nash -* @date (last) 04-Jan-2022 +* @author (last) Michael Garthwaite +* @date (last) 08-Feb-2022 * * @author (original) Sean * @date (original) 16-Dec-2019 @@ -237,7 +237,7 @@ dipMotorSpeedCalcIdx = 0; for ( i = 0; i < DIP_SPEED_CALC_BUFFER_LEN; i++ ) { - dipLastMotorHallSensorCounts[ i ] = 0; + dipLastMotorHallSensorCounts[ i ] = getFPGADialInPumpHallSensorCount(); } // Initialize dialysate inlet flow PI controller @@ -272,10 +272,17 @@ // Don't interrupt pump control unless rate or mode is changing if ( ( dirFlowRate != targetDialInFlowRate ) || ( mode != dialInPumpControlMode ) ) { -#ifndef NO_PUMP_FLOW_LIMITS + BOOL byPassFlowLimit = FALSE; + +#ifndef _RELEASE_ + if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMPS_FLOW_LIMITS ) ) + { + byPassFlowLimit = TRUE; + } +#endif + // Verify flow rate - if ( flowRate <= MAX_DIAL_IN_FLOW_RATE ) -#endif + if ( ( flowRate <= MAX_DIAL_IN_FLOW_RATE ) || ( TRUE == byPassFlowLimit ) ) { resetDialInFlowMovingAverage(); targetDialInFlowRate = dirFlowRate; @@ -314,12 +321,17 @@ } result = TRUE; } -#ifndef NO_PUMP_FLOW_LIMITS + else // Requested flow rate too high - { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_DIAL_IN_FLOW_SET_TOO_HIGH, flowRate ) - } + { +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMPS_FLOW_LIMITS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_DIAL_IN_FLOW_SET_TOO_HIGH, flowRate ) + } + } + } }