Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rdcd360fb4dc37db2dcbeb7fb14fb327fe68235f4 -ra89d6b091874136d75a9bfbdbbc1ff00f42467b3 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision dcd360fb4dc37db2dcbeb7fb14fb327fe68235f4) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision a89d6b091874136d75a9bfbdbbc1ff00f42467b3) @@ -1,14 +1,14 @@ /************************************************************************** * -* Copyright (c) 2019-2021 Diality Inc. - All Rights Reserved. +* Copyright (c) 2019-2022 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) 06-Nov-2021 +* @date (last) 06-Jul-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -113,6 +113,9 @@ { case DG_POST_STATE_START: postState = handlePOSTStateStart(); +#ifdef BOARD_WITH_NO_HARDWARE + postState = DG_POST_STATE_RTC; +#endif break; case DG_POST_STATE_FW_COMPATIBILITY: @@ -144,16 +147,27 @@ // NVDataMgmt must load all the calibration data into RAM so the actuators // can query their corresponding calibration values successfully case DG_POST_STATE_TEMPERATURE_SENSORS: +#ifndef BOARD_WITH_NO_HARDWARE testStatus = execTemperatureSensorsSelfTest(); postState = handlePOSTStatus( testStatus ); +#else + postState = DG_POST_STATE_COMPLETED; +#endif break; case DG_POST_STATE_ACCELEROMETER: -#ifndef DISABLE_ACCELS - testStatus = execAccelTest(); -#else - testStatus = SELF_TEST_STATUS_PASSED; +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELS ) != SW_CONFIG_ENABLE_VALUE ) #endif + { + testStatus = execAccelTest(); + } +#ifndef _RELEASE_ + else + { + testStatus = SELF_TEST_STATUS_PASSED; + } +#endif postState = handlePOSTStatus( testStatus ); break; @@ -188,7 +202,18 @@ break; case DG_POST_STATE_UV_REACTORS: - testStatus = execUVReactorsSelfTest(); +#ifndef _RELEASE_ + if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_UV_REACTORS ) != SW_CONFIG_ENABLE_VALUE ) +#endif + { + testStatus = execUVReactorsSelfTest(); + } +#ifndef _RELEASE_ + else + { + testStatus = SELF_TEST_STATUS_PASSED; + } +#endif postState = handlePOSTStatus( testStatus ); break; @@ -335,9 +360,6 @@ // mode previous and current are both published as Init SEND_EVENT_WITH_2_U32_DATA( DG_EVENT_OP_MODE_CHANGE, DG_MODE_INIT, DG_MODE_INIT ) state = DG_POST_STATE_FW_COMPATIBILITY; -#ifdef SKIP_POST - state = DG_POST_STATE_COMPLETED; -#endif startPOSTDelayCounter = 0; }