Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -rfcaca0915c314d04b9fa96c1960d32b63ab877db -re8f6f5fda0c67cd09a0a7968e3cf305691e75101 --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision fcaca0915c314d04b9fa96c1960d32b63ab877db) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision e8f6f5fda0c67cd09a0a7968e3cf305691e75101) @@ -57,7 +57,7 @@ static BOOL alarmIsActive[ NUM_OF_ALARM_IDS ]; ///< Array of current state of each alarm static BOOL alarmConditionIsActive[ NUM_OF_ALARM_IDS ]; ///< Array of flag indicates if an alarm condition is active static U32 alarmInfoPublicationTimerCounter; ///< Used to schedule alarm information publication to CAN bus. -static ALARM_ID_T activeAlarm; ///< Active DG alarm to be used to cancel the cleaning modes. +static BOOL isAFlaultAlarmActive; ///< Boolean flag to indicate whether a DG fault alarm is active. /// Interval (in task intervals) at which to publish alarm information to CAN bus. static OVERRIDE_U32_T alarmInfoPublishInterval = { ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, ALARM_INFO_PUB_INTERVAL, 0 }; @@ -73,7 +73,7 @@ * The initAlarmMgmt function initializes the AlarmMgmt module. * @details Inputs: none * @details Outputs: alarmInfoPublicationTimerCounter, alarmLEDTimer, - * activeAlarm, alarmIsActive, alarmConditionIsActive + * isAFlaultAlarmActive, alarmIsActive, alarmConditionIsActive * @return none *************************************************************************/ void initAlarmMgmt( void ) @@ -82,7 +82,7 @@ alarmInfoPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; alarmLEDTimer = 0; - activeAlarm = ALARM_ID_NO_ALARM; + isAFlaultAlarmActive = FALSE; // initialize alarm states and start time stamps for ( alrm = ALARM_ID_NO_ALARM; alrm < NUM_OF_ALARM_IDS; alrm++ ) @@ -130,8 +130,8 @@ if ( TRUE == ALARM_TABLE[ alarm ].alarmIsDGFault ) { - // There is a DG fault alarm. Update the variable so the modes such as cleaning modes know there is a fault happening. - activeAlarm = alarm; + // There is a DG fault alarm. + isAFlaultAlarmActive = TRUE; if ( TRUE == isTransitionToFaultRequired() ) { @@ -280,17 +280,16 @@ /*********************************************************************//** * @brief - * The isAnyAlarmActive function determines whether any alarm is currently + * The isDGFaultAlarmActive function determines whether a fault alarm is currently * active. * @details Inputs: alarmStatus * @details Outputs: none * @return TRUE if any alarm is active, FALSE if not *************************************************************************/ -BOOL isAnyAlarmActive( void ) +BOOL isDGFaultAlarmActive( void ) { - BOOL result = ( activeAlarm != ALARM_ID_NO_ALARM ? TRUE : FALSE ); - return result; + return isAFlaultAlarmActive; } /*********************************************************************//**