Index: firmware/App/Modes/ModeHeatDisinfect.c =================================================================== diff -u -rd4e7cd17654a007b5e140e32bd368751dca7977a -r96d28944079164510a0742a7fcc6af11d7396d4b --- firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision d4e7cd17654a007b5e140e32bd368751dca7977a) +++ firmware/App/Modes/ModeHeatDisinfect.c (.../ModeHeatDisinfect.c) (revision 96d28944079164510a0742a7fcc6af11d7396d4b) @@ -1465,6 +1465,15 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectNocturnalCoolIdleState function handles the heat + * disinfect nocturnal cool idel state. In this state, heat disinfect idles + * until the specified time has elapsed to transition the next state. + * @details Inputs: stateTimer + * @details Outputs: stateTimer + * @return next state of the heat disinfect state machine + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectNocturnalCoolIdleState( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_NOCTURNAL_COOL_IDLE; @@ -1484,6 +1493,18 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectNocturnalCoolCheckWaterTempState function handles + * the heat disinfect nocturnal cool check the water temperature state. + * In this state, the fluid is run for the specified period of time and then + * TDi and THd temperature sensor values are averaged. If the values are less + * than the specified values then the state machine transitions to the next + * state, otherwise it transitions to the nocturnal cool idle state. + * @details Inputs: noctHeatDisStatus, stateTimer + * @details Outputs: noctHeatDisStatus, stateTimer + * @return next state of the heat disinfect state machine + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectNocturnalCoolCheckWaterTempState( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_NOCTURNAL_COOL_CHECK_WATER_TEMP; @@ -1521,6 +1542,17 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectNocturnalCoolDrainR1State function handles + * the heat disinfect nocturnal cool drain R1 state. + * In this state, reservoir 1 is drained and if the drain is complete within + * the specified time then it transitions to the next state otherwise, it + * transitions to the cancel basic path state. + * @details Inputs: stateTimer + * @details Outputs: stateTimer, rsrvr1Status, prevHeatDisinfectState + * @return next state of the heat disinfect state machine + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectNocturnalCoolDrainR1State( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_NOCTURNAL_COOL_DRAIN_R1; @@ -1544,6 +1576,17 @@ return state; } +/*********************************************************************//** + * @brief + * The handleHeatDisinfectNocturnalCoolDrainR2State function handles + * the heat disinfect nocturnal cool drain R2 state. + * In this state, reservoir 2 is drained and if the drain is complete within + * the specified time then it transitions to the next state otherwise, it + * transitions to the cancel basic path state. + * @details Inputs: stateTimer + * @details Outputs: stateTimer, rsrvr2Status, prevHeatDisinfectState + * @return next state of the heat disinfect state machine + *************************************************************************/ static DG_HEAT_DISINFECT_STATE_T handleHeatDisinfectNocturnalCoolDrainR2State( void ) { DG_HEAT_DISINFECT_STATE_T state = DG_HEAT_DISINFECT_STATE_NOCTURNAL_COOL_DRAIN_R2; @@ -2190,7 +2233,7 @@ uiData.r82CountdownTimeS = ( 0 == timeStatus[ RSRVR_AT_82_C ].startTimeMS ? 0 : ( timeStatus[ RSRVR_AT_82_C ].targetTimeMS - calcTimeSince( timeStatus[ RSRVR_AT_82_C ].startTimeMS ) ) / 1000 ); data.R1FillLevel = rsrvr1RefVolML; data.R2FillLevel = rsrvr2RefVolML; - data.noctHeatDisinfectStatus = noctHeatDisStatus.isNocturnalHeatDisRqustd; + data.noctHeatDisinfectStatus = (U32)noctHeatDisStatus.isNocturnalHeatDisRqustd; broadcastData( MSG_ID_DG_HEAT_DISINFECT_DATA, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&data, sizeof( MODE_HEAT_DISINFECT_DATA_T ) ); broadcastData( MSG_ID_DG_HEAT_DISINFECT_TIME_DATA, COMM_BUFFER_OUT_CAN_DG_2_UI, (U08*)&uiData, sizeof( MODE_HEAT_DISINFECT_UI_DATA_T ) ); @@ -2280,6 +2323,7 @@ break; case DG_HEAT_DISINFECT_STATE_NOCTURNAL_COOL_CHECK_WATER_TEMP: + setValveState( VBF, VALVE_STATE_OPEN ); setValveState( VPO, VALVE_STATE_FILL_C_TO_NC ); setValveState( VRF, VALVE_STATE_R2_C_TO_NO ); setValveState( VRO, VALVE_STATE_R2_C_TO_NC ); @@ -2321,6 +2365,15 @@ } } +/*********************************************************************//** + * @brief + * The areThereAnyDGPumpsAlarm function handles whether there are any RO and/or + * drain pump alarms are triggered. + * @details Inputs: none + * @details Outputs: none + * @return TRUE if any of the RO and/or drain pump alarms are triggered otherwise, FALSE + *************************************************************************/ + static BOOL areThereAnyDGPumpsAlarm( void ) { BOOL status = FALSE;