Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r22cab5beebd48faf29e78c5003b0bdd0a32748e8 -r9944e4f766d9eb4cdf7a5ca7587e3ceca556e106 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 22cab5beebd48faf29e78c5003b0bdd0a32748e8) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 9944e4f766d9eb4cdf7a5ca7587e3ceca556e106) @@ -7,8 +7,8 @@ * * @file AlarmMgmt.c * -* @author (last) Michael Garthwaite -* @date (last) 11-Mar-2022 +* @author (last) Darren Cox +* @date (last) 28-Mar-2022 * * @author (original) Sean Nash * @date (original) 07-Nov-2019 @@ -198,7 +198,8 @@ alarmStatus.noClear = FALSE; alarmStatus.noResume = FALSE; alarmStatus.noRinseback = FALSE; - alarmStatus.noEndTreatment = FALSE; + alarmStatus.noEndTreatment = FALSE; + alarmStatus.noBloodRecirc = FALSE; alarmStatus.noDialRecirc = FALSE; alarmStatus.ok = FALSE; @@ -572,6 +573,19 @@ /*********************************************************************//** * @brief + * The isBloodRecircBlocked function determines whether any currently + * active alarm is blocking blood re-circulation. + * @details Inputs: alarmStatus + * @details Outputs: none + * @return TRUE if any active alarm prevents blood re-circulation, FALSE if not + *************************************************************************/ +BOOL isBloodRecircBlocked( void ) +{ + return alarmStatus.noBloodRecirc; +} + +/*********************************************************************//** + * @brief * The isDialysateRecircBlocked function determines whether any currently * active alarm is blocking dialysate re-circulation. * @details Inputs: alarmStatus @@ -754,6 +768,7 @@ ALARM_ID_T a; BOOL faultsActive = FALSE; BOOL dialysateRecircBlocked = FALSE; + BOOL bloodRecircBlocked = FALSE; // Update FIFOs and sub-ranks per active alarms table - for alarm ranking purposes to determine "top" alarm for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) @@ -797,6 +812,11 @@ { dialysateRecircBlocked = TRUE; } + // Track whether any active alarms prevent blood re-circulation so far + if ( TRUE == ALARM_TABLE[ a ].alarmNoBloodRecirc ) + { + bloodRecircBlocked = TRUE; + } } } @@ -805,6 +825,7 @@ alarmStatus.alarmTop = alarmPriorityFIFO[ highestPriority ].alarmID; alarmStatus.topAlarmConditionDetected = alarmIsDetected[ alarmStatus.alarmTop ]; alarmStatus.systemFault = faultsActive; + alarmStatus.noBloodRecirc = bloodRecircBlocked; alarmStatus.noDialRecirc = dialysateRecircBlocked; }