Index: firmware/App/Controllers/ROPump.c =================================================================== diff -u -r353d01d31bc69d4d1901ff09097ee610bb1c9dbc -re59287e5915e01c44af22fc54eafc29cb0f6c2c0 --- firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision 353d01d31bc69d4d1901ff09097ee610bb1c9dbc) +++ firmware/App/Controllers/ROPump.c (.../ROPump.c) (revision e59287e5915e01c44af22fc54eafc29cb0f6c2c0) @@ -383,7 +383,7 @@ // but the pump is not able to achieve the flow. if ( ( PUMP_CONTROL_MODE_CLOSED_LOOP == roPumpControlMode ) && ( RO_PUMP_CONTROL_TO_TARGET_FLOW_STATE == roPumpState ) ) { - F32 currentFlow = getMeasuredROFlowRate(); + F32 currentFlow = getMeasuredROFlowRateLPM(); F32 targetFlow = getTargetROPumpFlowRate(); // The flow cannot be out of range for than 10% of the target flow BOOL isFlowOutOfRange = ( fabs( 1.0 - ( currentFlow / targetFlow ) ) > MAX_ALLOWED_FLOW_DEVIATION ? TRUE : FALSE ); @@ -534,12 +534,12 @@ /*********************************************************************//** * @brief - * The getMeasuredROFlowRate function gets the measured RO pump flow rate. + * The getMeasuredROFlowRateLPM function gets the measured RO pump flow rate. * @details Inputs: measuredROFlowRateLPM * @details Outputs: measuredROFlowRateLPM * @return the current RO pump flow rate (in L/min). *************************************************************************/ -F32 getMeasuredROFlowRate( void ) +F32 getMeasuredROFlowRateLPM( void ) { return getF32OverrideValue( &measuredROFlowRateLPM ); } @@ -608,7 +608,7 @@ // Get the current pressure from the sensor F32 actualPressure = getMeasuredDGPressure( PRESSURE_SENSOR_RO_PUMP_OUTLET ); F32 targetFlowRate = getTargetROPumpFlowRate(); - F32 actualFlowRate = (F32)getMeasuredROFlowRate(); + F32 actualFlowRate = (F32)getMeasuredROFlowRateLPM(); F32 flowRateDeviation = fabs( targetFlowRate - actualFlowRate ) / targetFlowRate; BOOL isFlowOutOfRange = flowRateDeviation > ROP_FLOW_TARGET_TOLERANCE; @@ -674,7 +674,7 @@ } else { - roPumpDutyCyclePctSet = runPIController( PI_CONTROLLER_ID_RO_PUMP_FLOW, getTargetROPumpFlowRate(), getMeasuredROFlowRate() ); + roPumpDutyCyclePctSet = runPIController( PI_CONTROLLER_ID_RO_PUMP_FLOW, getTargetROPumpFlowRate(), getMeasuredROFlowRateLPM() ); } setROPumpControlSignalDutyCycle( roPumpDutyCyclePctSet ); @@ -710,7 +710,7 @@ } else { - roPumpDutyCyclePctSet = runPIController( PI_CONTROLLER_ID_RO_PUMP_MAX_PRES, getTargetROPumpFlowRate(), getMeasuredROFlowRate() ); + roPumpDutyCyclePctSet = runPIController( PI_CONTROLLER_ID_RO_PUMP_MAX_PRES, getTargetROPumpFlowRate(), getMeasuredROFlowRateLPM() ); } setROPumpControlSignalDutyCycle( roPumpDutyCyclePctSet ); @@ -852,7 +852,7 @@ pumpData.roPumpTgtFlowRate = getTargetROPumpFlowRate(); pumpData.roPumpTgtPressure = getTargetROPumpPressure(); - pumpData.measROFlowRate = getMeasuredROFlowRate(); + pumpData.measROFlowRate = getMeasuredROFlowRateLPM(); pumpData.roPumpDutyCycle = roPumpDutyCyclePctSet * FRACTION_TO_PERCENT_FACTOR; pumpData.roPumpState = (U32)roPumpState; pumpData.roPumpFBDutyCycle = roPumpFeedbackDutyCyclePct * FRACTION_TO_PERCENT_FACTOR;