Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -rb156b12139fea40401c94b512503a2ceced69e22 -rded084860cbbde7fc763859c7c0991f13d77c8f9 --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision b156b12139fea40401c94b512503a2ceced69e22) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision ded084860cbbde7fc763859c7c0991f13d77c8f9) @@ -1527,15 +1527,10 @@ **************************************************************************/ static BOOL setDialInPumpToFixedPWM( F32 pwm ) { - MOTOR_DIR_T dir = MOTOR_DIR_FORWARD; + MOTOR_DIR_T dir = ( pwm < 0.0F ? MOTOR_DIR_REVERSE : MOTOR_DIR_FORWARD ); BOOL result = FALSE; F32 pwmFabs = fabs(pwm); - if ( pwm < 0 ) - { - dir = MOTOR_DIR_REVERSE; - } - // Direction change while pump is running is not allowed unless we are turning off if ( ( FALSE == isDialInPumpOn ) && ( dir != dialInPumpDirectionSet ) ) { @@ -1919,14 +1914,12 @@ BOOL result = FALSE; F32 absolutePWM = fabs( pwmPct ); - if ( TRUE == isTestingActivated() ) + // check for max of pump pwm for acceptance. *** Function used in dialyzer re-prime, so no Dialin login required *** + if ( absolutePWM < MAX_DIAL_IN_PUMP_PWM_DUTY_CYCLE ) { - // check for max of pump pwm for acceptance. - if ( absolutePWM < MAX_DIAL_IN_PUMP_PWM_DUTY_CYCLE ) - { - result = setDialInPumpToFixedPWM( pwmPct ); - } + result = setDialInPumpToFixedPWM( pwmPct ); } + return result; }