Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -r29b65975bb4d6a5720ef39119a9af49fafc902fa -rd6455537609ee942efdfd776753214f1a7be334c --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision 29b65975bb4d6a5720ef39119a9af49fafc902fa) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision d6455537609ee942efdfd776753214f1a7be334c) @@ -266,8 +266,12 @@ // Direction change while pump is running is not allowed if ( ( FALSE == isDialOutPumpOn ) || ( 0 == flowRate ) || ( dir == dialOutPumpDirectionSet ) ) { - F32 pwmDC = ( 0 == flowRate ? DOP_PWM_ZERO_OFFSET : DOP_PWM_FROM_ML_PER_MIN( (F32)flowRate ) ); + F32 pwmDC = getDialInPumpPWMDutyCyclePct( TRUE ); + if ( mode != PUMP_CONTROL_MODE_CLOSED_LOOP ) + { + pwmDC = ( 0 == flowRate ? DOP_PWM_ZERO_OFFSET : DOP_PWM_FROM_ML_PER_MIN( (F32)flowRate ) ); + } // Don't interrupt pump control unless rate or mode is changing if ( ( fabs( pwmDC - dialOutPumpPWMDutyCyclePct ) > NEARLY_ZERO ) || ( mode != dialOutPumpControlMode ) ) { Index: firmware/App/Modes/Dialysis.c =================================================================== diff -u -r726c340ed2bdedd8532a2ee26422e1b70643397f -rd6455537609ee942efdfd776753214f1a7be334c --- firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision 726c340ed2bdedd8532a2ee26422e1b70643397f) +++ firmware/App/Modes/Dialysis.c (.../Dialysis.c) (revision d6455537609ee942efdfd776753214f1a7be334c) @@ -531,8 +531,6 @@ { result = TRUE; sendTreatmentLogEventData( UF_PAUSE_EVENT, setUFRate, 0.0 ); - // Set outlet pump to dialysate rate - setDialOutPumpTargetRate( setDialysateFlowRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Go to UF paused state currentUFState = UF_PAUSED_STATE; sendTreatmentLogEventData( UF_START_RESUME_EVENT, UF_RUNNING_STATE, UF_PAUSED_STATE ); @@ -582,8 +580,6 @@ { result = TRUE; sendTreatmentLogEventData( UF_START_RESUME_EVENT, 0.0, setUFRate ); - // Set outlet pump to dialysate rate + set UF rate - setDialOutPumpTargetRate( setDialysateFlowRate + (S32)setUFRate, MOTOR_DIR_FORWARD, PUMP_CONTROL_MODE_CLOSED_LOOP ); // Restart UF time accumulation for reference volume calculation lastUFTimeStamp = getMSTimerCount(); // Go to UF running state