Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -rfba69244d94307e50fefaa1e88bcbb979584461e -r371355c43e19849e5b1dd27286f62f4424d07ccf --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision fba69244d94307e50fefaa1e88bcbb979584461e) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 371355c43e19849e5b1dd27286f62f4424d07ccf) @@ -8,7 +8,7 @@ * @file AlarmMgmt.c * * @author (last) Dara Navaei -* @date (last) 06-May-2024 +* @date (last) 02-Apr-2025 * * @author (original) Sean Nash * @date (original) 07-Nov-2019 @@ -624,6 +624,7 @@ // Ignore alarm action if invalid or too soon after last one (essentially a debounce in case user double tapped a button) if ( ( TRUE == alarmActionIsValid ) && ( calcTimeSince( lastUserAlarmActionReceivedTime ) >= MIN_TIME_BETWEEN_ALARM_ACTIONS_MS ) ) { + GENERIC_CONFIRMATION_REQUEST_T genericConfRequest; BOOL allRecAlarmsCleared = TRUE; // Clear recoverable alarms on user action @@ -665,8 +666,16 @@ break; case ALARM_USER_ACTION_END_TREATMENT: + genericConfRequest.requestID = (U32)GENERIC_CONFIRM_ID_TREATMENT_END; + genericConfRequest.requestType = (U32)GENERIC_CONFIRM_CMD_REQUEST_OPEN; + genericConfRequest.rejectReason = 0; + genericConfRequest.genericPayload1 = 0.0F; + genericConfRequest.genericPayload2 = 0.0F; + genericConfRequest.genericPayload3 = 0.0F; + genericConfRequest.genericPayload4 = 0.0F; + // Send message to UI to get user confirmation to end treatment - action initiated only upon receipt of user confirmation from UI - addConfirmationRequest( GENERIC_CONFIRM_ID_TREATMENT_END, GENERIC_CONFIRM_CMD_REQUEST_OPEN, 0 ); + addConfirmationRequest( &genericConfRequest ); break; case ALARM_USER_ACTION_ACK: @@ -782,6 +791,19 @@ /*********************************************************************//** * @brief + * The isRinseBackBlocked function determines whether any currently + * active alarm is blocking rinseback. + * @details Inputs: alarmStatus + * @details Outputs: none + * @return TRUE if any active alarm prevents rinseback, FALSE if not + *************************************************************************/ +BOOL isRinseBackBlocked( void ) +{ + return alarmStatus.noRinseback; +} + +/*********************************************************************//** + * @brief * The doesAlarmStatusIndicateEndTxOnly function determines whether any currently * active alarm has ( stop && noRes && /noET ) property, that is end treatment is * the only choice from full stop. @@ -1004,7 +1026,7 @@ alarmBackupAudioCurrent.data = getFPGABackupAlarmAudioCurrent(); // Check for user confirmation of end treatment alarm response - if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_TREATMENT_END ) ) + if ( CONFIRMATION_REQUEST_STATUS_ACCEPTED == getConfirmationRequestStatus( GENERIC_CONFIRM_ID_TREATMENT_END, 0.0F, 0.0F, 0.0F, 0.0F ) ) { // To avoid raising repeated alarm before reaching end treatment setVenousBubbleDetectionEnabled( FALSE ); @@ -1358,9 +1380,8 @@ noEndTreatment = TRUE; } - // If in Treatment-Stop state or Fault/Service/Standby Mode, allow user to minimize the alarm window - if ( ( MODE_FAUL == currentMode ) || ( MODE_SERV == currentMode ) || ( MODE_STAN == currentMode ) || - ( ( MODE_TREA == currentMode ) && ( TREATMENT_STOP_STATE == getTreatmentState() ) ) ) + // If in Treatment/Fault/Service/Standby Mode, allow user to minimize the alarm window + if ( ( MODE_FAUL == currentMode ) || ( MODE_SERV == currentMode ) || ( MODE_STAN == currentMode ) || ( MODE_TREA == currentMode ) ) { noMinimize = FALSE; } @@ -1426,7 +1447,8 @@ } } // check special cases where we do not want to clear this alarm - otherwise, clear it - if ( ( ALARM_ID_DG_CREATING_DIALYSATE_PLEASE_WAIT == a ) && ( TRUE == alarmIsDetected[ a ] ) && ( mode != MODE_POST ) && + if ( ( ( ALARM_ID_DG_CREATING_DIALYSATE_PLEASE_WAIT == a ) || ( ALARM_ID_HD_BLOOD_LEAK_RECOVERING_PLEASE_WAIT == a ) ) && + ( TRUE == alarmIsDetected[ a ] ) && ( mode != MODE_POST ) && ( action != ALARM_USER_ACTION_RINSEBACK ) && ( action != ALARM_USER_ACTION_END_TREATMENT ) ) { // do not clear this alarm if condition not cleared first (unless treatment is over)