Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -re832be54a818fe1af79b225e4b43cd148be89fa4 -r7d4711edd7b40cd3e29f43e766f79a8a09586fe9 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision e832be54a818fe1af79b225e4b43cd148be89fa4) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 7d4711edd7b40cd3e29f43e766f79a8a09586fe9) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2022 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2024 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) 27-Sep-2022 +* @author (last) Michael Garthwaite +* @date (last) 16-May-2023 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -53,11 +53,11 @@ // ********** private data ********** -static DG_POST_STATE_T postState = DG_POST_STATE_START; ///< Currently active initialize & POST state. -static BOOL postCompleted = FALSE; ///< Flag indicating POST completed. -static BOOL postPassed = FALSE; ///< Flag indicating all POST tests passed. -static BOOL tempPOSTPassed = TRUE; ///< Temporary flag indicating all POST tests completed so far have passed. -static U32 startPOSTDelayCounter = 0; ///< Start POST delay counter. +static DG_POST_STATE_T postState; ///< Currently active initialize & POST state. +static BOOL postCompleted; ///< Flag indicating POST completed. +static BOOL postPassed; ///< Flag indicating all POST tests passed. +static BOOL tempPOSTPassed; ///< Temporary flag indicating all POST tests completed so far have passed. +static U32 startPOSTDelayCounter; ///< Start POST delay counter. // ********** private function prototypes ********** @@ -95,6 +95,14 @@ { initInitAndPOSTMode(); setCPLDCleanLEDColor( CPLD_CLEAN_LED_OFF ); + setCurrentSubState( NO_SUB_STATE ); + resetRTCPOSTState(); + resetNVDataMgmtPOSTState(); + resetAccelPOSTState(); + resetPressuresPOSTState(); + resetUVReactorsPOSTState(); + resetWatchdogPOSTState(); + resetSafetyShutdownPOSTState(); return postState; } @@ -262,6 +270,8 @@ postCompleted = TRUE; // Broadcast final POST passed sendPOSTFinalResult( TRUE ); + // Request whether we are in the RO only mode from UI + requestROOnlyModeStatusFromUI(); // Go to standby mode requestNewOperationMode( DG_MODE_STAN ); break;