Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r0ca939ac0e3ad7d432152a89135075bfd67246df -rfdbb919248858aeffe5d23c2b6c57181e821f929 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 0ca939ac0e3ad7d432152a89135075bfd67246df) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision fdbb919248858aeffe5d23c2b6c57181e821f929) @@ -42,7 +42,6 @@ #include "SystemCommMessages.h" #include "TaskGeneral.h" #include "Temperatures.h" -#include "Timers.h" #include "Valves.h" #include "WatchdogMgmt.h" @@ -80,7 +79,7 @@ static UI_VERSIONS_T uiVersion = { 0, 0, 0, 0, 0 }; ///< Version and compatibility information reported by UI. static DG_VERSIONS_T dgVersion = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; ///< Version and compatibility information reported by DG. static U32 startPOSTDelayCounter = 0; ///< Start POST delay counter. -static U32 SNAndInstConfigSendStartTimeMS; ///< serial number and institutional configuration send start time milliseconds. +static BOOL hasSNAndInstBeenSent; ///< Boolean flag to check whether serial number and institutional record been sent. extern U32 savedResetReasonCode; ///< Saved reset reason code from sys_startup.c. @@ -102,18 +101,18 @@ *************************************************************************/ void initInitAndPOSTMode( void ) { - postState = POST_STATE_START; - postCompleted = FALSE; - postPassed = FALSE; - tempPOSTPassed = TRUE; - uiPOSTPassed = FALSE; - dgPOSTPassed = FALSE; - uiPOSTResultReceived = FALSE; - dgPOSTResultReceived = FALSE; - waitForUIPostTimerCtr = 0; - postCompleteDelayTimerCtr = 0; - startPOSTDelayCounter = 0; - SNAndInstConfigSendStartTimeMS = getMSTimerCount(); + postState = POST_STATE_START; + postCompleted = FALSE; + postPassed = FALSE; + tempPOSTPassed = TRUE; + uiPOSTPassed = FALSE; + dgPOSTPassed = FALSE; + uiPOSTResultReceived = FALSE; + dgPOSTResultReceived = FALSE; + waitForUIPostTimerCtr = 0; + postCompleteDelayTimerCtr = 0; + startPOSTDelayCounter = 0; + hasSNAndInstBeenSent = FALSE; } /*********************************************************************//** @@ -628,7 +627,7 @@ *************************************************************************/ static void sendSerialNumberAndInstitutionalToUI( void ) { - if ( ( TRUE == didTimeout( SNAndInstConfigSendStartTimeMS, SN_INST_SEND_TO_UI_TIME_INTERVAL_MS ) ) && ( postState > POST_STATE_NVDATAMGMT ) ) + if ( ( FALSE == hasSNAndInstBeenSent ) && ( postState > POST_STATE_NVDATAMGMT ) ) { MESSAGE_T message; @@ -639,7 +638,7 @@ handleHDSerialNumberRequest(); handleSendInstitutionalRecordToUI( &message ); - SNAndInstConfigSendStartTimeMS = getMSTimerCount(); + hasSNAndInstBeenSent = TRUE; } }