Index: firmware/App/Controllers/Fans.c =================================================================== diff -u -rcc8b9ddb9905161ddb0dc2af6bfbf863408669c8 -r31aa23b12f37b9d16b5160369ccb7dab6c6eca4d --- firmware/App/Controllers/Fans.c (.../Fans.c) (revision cc8b9ddb9905161ddb0dc2af6bfbf863408669c8) +++ firmware/App/Controllers/Fans.c (.../Fans.c) (revision 31aa23b12f37b9d16b5160369ccb7dab6c6eca4d) @@ -55,6 +55,7 @@ #define FANS_MIN_ALLOWED_RPM 150 ///< Fans max allowed RPM value. #define FANS_MIN_RPM_OUT_OF_RANGE_TOL 0.25 ///< Fans min RPM out of range tolerance. #define FANS_MAX_RPM_OUT_OF_RANGE_TOL 0.5 ///< Fans max RPM out of range tolerance. +#define DATA_PUBLISH_COUNTER_START_COUNT 4 ///< Data publish counter start count. /// Fans exec states typedef enum fans_Exec_States @@ -75,7 +76,7 @@ static FAN_STATUS_T fansStatus; ///< Fans status. static FANS_EXEC_STATES_T fansExecState = FANS_EXEC_STATE_WAIT_FOR_POST_STATE; ///< Fans exec state. static U32 fansControlCounter = 0; ///< Fans control interval counter. -static U32 fansPublishCounter = 0; ///< Fans data publish interval counter. +static U32 fansPublishCounter; ///< Fans data publish interval counter. static BOOL isPOSTComplete = FALSE; ///< Flag that indicates whether POST is complete or not. static BOOL hasAlarmBeenRaised = FALSE; ///< Flag that indicates whether the RPM out of range alarm been raise. static OVERRIDE_U32_T rpmAlarmStartTimeOffset = { 0, 0, 0, 0 }; ///< RPM out of range alarm start time offset. @@ -116,7 +117,7 @@ // Initialize the variables fansExecState = FANS_EXEC_STATE_WAIT_FOR_POST_STATE; fansControlCounter = 0; - fansPublishCounter = 0; + fansPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; isPOSTComplete = FALSE; hasAlarmBeenRaised = FALSE; rpmAlarmStartTime = 0; @@ -541,7 +542,7 @@ broadcastData( MSG_ID_DG_FANS_DATA, COMM_BUFFER_OUT_CAN_DG_BROADCAST, (U08*)&fansData, sizeof( FANS_DATA_T ) ); - fansPublishCounter = 0; + fansPublishCounter = DATA_PUBLISH_COUNTER_START_COUNT; } }