Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r73b00067c3a4fbb1ecbc7d525d23a75bb94d3fb1 -r0f9838d6b8606a6a9853ccb6157e4c25d70ddd02 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 73b00067c3a4fbb1ecbc7d525d23a75bb94d3fb1) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 0f9838d6b8606a6a9853ccb6157e4c25d70ddd02) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2023 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) Dara Navaei -* @date (last) 01-Sep-2022 +* @date (last) 18-Jan-2023 * * @author (original) Sean Nash * @date (original) 07-Nov-2019 @@ -1096,6 +1096,15 @@ HD_OP_MODE_T currentMode = getCurrentOperationMode(); ALARM_ID_T a; + // Set user alarm recovery actions allowed by state flags + alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RESUME ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RESUME ] ? FALSE : TRUE ); + alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RINSEBACK ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RINSEBACK ] ? FALSE : TRUE ); + alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_END_TREATMENT ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_END_TREATMENT ] ? FALSE : TRUE ); + // Reset user alarm recovery actions allowed by active alarms flags + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RESUME ] = FALSE; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RINSEBACK ] = FALSE; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_END_TREATMENT ] = FALSE; + // Determine alarm flags for ( a = ALARM_ID_NO_ALARM; a < NUM_OF_ALARM_IDS; a++ ) { @@ -1105,12 +1114,9 @@ stop = ( TRUE == ALARM_TABLE[ a ].alarmStops ? TRUE : stop ); noClear = ( TRUE == ALARM_TABLE[ a ].alarmNoClear ? TRUE : noClear ); // Set user alarm recovery actions allowed flags - alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RESUME ] = ALARM_TABLE[ a ].alarmNoResume; - alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RINSEBACK ] = ALARM_TABLE[ a ].alarmNoRinseback; - alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_END_TREATMENT ] = ALARM_TABLE[ a ].alarmNoEndTreatment; - alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RESUME ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RESUME ] ? FALSE : TRUE ); - alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_RINSEBACK ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RINSEBACK ] ? FALSE : TRUE ); - alarmButtonBlockers[ ALARM_BUTTON_STATE_BLOCK_END_TREATMENT ] = ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_END_TREATMENT ] ? FALSE : TRUE ); + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RESUME ] |= ALARM_TABLE[ a ].alarmNoResume; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_RINSEBACK ] |= ALARM_TABLE[ a ].alarmNoRinseback; + alarmButtonBlockers[ ALARM_BUTTON_TABLE_BLOCK_END_TREATMENT ] |= ALARM_TABLE[ a ].alarmNoEndTreatment; if ( TRUE == alarmUserRecoveryActionEnabled[ ALARM_USER_ACTION_RESUME ] ) { noResume = ( TRUE == ALARM_TABLE[ a ].alarmNoResume ? TRUE : noResume ); @@ -1406,6 +1412,18 @@ return result; } + +/*********************************************************************//** + * @brief + * The resetAlarmAudioPOSTState function resets the alarm audio POST state. + * @details Inputs: none + * @details Outputs: alarmAudioSelfTestState + * @return none + *************************************************************************/ +void resetAlarmAudioPOSTState( void ) +{ + alarmAudioSelfTestState = ALARM_AUDIO_SELF_TEST_STATE_START; +} /*************************************************************************