Index: firmware/App/Controllers/DialInFlow.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -r4add9605a250a0b953217c8673204b705128561b --- firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Controllers/DialInFlow.c (.../DialInFlow.c) (revision 4add9605a250a0b953217c8673204b705128561b) @@ -179,7 +179,6 @@ static MOTOR_DIR_T dialInPumpDirectionSet = MOTOR_DIR_FORWARD; ///< Currently set dialysate flow direction static PUMP_CONTROL_MODE_T dialInPumpControlMode = PUMP_CONTROL_MODE_CLOSED_LOOP; ///< Requested dialIn pump control mode. static PUMP_CONTROL_MODE_T dialInPumpControlModeSet = PUMP_CONTROL_MODE_CLOSED_LOOP; ///< Currently set dialIn pump control mode. -static BOOL isTestPWMSet = FALSE; ///< Using PWM to set the rate instead of target flow. /// Interval (in ms) at which to publish dialIn flow data to CAN bus static OVERRIDE_U32_T dialInFlowDataPublishInterval = { DIAL_IN_FLOW_DATA_PUB_INTERVAL, DIAL_IN_FLOW_DATA_PUB_INTERVAL, DIAL_IN_FLOW_DATA_PUB_INTERVAL, 0 }; @@ -256,7 +255,6 @@ U32 i; dialInFlowDataPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; - isTestPWMSet = FALSE; signalDialInPumpHardStop(); setDialInPumpDirection( MOTOR_DIR_FORWARD ); @@ -288,8 +286,7 @@ * The setDialInPumpTargetFlowRate function sets a new target flow rate and * pump direction. * @details Inputs: isDialInPumpOn, dialInPumpDirectionSet - * @details Outputs: targetDialInFlowRate, dialInPumpdirection, - * dialInPumpPWMDutyCyclePct, isTestPWMSet + * @details Outputs: targetDialInFlowRate, dialInPumpdirection, dialInPumpPWMDutyCyclePct * @param flowRate new target dialIn flow rate * @param dir new dialIn flow direction * @param mode new control mode @@ -309,7 +306,6 @@ { BOOL isFlowRateInRange = ( flowRate <= MAX_DIAL_IN_FLOW_RATE ? TRUE : FALSE ); - isTestPWMSet = FALSE; #ifndef _RELEASE_ if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_PUMPS_FLOW_LIMITS ) ) { @@ -606,8 +602,7 @@ DIAL_IN_PUMP_STATE_T result = DIAL_IN_PUMP_OFF_STATE; // If we have been given a flow rate, setup ramp up and transition to ramp up state - if ( ( targetDialInFlowRate != 0 ) || - ( TRUE == isTestPWMSet ) ) + if ( targetDialInFlowRate != 0 ) { // Set initial PWM duty cycle dialInPumpPWMDutyCyclePctSet = DIP_PWM_ZERO_OFFSET + MAX_DIAL_IN_PUMP_PWM_STEP_UP_CHANGE; @@ -635,8 +630,7 @@ DIAL_IN_PUMP_STATE_T result = DIAL_IN_PUMP_RAMPING_UP_STATE; // Have we been asked to stop the dialIn pump? - if ( ( 0 == targetDialInFlowRate ) && - ( FALSE == isTestPWMSet ) ) + if ( 0 == targetDialInFlowRate ) { // Start ramp down to stop dialInPumpPWMDutyCyclePctSet -= MAX_DIAL_IN_PUMP_PWM_STEP_DN_CHANGE; @@ -1586,16 +1580,6 @@ dialInPumpPWMDutyCyclePct = RANGE( pwmFabs, MIN_DIAL_IN_PUMP_PWM_DUTY_CYCLE, MAX_DIAL_IN_PUMP_PWM_DUTY_CYCLE ); targetDialInFlowRate = DIP_ML_PER_MIN_FROM_PWM( pwmFabs ); - // clear test flag if we are turning off the pump. - if ( pwmFabs <= MIN_DIAL_IN_PUMP_PWM_DUTY_CYCLE ) - { - isTestPWMSet = FALSE; - } - else - { - isTestPWMSet = TRUE; - } - switch ( dialInPumpState ) { case DIAL_IN_PUMP_RAMPING_UP_STATE: // See if we need to reverse direction of ramp