Index: firmware/App/Modes/ModeHeatDisinfectActiveCool.c =================================================================== diff -u -r5109bb981cab2025fcb9de33e303d046085efa18 -r475fae57bc2a2bdd022b16591877ea6e63503bb6 --- firmware/App/Modes/ModeHeatDisinfectActiveCool.c (.../ModeHeatDisinfectActiveCool.c) (revision 5109bb981cab2025fcb9de33e303d046085efa18) +++ firmware/App/Modes/ModeHeatDisinfectActiveCool.c (.../ModeHeatDisinfectActiveCool.c) (revision 475fae57bc2a2bdd022b16591877ea6e63503bb6) @@ -1110,10 +1110,19 @@ { F32 THdTemperatureC = getTemperatureValue( TEMPSENSORS_HEAT_DISINFECT ); - if ( ( THdTemperatureC <= ROF_ACTIVE_COOL_TARGET_TEMP_C ) && ( FALSE == tempBelowTarget.hasTempTargetTimeBeenSet ) ) + if ( THdTemperatureC <= ROF_ACTIVE_COOL_TARGET_TEMP_C ) { + // If THd is below the target and the timer for stable temperature has not been set, set it + if ( FALSE == tempBelowTarget.hasTempTargetTimeBeenSet ) + { + tempBelowTarget.tempBelowTargetStartTimeMS = getMSTimerCount(); + tempBelowTarget.hasTempTargetTimeBeenSet = TRUE; + } + } + else + { + // The temperature is still above the target so keep reseting the timer tempBelowTarget.tempBelowTargetStartTimeMS = getMSTimerCount(); - tempBelowTarget.hasTempTargetTimeBeenSet = TRUE; } if ( DG_RESERVOIR_BELOW_TARGET == rsrvrsStatus.rsrvr[ rsrvrID ].rStatus )