Index: firmware/App/Modes/ModeStandby.c =================================================================== diff -u -r9f01014483a2ec46a19bdb7ce7ab97b007f83cbd -rdaf4763d6f40baf4cbc2f9d88aba7d9faf588ad6 --- firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision 9f01014483a2ec46a19bdb7ce7ab97b007f83cbd) +++ firmware/App/Modes/ModeStandby.c (.../ModeStandby.c) (revision daf4763d6f40baf4cbc2f9d88aba7d9faf588ad6) @@ -558,16 +558,16 @@ BOOL startDGChemicalDisinfectFlush( void ) { BOOL status = FALSE; + DG_CMD_RESPONSE_T cmdResponse; + cmdResponse.commandID = DG_CMD_START_CHEM_DISINFECT_FLUSH; + cmdResponse.rejected = FALSE; + cmdResponse.rejectCode = DG_CMD_REQUEST_REJECT_REASON_NONE; + // If DG is in standby mode and the standby mode is in Idle, request chemical disinfect flush // Chemical disinfect flush cannot be run in solo mode because the user has to confirm that the acid is inserted or removed if ( ( DG_MODE_STAN == getCurrentOperationMode() ) && ( DG_STANDBY_MODE_STATE_IDLE == standbyState ) ) { - DG_CMD_RESPONSE_T cmdResponse; - - cmdResponse.commandID = DG_CMD_START_CHEM_DISINFECT_FLUSH; - cmdResponse.rejected = FALSE; - cmdResponse.rejectCode = DG_CMD_REQUEST_REJECT_REASON_NONE; OPN_CLS_STATE_T concCap = getSwitchStatus( CONCENTRATE_CAP ); OPN_CLS_STATE_T diaCap = getSwitchStatus( DIALYSATE_CAP ); @@ -591,10 +591,15 @@ pendingStartDGChemicalDisinfectFlushRequest = TRUE; status = TRUE; } - - sendCommandResponseMsg( &cmdResponse ); } + else + { + cmdResponse.rejected = TRUE; + cmdResponse.rejectCode = REQUEST_REJECT_REASON_DG_NOT_IN_STANDBY_IDLE_STATE; + } + sendCommandResponseMsg( &cmdResponse ); + return status; }