Index: firmware/App/Modes/ModeChemicalDisinfect.c =================================================================== diff -u -r2b47dd2e7974618d8899527cdbff80fa93ebc9fa -reeaab2a9a685fb18845888d91040d3aa01977f6d --- firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision 2b47dd2e7974618d8899527cdbff80fa93ebc9fa) +++ firmware/App/Modes/ModeChemicalDisinfect.c (.../ModeChemicalDisinfect.c) (revision eeaab2a9a685fb18845888d91040d3aa01977f6d) @@ -7,8 +7,8 @@ * * @file ModeChemicalDisinfect.c * -* @author (last) Dara Navaei -* @date (last) 27-Feb-2023 +* @author (last) Michael Garthwaite +* @date (last) 16-May-2023 * * @author (original) Sean * @date (original) 04-Apr-2020 @@ -293,9 +293,12 @@ 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 + setCondcutivitySensorCalTable( CONDUCTIVITYSENSORS_CD2_SENSOR, CAL_DATA_CD2_COND_SENSOR_CHEM_DISINFECT ); + #ifndef _RELEASE_ if ( nelsonSupport != NELSON_CHEM_DISINFECT ) #endif @@ -1293,7 +1296,7 @@ SET_ALARM_WITH_1_U32_DATA( alarmDetectedPendingTrigger, prevChemDisinfectState ) } - requestNewOperationMode( DG_MODE_FAUL ); + requestNewOperationMode( DG_MODE_STAN ); } /*********************************************************************//** @@ -1669,12 +1672,13 @@ if ( ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_CAPS_MONITOR ) != SW_CONFIG_ENABLE_VALUE ) && ( NELSON_NONE == nelsonSupport ) ) #endif { - // If the dialysate cap is open during any state, alarm - if ( ( STATE_OPEN == getSwitchStatus( DIALYSATE_CAP ) ) && ( chemDisinfectState != DG_CHEM_DISINFECT_STATE_START ) ) + // 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 ) ) { prevChemDisinfectState = chemDisinfectState; chemDisinfectState = DG_CHEM_DISINFECT_STATE_CANCEL_WATER_PATH; - alarmDetectedPendingTrigger = ALARM_ID_DG_DIALYSATE_OR_CONC_CAP_NOT_IN_PROPER_POSITION; + alarmDetectedPendingTrigger = ALARM_ID_DG_DIALYSATE_CAP_NOT_IN_PROPER_POSITION; } }