Index: firmware/App/Modes/ModeFlush.c =================================================================== diff -u -rbe920d1ab62ea8520093c7c0ab44eba31faea429 -r54abf84364e737dd350153d5fab7dd652f917ef4 --- firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision be920d1ab62ea8520093c7c0ab44eba31faea429) +++ firmware/App/Modes/ModeFlush.c (.../ModeFlush.c) (revision 54abf84364e737dd350153d5fab7dd652f917ef4) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2023 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file ModeFlush.c * * @author (last) Dara Navaei -* @date (last) 08-Sep-2023 +* @date (last) 09-Sep-2024 * * @author (original) Leonardo Baloa * @date (original) 20-Dec-2019 @@ -1129,15 +1129,18 @@ { if ( ( STATE_OPEN == getSwitchStatus( CONCENTRATE_CAP ) ) || ( STATE_OPEN == getSwitchStatus( DIALYSATE_CAP ) ) ) { - // Set the variables to fail and go to cancel water path. Set the pending alarm to no alarm so the cancel water path - // will not be raising the alarm at end of the cancel water path. The recoverable alarm is raised here in this function - prevFlushState = flushState; - flushState = DG_FLUSH_STATE_CANCEL_WATER_PATH; - alarmDetectedPendingTrigger = ALARM_ID_DG_DIALYSATE_CAP_NOT_IN_PROPER_POSITION; - - if ( STATE_OPEN == getSwitchStatus( CONCENTRATE_CAP ) ) + if ( ( flushState != DG_FLUSH_STATE_CANCEL_WATER_PATH ) && ( flushState != DG_FLUSH_STATE_CANCEL_BASIC_PATH ) ) { - alarmDetectedPendingTrigger = ALARM_ID_DG_CONCENTRATE_CAP_NOT_IN_PROPER_POSITION; + // Set the variables to fail and go to cancel water path. Set the pending alarm to no alarm so the cancel water path + // will not be raising the alarm at end of the cancel water path. The recoverable alarm is raised here in this function + prevFlushState = flushState; + flushState = DG_FLUSH_STATE_CANCEL_WATER_PATH; + alarmDetectedPendingTrigger = ALARM_ID_DG_DIALYSATE_CAP_NOT_IN_PROPER_POSITION; + + if ( STATE_OPEN == getSwitchStatus( CONCENTRATE_CAP ) ) + { + alarmDetectedPendingTrigger = ALARM_ID_DG_CONCENTRATE_CAP_NOT_IN_PROPER_POSITION; + } } } }