Index: firmware/App/Controllers/DialOutFlow.c =================================================================== diff -u -rda838b2d59d8b12a239cd31f8b68b2b1bf78e4ae -rd4c8e0246e5bc34d1ef6a2e1709647716c84a378 --- firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision da838b2d59d8b12a239cd31f8b68b2b1bf78e4ae) +++ firmware/App/Controllers/DialOutFlow.c (.../DialOutFlow.c) (revision d4c8e0246e5bc34d1ef6a2e1709647716c84a378) @@ -284,7 +284,6 @@ dialOutPumpControlMode = mode; // Set PWM duty cycle target to an estimated initial target to ramp to based on target flow rate - then we will control to flow when ramp completed dialOutPumpPWMDutyCyclePct = pwmDC; - dialOutPumpPWMDutyCyclePct = MIN( dialOutPumpPWMDutyCyclePct, MAX_DIAL_OUT_PUMP_PWM_DUTY_CYCLE ); switch ( dialOutPumpState ) { @@ -866,7 +865,7 @@ U16 incDelta = ( dopMotorHallSensorCount >= dopLastMotorHallSensorCounts[ nextIdx ] ? \ dopMotorHallSensorCount - dopLastMotorHallSensorCounts[ nextIdx ] : \ ( HEX_64_K - dopLastMotorHallSensorCounts[ nextIdx ] ) + dopMotorHallSensorCount ); - U16 decDelta = HEX_64_K - incDelta; + U16 decDelta = ( 0 == incDelta ? 0xFFFF : HEX_64_K - incDelta ); U16 delta; // Determine dialysate outlet pump speed/direction from delta hall sensor count since last interval