Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r72ba5f3c63325b00306b544b2513c03500919d06 -rcb4d35cc50df2d3cc9e828cd92e53cf456ca9b9d --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 72ba5f3c63325b00306b544b2513c03500919d06) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision cb4d35cc50df2d3cc9e828cd92e53cf456ca9b9d) @@ -44,8 +44,6 @@ #define MAX_WATER_SAMPLE_TIME_MS ( 10 * MS_PER_SECOND ) ///< Maximum duration of water sample state (in ms). #define FLUSH_EXPIRATION_TIME_MS ( 10 * SEC_PER_MIN * MS_PER_SECOND ) ///< Duration in which a filter flush is valid (in ms). #define FILTER_FLUSH_DATA_PUBLISH_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) ///< Filter flush data broadcast interval. -// Milliseconds was too big, greater than U32 -#define DG_SRVC_TIME_INTERVAL_S ( 6 * 30 * SECONDS_IN_A_DAY ) ///< DG service interval in seconds. ( 6 months with 30 days each). // ********** private data ********** @@ -73,9 +71,6 @@ static DG_STANDBY_MODE_STATE_T handleStandbyFlushFilterIdleState( void ); static DG_STANDBY_MODE_STATE_T handleStandbySampleWaterState( void ); -static BOOL isDisinfectValid( void ); -static BOOL isServiceTimeValid( void ); - /*********************************************************************//** * @brief * The initStandbyMode function initializes the standby mode module. @@ -322,60 +317,6 @@ /*********************************************************************//** * @brief - * The isDisinfectValid function checks whether the last disinfect has been - * voided or not - * @details Inputs: none - * @details Outputs: none - * @return TRUE if the disinfect is still valid otherwise, FALSE - ***********************************************************************/ -static BOOL isDisinfectValid( void ) -{ - BOOL status = TRUE; - DG_USAGE_INFO_RECORD_T dgUsageInfo; - - // No need to check the CRC of the record because the record'sCRC has been checked in NV POST. - getNVRecord2Driver( GET_USAGE_RECORD, (U08*)&dgUsageInfo, sizeof( DG_USAGE_INFO_RECORD_T ), 0, ALARM_ID_NO_ALARM ); - - if ( FALSE == dgUsageInfo.isDisinfected ) - { - status = FALSE; - - activateAlarmNoData( ALARM_ID_DG_DISINFECT_HAS_BEEN_EXPIRED ); - } - - return status; -} - -/*********************************************************************//** - * @brief - * The isServiceTimeValid function checks whether the last service time is - * still within the interval or not. - * @details Inputs: none - * @details Outputs: none - * @return TRUE if the service time is still valid otherwise, FALSE - ***********************************************************************/ -static BOOL isServiceTimeValid( void ) -{ - BOOL status = TRUE; - DG_SERVICE_RECORD_T dgServiceRecord; - - // No need to check the CRC of the record because the record'sCRC has been checked in NV POST. - getNVRecord2Driver( GET_SRV_RECORD, (U08*)&dgServiceRecord, sizeof( DG_SERVICE_RECORD_T ), 0, ALARM_ID_NO_ALARM ); - - if ( ( ( getRTCTimestamp() - dgServiceRecord.lastServiceEpochDate ) / MS_PER_SECOND > DG_SRVC_TIME_INTERVAL_S ) || - ( 0 == dgServiceRecord.lastServiceEpochDate ) ) - { - // Compare the current time in epoch to the last service data in epoch and convert them to seconds - status = FALSE; - - activateAlarmNoData( ALARM_ID_DG_SERIVCE_TIME_INTERVAL_HAS_ELAPSED ); - } - - return status; -} - -/*********************************************************************//** - * @brief * The requestWaterSample function handles an HD request to sample water. * @details Inputs: standbyState * @details Outputs: pendingSampleWaterRequest @@ -445,22 +386,7 @@ BOOL requestDGStart( void ) { BOOL result = FALSE; - BOOL disinfectStatus = TRUE; - BOOL serviceStatus = TRUE; -/*#ifndef _RELEASE_ - if ( SW_CONFIG_ENABLE_VALUE == getSoftwareConfigStatus( SW_CONFIG_DISABLE_SERVICE_AND_DISINFECT_CHECK ) ) - { - disinfectStatus = TRUE; - serviceStatus = TRUE; - } - else -#endif - { - disinfectStatus = isDisinfectValid(); - serviceStatus = isServiceTimeValid(); - }*/ - if ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) { result = TRUE;