Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -ra37189e75de205982befcc91176f33c0523b03a8 -rfe7cf171a4c7736ee5c342cf33b7b44869c0826b --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision a37189e75de205982befcc91176f33c0523b03a8) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision fe7cf171a4c7736ee5c342cf33b7b44869c0826b) @@ -797,16 +797,46 @@ HD_STANDBY_STATE_T state = STANDBY_WAIT_FOR_TREATMENT_STATE; DG_OP_MODE_T dgOperationMode = getDGOpMode(); - // If DG is filling while we are in standby mode, abort the fill - if ( DG_MODE_FILL == dgOperationMode ) + switch ( dgOperationMode ) { - cmdStopDGFill(); - } + case DG_MODE_FILL: + // If DG is filling while we are in standby mode, abort the fill + cmdStopDGFill(); + break; - // If DG is in idle generation state while we are in standby mode, transition DG to standby too - if ( DG_MODE_GENE == dgOperationMode ) - { - cmdStopDG(); + case DG_MODE_GENE: + // If DG is in idle generation state while we are in standby mode, transition DG to standby too + cmdStopDG(); + break; + + // If DG is any of the cleaning modes, set the HD standby to be in the corresponding cleaning mode + case DG_MODE_FLUS: + state = STANDBY_WAIT_FOR_DG_FLUSH_TO_START_STATE; + break; + + case DG_MODE_HEAT: + state = STANDBY_WAIT_FOR_DG_HEAT_DISINFECT_TO_START_STATE; + break; + + case DG_MODE_CHEM: + state = STANDBY_WAIT_FOR_DG_CHEM_DISINFECT_TO_START_STATE; + break; + + case DG_MODE_CHFL: + state = STANDBY_WAIT_FOR_DG_CHEM_DISINFECT_FLUSH_TO_START_STATE; + break; + + case DG_MODE_HCOL: + //state = TODO add + break; + + case DG_MODE_ROPS: + // state = TODO add + break; + + default: + // Do nothing. There are other DG modes that HD standby does not need to act upon them. + break; } // If DG is communicating and we don't yet have DG version info, request it