Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r3c04d62d484c3782e59cc8efc8bb5f0dcf7fe17e -r8cf0fafa78ce14b5dbdf95510e957846660ac2b9 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 3c04d62d484c3782e59cc8efc8bb5f0dcf7fe17e) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 8cf0fafa78ce14b5dbdf95510e957846660ac2b9) @@ -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 AlarmMgmt.c * -* @author (last) Sean Nash -* @date (last) 04-Dec-2023 +* @author (last) Dara Navaei +* @date (last) 06-May-2024 * * @author (original) Sean Nash * @date (original) 07-Nov-2019 @@ -377,7 +377,8 @@ // if the block timer is 0 OR we have an unblockable alarm if ( ( ALARM_NOT_BLOCKED == alarmsBlockedTimer ) || ( ALARM_ID_HD_AC_POWER_LOST == alarm ) - || ( ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT == alarm ) ) + || ( ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT == alarm ) + || ( ALARM_ID_HD_DG_RESTARTED_FAULT == alarm ) ) { // do not re-trigger alarm if blocked by property if ( ( FALSE == alarmNoRetrigger ) || ( ( ALARM_TABLE[ alarm ].alarmNoRetrigOnRB != TRUE ) && ( ALARM_TABLE[ alarm ].alarmNoRetrigOnEndTx != TRUE ) ) ) @@ -407,7 +408,12 @@ // Send information for UI to log to treatment log if ( ( TRUE == ALARM_TABLE[ alarm ].alarmTreatmentLog ) && ( MODE_TREA == getCurrentOperationMode() ) ) { - sendTreatmentLogAlarmEventData( alarm, alarmData1, alarmData2 ); + F32 data1; + F32 data2; + + memcpy( &data1, &alarmData1.data, sizeof( F32 ) ); + memcpy( &data2, &alarmData2.data, sizeof( F32 ) ); + sendTreatmentLogAlarmEventData( alarm, data1, data2 ); } } activateAlarm( alarm ); @@ -864,7 +870,6 @@ if ( ( volumeLevel > 0 ) && ( volumeLevel <= MAX_ALARM_VOLUME_LEVEL ) ) { - sendTreatmentLogEventData( ALARM_AUDIO_VOLUME_CHANGED_EVENT, (F32)volumeLevel, (F32)getAlarmAudioVolume() ); // Convert volume level to attenuation level alarmAudioVolumeLevel.data = MAX_ALARM_VOLUME_LEVEL - volumeLevel; accepted = TRUE; @@ -1257,7 +1262,8 @@ BOOL noResume = FALSE; BOOL noResumePerAlarmPropertyOnly = alarmNoRetrigger; // cannot resume if no re-trigger flag is set BOOL noRinseback = FALSE; - BOOL noEndTreatment = FALSE; + BOOL noEndTreatment = FALSE; + BOOL endTxOnlyAlarmActive = FALSE; BOOL usrAckReq = FALSE; BOOL noMinimize = TRUE; HD_OP_MODE_T currentMode = getCurrentOperationMode(); @@ -1308,6 +1314,13 @@ else { noEndTreatment = TRUE; + } + // if there are any active alarms that only allow end treatment, set flag so we can ensure we do not allow OK option. + if ( ( TRUE == ALARM_TABLE[ a ].alarmNoResume ) && + ( TRUE == ALARM_TABLE[ a ].alarmNoRinseback ) && + ( FALSE == ALARM_TABLE[ a ].alarmNoEndTreatment ) ) + { + endTxOnlyAlarmActive = TRUE; } } // If alarm active } // Alarm table loop @@ -1329,6 +1342,13 @@ noEndTreatment = TRUE; } + // if OK option enabled and there are any active alarms that only allow end treatment, block OK option and allow end treatment option (DEN-16594). + if ( ( TRUE == usrAckReq ) && ( TRUE == endTxOnlyAlarmActive ) ) + { + usrAckReq = FALSE; + noEndTreatment = FALSE; + } + // If AC power is out, block all user options if ( TRUE == getCPLDACPowerLossDetected() ) { @@ -1412,14 +1432,6 @@ // do not clear this alarm if condition not cleared first (unless treatment is over) result = FALSE; } - else if ( ( ( ALARM_ID_DG_FILL_CONDUCTIVITY_OUT_OF_RANGE == a ) || - ( ALARM_ID_DG_ACID_BOTTLE_LOW_VOLUME == a ) || - ( ALARM_ID_DG_BICARB_BOTTLE_LOW_VOLUME == a ) ) && - ( alarmStatus.alarmTop != a ) ) - { - // do not clear this alarm unless it is top (user is specifically clearing this alarm) - result = FALSE; - } else { // clear this alarm