Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r8126d8e97c5626d71c7b807fa9f95601248d6dbb -r45517234d6f05c3dad87f4206c790a771b2057da --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 8126d8e97c5626d71c7b807fa9f95601248d6dbb) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 45517234d6f05c3dad87f4206c790a771b2057da) @@ -49,7 +49,7 @@ #define DISINFECTS_DATA_PUB_INTERVAL ( 1 * MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Disinfects data publish interval in counts. #define DISINFECTS_TIME_INTERVAL_S ( 3 * SECONDS_IN_A_DAY ) ///< HD/DG 3-day service interval in seconds. -#define FLUSH_TIME_INTERVAL_S ( 30 * SEC_PER_MIN ) ///< Flush time interval in seconds. +#define FLUSH_TIME_INTERVAL_S ( 2 * MIN_PER_HOUR * SEC_PER_MIN ) ///< Flush time interval in seconds. #define MAX_ALLOWED_RO_FILTER_TEMP_FOR_TX_C 44.0F ///< Maximum allowed temperature to start a treatment in C. /// DG cleaning mode status data structure @@ -1165,7 +1165,9 @@ BOOL isBasicFlushValid = ( ( currentRTCEpochTimeS - lastFlushCompleteDateS ) < FLUSH_TIME_INTERVAL_S ? TRUE : FALSE ); BOOL isChemFlushValid = ( ( currentRTCEpochTimeS - lastChemFlushCompleteDateS ) < FLUSH_TIME_INTERVAL_S ? TRUE : FALSE ); BOOL isHeatDisCoolFlushValid = ( ( currentRTCEpochTimeS - lastHeatCoolCompleteDateS ) < FLUSH_TIME_INTERVAL_S ? TRUE : FALSE ); - BOOL isFlushValid = ( ( TRUE == isBasicFlushValid ) || ( TRUE == isChemFlushValid ) || ( TRUE == isHeatDisCoolFlushValid ) ? TRUE : FALSE ); + BOOL isHeatDisFlushValid = ( ( currentRTCEpochTimeS - lastHeatCompleteDateS ) < FLUSH_TIME_INTERVAL_S ? TRUE : FALSE ); + BOOL isFlushValid = ( ( ( TRUE == isBasicFlushValid ) || ( TRUE == isChemFlushValid ) || ( TRUE == isHeatDisCoolFlushValid ) || + ( TRUE == isHeatDisFlushValid ) ) ? TRUE : FALSE ); // If all of the above conditions are true, it means we can start a treatment if ( ( TRUE == hasDisBeenDone ) && ( TRUE == isHeatDisValid ) && ( TRUE == isChemFlushComplete ) && ( TRUE == isFlushValid ) )