Index: firmware/App/Modes/ModeChemicalDisinfect.c =================================================================== diff -u -rc940dea020a10f2bab23ae92aa6932c375c26dd4 -rb644e09158661395c03a07f869eed78c77188e7a --- firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision c940dea020a10f2bab23ae92aa6932c375c26dd4) +++ firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision b644e09158661395c03a07f869eed78c77188e7a) @@ -8,7 +8,7 @@ * @file ModeChemicalDisinfect.c * * @author (last) Dara Navaei -* @date (last) 11-May-2023 +* @date (last) 16-May-2023 * * @author (original) Sean * @date (original) 04-Apr-2020 @@ -293,7 +293,7 @@ deenergizeActuators( NO_PARK_CONC_PUMPS ); initChemicalDisinfectMode(); - + setCurrentSubState( NO_SUB_STATE ); setCPLDCleanLEDColor( CPLD_CLEAN_LED_YELLOW ); // Set CD1 and CD2 conductivity sensors calibration table to be picked from the chemical disinfect calibration record @@ -1672,12 +1672,19 @@ if ( ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_CAPS_MONITOR ) != SW_CONFIG_ENABLE_VALUE ) && ( NELSON_NONE == nelsonSupport ) ) #endif { - // If the dialysate cap is closed during any state other the start state, alarm. In start state we are still looking for - // the user to insert the acid into the dialysate port and hit ok - if ( ( STATE_CLOSED == getSwitchStatus( DIALYSATE_CAP ) ) && ( chemDisinfectState != DG_CHEM_DISINFECT_STATE_START ) ) + // If the concentrate cap is closed during any state other the start state, alarm. In start state we are still looking for + // the user to insert the acid into the concentrate port and hit ok + if ( ( STATE_CLOSED == getSwitchStatus( CONCENTRATE_CAP ) ) && ( chemDisinfectState != DG_CHEM_DISINFECT_STATE_START ) ) { prevChemDisinfectState = chemDisinfectState; chemDisinfectState = DG_CHEM_DISINFECT_STATE_CANCEL_WATER_PATH; + alarmDetectedPendingTrigger = ALARM_ID_DG_CONCENTRATE_CAP_NOT_IN_PROPER_POSITION; + } + + if ( STATE_OPEN == getSwitchStatus( DIALYSATE_CAP ) ) + { + prevChemDisinfectState = chemDisinfectState; + chemDisinfectState = DG_CHEM_DISINFECT_STATE_CANCEL_WATER_PATH; alarmDetectedPendingTrigger = ALARM_ID_DG_DIALYSATE_CAP_NOT_IN_PROPER_POSITION; } }