Index: firmware/App/Modes/ModeRecirculate.c =================================================================== diff -u -rf1a45ef5ae450c31c0757ca9bac414f12d5844dd -r476da1c222d2af6833d9e66a637c977bf927188f --- firmware/App/Modes/ModeRecirculate.c (.../ModeRecirculate.c) (revision f1a45ef5ae450c31c0757ca9bac414f12d5844dd) +++ firmware/App/Modes/ModeRecirculate.c (.../ModeRecirculate.c) (revision 476da1c222d2af6833d9e66a637c977bf927188f) @@ -44,7 +44,7 @@ #define TARGET_RO_FLOW_RATE_L 0.3 ///< Target flow rate for RO pump. #define TARGET_FLUSH_LINES_RO_FLOW_RATE_L 0.6 ///< Target flow rate for RO pump. -#define FLUSH_LINES_VOLUME_L 0.1 ///< Water volume (in Liters) to flush when starting re-circulate mode. +#define FLUSH_LINES_VOLUME_L 0.01 ///< Water volume (in Liters) to flush when starting re-circulate mode. // ********** private data ********** @@ -95,16 +95,21 @@ setValveStateDelayed( VRD1, VALVE_STATE_CLOSED, 0 ); setValveStateDelayed( VRD2, VALVE_STATE_CLOSED, 0 ); #endif - setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); signalDrainPumpHardStop(); requestConcentratePumpsOff( CONCENTRATEPUMPS_CP1_ACID ); requestConcentratePumpsOff( CONCENTRATEPUMPS_CP2_BICARB ); - // UV on + // UV reactors on turnOnUVReactor( INLET_UV_REACTOR ); turnOnUVReactor( OUTLET_UV_REACTOR ); + // NOTE: The target flow rate should be set prior to setting the start primary heater + // because the initial guess in the heaters driver needs the target flow to calculate + // the new PWMs for the main and small primary heaters + setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); + startPrimaryHeater(); + #ifndef _VECTORCAST_ { // TODO - test code to start the fan since we're turning the heater on F32 fanPWM = 0.25; @@ -177,7 +182,9 @@ // when enough water volume has flowed to flush the lines, transition to re-circ state if ( flushLinesVolumeL >= FLUSH_LINES_VOLUME_L ) { +#ifndef SKIP_RECIRC setValveState( VDR, VALVE_STATE_RECIRC_C_TO_NC ); +#endif setROPumpTargetFlowRate( TARGET_RO_FLOW_RATE_L, TARGET_RO_PRESSURE_PSI ); result = DG_RECIRCULATE_MODE_STATE_RECIRC_WATER; }