Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r80a1b6065901ac7a9516a8be17d3db5e4e589455 -rb28aa87957d9f1e5918f68dfebfffb881b80582c --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 80a1b6065901ac7a9516a8be17d3db5e4e589455) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision b28aa87957d9f1e5918f68dfebfffb881b80582c) @@ -76,6 +76,7 @@ // ********** private function prototypes ********** static BOOL areInletWaterConditionsAlarmsActive( void ); +static void checkDGInstitutionalValuesReceived( void ); static DG_STANDBY_MODE_STATE_T handleStandbyIdleState( void ); static DG_STANDBY_MODE_STATE_T handleStandbyFlushFilterState( void ); @@ -173,6 +174,8 @@ standbyState = DG_STANDBY_MODE_STATE_PAUSE; } + checkDGInstitutionalValuesReceived(); + // execute current Standby state switch ( standbyState ) { @@ -235,6 +238,26 @@ /*********************************************************************//** * @brief + * The checkDGInstitutionalValuesReceived function requests the DG institutional + * values from HD if HD is in standby and the values have not been received yet. + * @details Inputs: haveDGInstitutionalValuesBeenRcvd + * @details Outputs: None + * @return none + *************************************************************************/ +static void checkDGInstitutionalValuesReceived( void ) +{ + HD_MODE_SUB_MODE_T mode; + + getHDOperationMode( &mode ); + + if ( ( MODE_STAN >= mode.hdMode ) && ( FALSE == haveDGInstitutionalValuesBeenRcvd ) ) + { + sendDGInstitutionalValuesRequestToHD(); + } +} + +/*********************************************************************//** + * @brief * The handleStandbyIdleState function executes the idle state of the * standby mode state machine. * @details Inputs: pendingSampleWaterRequest, pendingStartDGRequest, @@ -264,18 +287,9 @@ } else if ( TRUE == pendingStartDGRequest ) { - if ( FALSE == haveDGInstitutionalValuesBeenRcvd ) - { - signalSyncToHD(); - // Request the DG institutional values from HD in case DG was not restarted so DG did not request - // the institutional values at POST. Request again here for safety. - sendDGInstitutionalValuesRequestToHD(); - } - else - { - pendingStartDGRequest = FALSE; - requestNewOperationMode( DG_MODE_GENE ); - } + pendingStartDGRequest = FALSE; + signalSyncToHD(); + requestNewOperationMode( DG_MODE_GENE ); } else if ( TRUE == pendingStartDGFlushRequest ) { @@ -500,7 +514,7 @@ { BOOL result = FALSE; - if ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) + if ( ( DG_MODE_STAN == getCurrentOperationMode() ) && ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) ) { result = TRUE; pendingStartDGRequest = TRUE;