Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r0c439ddcf7e4d3d4bf63df679eacf2f12f01255f -r0f9838d6b8606a6a9853ccb6157e4c25d70ddd02 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 0c439ddcf7e4d3d4bf63df679eacf2f12f01255f) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 0f9838d6b8606a6a9853ccb6157e4c25d70ddd02) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2023 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file ModeInitPOST.c * * @author (last) Dara Navaei -* @date (last) 04-Aug-2022 +* @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 );