Index: firmware/App/Services/AlarmMgmt.c =================================================================== diff -u -r025612ad77fe630889a364586de54bffe5262d56 -r31aa23b12f37b9d16b5160369ccb7dab6c6eca4d --- firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 025612ad77fe630889a364586de54bffe5262d56) +++ firmware/App/Services/AlarmMgmt.c (.../AlarmMgmt.c) (revision 31aa23b12f37b9d16b5160369ccb7dab6c6eca4d) @@ -35,6 +35,7 @@ /// Interval (ms/task time) at which the alarm information is published on the CAN bus. #define ALARM_INFO_PUB_INTERVAL ( MS_PER_SECOND / TASK_GENERAL_INTERVAL ) +#define DATA_PUBLISH_COUNTER_START_COUNT 12 ///< Data publish counter start count. // *** This declaration will cause a compiler error if ALARM_TABLE does not have same # of alarms as the Alarm_List enumeration. U08 alarmTableSizeAssertion[ ( ( sizeof( ALARM_TABLE ) / sizeof( ALARM_T ) ) == NUM_OF_ALARM_IDS ? 1 : -1 ) ]; @@ -50,7 +51,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 = 0; ///< Used to schedule alarm information publication to CAN bus. +static U32 alarmInfoPublicationTimerCounter; ///< Used to schedule alarm information publication to CAN bus. /// 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 }; @@ -68,7 +69,9 @@ *************************************************************************/ void initAlarmMgmt( void ) { - ALARM_ID_T alrm; + ALARM_ID_T alrm; + + alarmInfoPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; // initialize alarm states and start time stamps for ( alrm = ALARM_ID_NO_ALARM; alrm < NUM_OF_ALARM_IDS; alrm++ ) @@ -273,7 +276,7 @@ U32 safetyActivated = (U32)isSafetyShutdownActivated(); broadcastData( MSG_ID_DG_ALARM_INFO, COMM_BUFFER_OUT_CAN_DG_ALARM, (U08*)&safetyActivated, sizeof( U32 ) ); - alarmInfoPublicationTimerCounter = 0; + alarmInfoPublicationTimerCounter = DATA_PUBLISH_COUNTER_START_COUNT; } }