Index: firmware/App/Modes/ModeGenIdle.c =================================================================== diff -u -r94a190522ce398399c7b93c59f788d7666ec0060 -re59287e5915e01c44af22fc54eafc29cb0f6c2c0 --- firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision 94a190522ce398399c7b93c59f788d7666ec0060) +++ firmware/App/Modes/ModeGenIdle.c (.../ModeGenIdle.c) (revision e59287e5915e01c44af22fc54eafc29cb0f6c2c0) @@ -25,6 +25,7 @@ #include "NVDataMgmt.h" #include "OperationModes.h" #include "Pressures.h" +#include "Reservoirs.h" #include "ROPump.h" #include "SystemComm.h" #include "TaskGeneral.h" @@ -107,8 +108,8 @@ // because the initial guess in the heaters driver needs the target flow to calculate // the new PWMs for the main and small primary heaters #ifndef DISABLE_FLOW_CONTROL_TREATMENT - setROPumpTargetFlowRate( TARGET_FLUSH_LINES_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); - setHeaterTargetTemperature( DG_PRIMARY_HEATER, 39.0 ); // TODO remove this line. It comes form HD this for testing only + setROPumpTargetFlowRateLPM( TARGET_FLUSH_LINES_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); + setHeaterTargetTemperature( DG_PRIMARY_HEATER, getPrimaryHeaterTargetTemperature() ); startHeater( DG_PRIMARY_HEATER ); #endif @@ -207,7 +208,7 @@ static DG_GEN_IDLE_MODE_STATE_T handleFlushLinesState( void ) { DG_GEN_IDLE_MODE_STATE_T result = DG_GEN_IDLE_MODE_STATE_FLUSH_LINES; - F32 waterFlowRate = getMeasuredROFlowRate(); + F32 waterFlowRate = getMeasuredROFlowRateLPM(); F32 waterVolume = ( ( waterFlowRate / SEC_PER_MIN ) / ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ); // Integrate volume of water moved through line @@ -217,7 +218,7 @@ if ( flushLinesVolumeL >= getFlushLineVolume() ) { #ifndef DISABLE_FLOW_CONTROL_TREATMENT - setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); + setROPumpTargetFlowRateLPM( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); #endif result = DG_GEN_IDLE_MODE_STATE_FLUSH_WATER; }