Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -raa36ab1ed13d099286cedcbd066f7dce11146d13 -r8f95cb0d5ca434bdaf3e157e399e017d12212d3d --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision aa36ab1ed13d099286cedcbd066f7dce11146d13) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 8f95cb0d5ca434bdaf3e157e399e017d12212d3d) @@ -228,17 +228,23 @@ /*********************************************************************//** * @brief * The startDGHeatDisinfect function starts heat disinfect mode. - * @details - * Inputs: none - * Outputs: none + * @ details Inputs: standbyState + * @ details Outputs: none * @return: TRUE if the switch was successful *************************************************************************/ BOOL startDGHeatDisinfect( void ) { - // TODO: make sure DG is not in the middle of something and it is in standby - requestNewOperationMode( DG_MODE_HEAT ); + BOOL result = FALSE; - return TRUE; // TODO Check whether it is the right request before switching + // If DG is in standby mode and the standby mode is in Idle state, request DG heat disinfection + if ( DG_MODE_STAN == getCurrentOperationMode() && DG_STANDBY_MODE_STATE_IDLE == standbyState ) + { + requestNewOperationMode( DG_MODE_HEAT ); + + result = TRUE; + } + + return result; } /*********************************************************************//**