Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -rc3124bd5c4db8877f2aeb769cc8ac5baebbb044b -r2760c0a8db7842773a63e726f510e875d8555524 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision c3124bd5c4db8877f2aeb769cc8ac5baebbb044b) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 2760c0a8db7842773a63e726f510e875d8555524) @@ -286,7 +286,7 @@ RO_PUMP_STATE_T state = RO_PUMP_CONTROL_TO_TARGET_FLOW_STATE; F32 nexttgtflow = 0.0; F32 currentFlowRate = 0.0; - F32 flowRateSeventyFivePercent = 0.0; + F32 adjustedFlowRRate = 0.0; BOOL isFlowRateLow = FALSE; // Check if need to switch control modes @@ -311,10 +311,10 @@ else if ( ++roControlTimerCounter >= ROP_CONTROL_INTERVAL ) { currentFlowRate = getFilteredFlow( P16_FLOW ); - flowRateSeventyFivePercent = (F32)getTargetROPumpFlowRateMLPM() * ROP_MIN_FLOW_TO_CONTROL_PCT; + adjustedFlowRRate = (F32)getTargetROPumpFlowRateMLPM() * ROP_MIN_FLOW_TO_CONTROL_PCT; // P16 flow seems to lag in current Leahi HW. We will wait till we hit a % of target flow before we start changing control. - if( ( TRUE == roPumpStartControl ) || ( currentFlowRate >= ( flowRateSeventyFivePercent ) ) ) + if( ( TRUE == roPumpStartControl ) || ( currentFlowRate >= ( adjustedFlowRRate ) ) ) { roPumpDutyCyclePctSet = runPIController( PI_CONTROLLER_ID_RO_PUMP_FLOW, (F32)getTargetROPumpFlowRateMLPM(), currentFlowRate ); roPumpDutyCyclePctSet = MIN( roPumpDutyCyclePctSet, ( MAX_FLUID_PUMP_PWM_DUTY_CYCLE * MAX_FLUID_PUMP_DUTY_CYCLE_PCT ) ); @@ -329,8 +329,8 @@ //is flow rate less than 75% of the target flow rate // wait for 10 seconds for timeout - isFlowRateLow = ( ( currentFlowRate < ( flowRateSeventyFivePercent ) ) ? TRUE : FALSE); - checkPersistentAlarm( ALARM_ID_FP_PERMEATE_FLOW_RATE_BELOW_TARGET, isFlowRateLow, currentFlowRate, flowRateSeventyFivePercent); + isFlowRateLow = ( ( currentFlowRate < ( adjustedFlowRRate ) ) ? TRUE : FALSE); + checkPersistentAlarm( ALARM_ID_FP_PERMEATE_FLOW_RATE_BELOW_TARGET, isFlowRateLow, currentFlowRate, adjustedFlowRRate); } return state;