Index: firmware/App/Modes/ModeChemicalDisinfect.c =================================================================== diff -u -rd32f890bb6c238c95bcaca54da79d7aa4a1898cb -rbe920d1ab62ea8520093c7c0ab44eba31faea429 --- firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision d32f890bb6c238c95bcaca54da79d7aa4a1898cb) +++ firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision be920d1ab62ea8520093c7c0ab44eba31faea429) @@ -1254,7 +1254,8 @@ * chemical disinfect cancel mode cold water path state. It drains the reservoirs * before the cancel basic path mode is entered. * @details Inputs: rsrvr1Status, rsrvr2Status, cancellationMode, stateTimer - * @details Outputs: rsrvr1Status, rsrvr2Status, cancellationMode, stateTimer + * @details Outputs: rsrvr1Status, rsrvr2Status, cancellationMode, stateTimer, + * haveDrainParamsBeenInit * @return next state of the chemical disinfect state machine *************************************************************************/ static DG_CHEM_DISINFECT_STATE_T handleChemicalDisinfectCancelModeWaterPathState( void ) @@ -1266,10 +1267,12 @@ // Stop all the actuators first then decide who should run next deenergizeActuators( NO_PARK_CONC_PUMPS ); - cancellationMode = CANCELLATION_MODE_WATER; - rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; - rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; - stateTimer = getMSTimerCount(); + haveDrainParamsBeenInit[ DG_RESERVOIR_1 ] = FALSE; + haveDrainParamsBeenInit[ DG_RESERVOIR_2 ] = FALSE; + cancellationMode = CANCELLATION_MODE_WATER; + rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; + rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; + stateTimer = getMSTimerCount(); // The drain is set to start from reservoir 2 setValveState( VRD2, VALVE_STATE_OPEN ); setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); Index: firmware/App/Modes/ModeChemicalDisinfectFlush.c =================================================================== diff -u -rd32f890bb6c238c95bcaca54da79d7aa4a1898cb -rbe920d1ab62ea8520093c7c0ab44eba31faea429 --- firmware/App/Modes/ModeChemicalDisinfectFlush.c (.../ModeChemicalDisinfectFlush.c) (revision d32f890bb6c238c95bcaca54da79d7aa4a1898cb) +++ firmware/App/Modes/ModeChemicalDisinfectFlush.c (.../ModeChemicalDisinfectFlush.c) (revision be920d1ab62ea8520093c7c0ab44eba31faea429) @@ -780,7 +780,7 @@ * chemical disinfect flush cancel mode water path state. * @details Inputs: rsrvr1Status, rsrvr2Status, cancellationMode, stateTimer * @details Outputs: rsrvr1Status, rsrvr2Status, cancellationMode, stateTimer, - * ChemDisinfectFlushUIState + * ChemDisinfectFlushUIState, haveDrainParamsBeenInit * @return next state of the chemical disinfect flush state machine *************************************************************************/ static DG_CHEM_DISINFECT_FLUSH_STATE_T handleChemicalDisinfectFlushCancelModeWaterPathState( void ) @@ -794,9 +794,11 @@ // Stop all the actuators first then decide who should run next deenergizeActuators( NO_PARK_CONC_PUMPS ); - cancellationMode = CANCELLATION_MODE_WATER; - rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; - rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; + haveDrainParamsBeenInit[ DG_RESERVOIR_1 ] = FALSE; + haveDrainParamsBeenInit[ DG_RESERVOIR_2 ] = FALSE; + cancellationMode = CANCELLATION_MODE_WATER; + rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; + rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; // The drain is set to start from reservoir 2 setValveState( VRD2, VALVE_STATE_OPEN ); Index: firmware/App/Modes/ModeFlush.c =================================================================== diff -u -r6df79a0e3853c72bf1c21c9959a7477df4945183 -rbe920d1ab62ea8520093c7c0ab44eba31faea429 --- firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision 6df79a0e3853c72bf1c21c9959a7477df4945183) +++ firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision be920d1ab62ea8520093c7c0ab44eba31faea429) @@ -849,7 +849,7 @@ * @details Inputs: rsrvr1Status, rsrvr2Status, stateTimer, * hasWaterCancellationBeenSet * @details Outputs: rsrvr1Status, rsrvr2Status, stateTimer, - * hasWaterCancellationBeenSet + * hasWaterCancellationBeenSet, haveDrainParamsBeenInit * @return next state of the flush state machine *************************************************************************/ static DG_FLUSH_STATE_T handleFlushModeCancelWaterPathState( void ) @@ -868,8 +868,10 @@ setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); // Set both reservoirs to be considered as full - rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; - rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; + haveDrainParamsBeenInit[ DG_RESERVOIR_1 ] = FALSE; + haveDrainParamsBeenInit[ DG_RESERVOIR_2 ] = FALSE; + rsrvr1Status = DG_RESERVOIR_ABOVE_TARGET; + rsrvr2Status = DG_RESERVOIR_ABOVE_TARGET; // Water cancellation path was set hasWaterCancellationBeenSet = TRUE;