Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r38e9e1791f490f7a95b7a7040973a6761f7603ff -rf124efbd92b66cb23ac24dccbdbef48e52cab7c5 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 38e9e1791f490f7a95b7a7040973a6761f7603ff) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision f124efbd92b66cb23ac24dccbdbef48e52cab7c5) @@ -43,6 +43,7 @@ #define MAX_DIAL_OUT_FLOW_RATE 650 ///< Maximum dialysate outlet pump flow rate in mL/min. #define MIN_DIAL_OUT_FLOW_RATE 100 ///< Minimum dialysate outlet pump flow rate in mL/min. +#define DPO_FLOW_ADJ_DUE_TO_HIGHER_INLET_PRES 0.875 ///< Adjustment factor to account for higher pump inlet pressure (than DPi pump inlet). #define MAX_DIAL_OUT_PUMP_PWM_STEP_CHANGE 0.01 ///< Maximum duty cycle change when ramping. #define MAX_DIAL_OUT_PUMP_PWM_DUTY_CYCLE 0.88 ///< Controller will error if PWM duty cycle > 90%, so set max to 88%. @@ -241,11 +242,13 @@ // verify flow rate if ( flowRate <= MAX_DIAL_OUT_FLOW_RATE ) { + F32 adjFlow = (F32)flowRate * DPO_FLOW_ADJ_DUE_TO_HIGHER_INLET_PRES; + lastGivenRate = flowRate; dialOutPumpDirection = dir; dialOutPumpControlMode = mode; // set PWM duty cycle target to an estimated initial target to ramp to based on target flow rate - then we'll control to flow when ramp completed - dialOutPumpPWMDutyCyclePct = DOP_PWM_FROM_ML_PER_MIN((F32)flowRate); + dialOutPumpPWMDutyCyclePct = DOP_PWM_FROM_ML_PER_MIN(adjFlow); switch ( dialOutPumpState ) {