Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r0a4dcd288d4347b85baaa0b07da568b6add5eac7 -r75e1ae332d1446dddf9b8d4ce6e8317449c57d67 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 0a4dcd288d4347b85baaa0b07da568b6add5eac7) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 75e1ae332d1446dddf9b8d4ce6e8317449c57d67) @@ -7,8 +7,8 @@ * * @file ModeInitPOST.c * -* @author (last) Sean Nash -* @date (last) 21-Dec-2022 +* @author (last) Dara Navaei +* @date (last) 18-Jan-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -118,11 +118,23 @@ *************************************************************************/ U32 transitionToInitAndPOSTMode( void ) { + initInitAndPOSTMode(); + // Set user alarm recovery actions allowed in this mode setAlarmUserActionEnabled( ALARM_USER_ACTION_RESUME, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_RINSEBACK, FALSE ); setAlarmUserActionEnabled( ALARM_USER_ACTION_END_TREATMENT, FALSE ); + resetRTCPOSTState(); + resetNVDataMgmtPOSTState(); + resetAccelPOSTState(); + resetWatchdogPOSTState(); + resetSafetyShutdownPOSTState(); + resetValvesPOSTState(); + resetAlarmAudioPOSTState(); + resetAlarmLampPOSTState(); + resetStuckButtonPOSTState(); + return postState; } @@ -156,30 +168,30 @@ postState = handlePOSTStatus( testStatus ); break; - case POST_STATE_WATCHDOG: - testStatus = execWatchdogTest(); + // NOTE: RTC's POST must go before NVDataMgmt + case POST_STATE_RTC: + testStatus = execRTCSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case POST_STATE_SAFETY_SHUTDOWN: - testStatus = execSafetyShutdownTest(); + // NOTE: all the actuators and sensors must execute their POST after NVDataMgmt + // NVDataMgmt must load all the calibration data into RAM so the actuators + // can query their corresponding calibration values successfully + case POST_STATE_NVDATAMGMT: + testStatus = execNVDataMgmtSelfTest(); postState = handlePOSTStatus( testStatus ); break; - // NOTE: RTC's POST must go before NVDataMgmt - case POST_STATE_RTC: - testStatus = execRTCSelfTest(); + case POST_STATE_WATCHDOG: + testStatus = execWatchdogTest(); postState = handlePOSTStatus( testStatus ); break; - case POST_STATE_NVDATAMGMT: - testStatus = execNVDataMgmtSelfTest(); + case POST_STATE_SAFETY_SHUTDOWN: + testStatus = execSafetyShutdownTest(); postState = handlePOSTStatus( testStatus ); break; - // NOTE: all the actuators and sensors must execute their POST after NVDataMgmt - // NVDataMgmt must load all the calibration data into RAM so the actuators - // can query their corresponding calibration values successfully case POST_STATE_BLOOD_FLOW: testStatus = execBloodFlowTest(); postState = handlePOSTStatus( testStatus ); @@ -392,6 +404,18 @@ /*********************************************************************//** * @brief + * The getDGVersion function returns the DG version information. + * @details Inputs: dgVersion + * @details Outputs: none + * @return dgVersion + *************************************************************************/ +DG_VERSIONS_T getDGVersion( void ) +{ + return dgVersion; +} + +/*********************************************************************//** + * @brief * The isPOSTCompleted function determines whether all HD POST have * been run and completed. If true, call the isPOSTPassed() to see final * result (pass/fail).