Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r8c57a53173c14be72f6f24426632654551cfe8d0 -rc8e9a8d78c51b889bba3b8ce9e7da1a0c661f771 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 8c57a53173c14be72f6f24426632654551cfe8d0) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision c8e9a8d78c51b889bba3b8ce9e7da1a0c661f771) @@ -20,6 +20,7 @@ #define __ALARM_MGMT_C__ #include "AlarmLamp.h" +#include "CPLD.h" #include "FPGA.h" #include "InternalADC.h" #include "OperationModes.h" @@ -41,7 +42,7 @@ #define ALARM_INFO_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) /// Interval (ms/task time) at which the alarm information is published on the CAN bus. -#define ALARM_BLOCK_COUNT_AFTER_AC_RETURN ( 10*MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +#define ALARM_BLOCKED_COUNT_AFTER_AC_RETURN ( 10*MS_PER_SECOND / TASK_GENERAL_INTERVAL ) #define ALARM_SILENCE_EXPIRES_IN_SECS (60) ///< Alarm silence expiration time in seconds. @@ -353,12 +354,12 @@ if ( ( alarm > ALARM_ID_NO_ALARM ) && ( alarm < NUM_OF_ALARM_IDS ) ) { // Block if new alarms are occur during loss of AC power - if ( ( TRUE == alarmIsActive[ ALARM_ID_HD_AC_POWER_LOST ] ) || ( TRUE == alarmIsActive[ ALARM_ID_HD_AC_POWER_LOST_IN_TREATMENT ] ) ) + if ( ( TRUE == getCPLDACPowerLossDetected() ) ) { - alarmStatus.alarmsBlockedTimer = ALARM_BLOCK_COUNT_AFTER_AC_RETURN; + alarmStatus.alarmsBlockedTimer = ALARM_BLOCKED_COUNT_AFTER_AC_RETURN; } // if the block timer is 0 OR we have an unblockable alarm - if (( ALARM_NOT_BLOCKED == alarmStatus.alarmsBlockedTimer ) || ( ALARM_TABLE[ alarm ].alarmSubRank < ALARM_BLOCKED_LIMIT_AC_RECOVERY ) ) + if ( ( ALARM_NOT_BLOCKED == alarmStatus.alarmsBlockedTimer ) ) { // Broadcast alarm and data if alarm not already active if ( FALSE == alarmIsActive[ alarm ] )