Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rd37f31cff6c20085953ecb598558e4d91e42f0af -rb1f086e7cd292d5a97a7265075400274d60d4fbf --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision d37f31cff6c20085953ecb598558e4d91e42f0af) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision b1f086e7cd292d5a97a7265075400274d60d4fbf) @@ -8,7 +8,7 @@ * @file ModeInitPOST.c * * @author (last) Dara Navaei -* @date (last) 04-Jan-2022 +* @date (last) 13-Jul-2022 * * @author (original) Dara Navaei * @date (original) 05-Nov-2019 @@ -156,14 +156,6 @@ postState = handlePOSTStatus( testStatus ); break; - case POST_STATE_AC: - if ( getMonitoredLineLevel( MONITORED_LINE_24V ) < MIN_24V_MEASURED_FOR_AC ) - { - initiatePowerOff(); - } - postState = POST_STATE_WATCHDOG; - break; - case POST_STATE_WATCHDOG: testStatus = execWatchdogTest(); postState = handlePOSTStatus( testStatus ); @@ -191,6 +183,7 @@ case POST_STATE_BLOOD_FLOW: testStatus = execBloodFlowTest(); postState = handlePOSTStatus( testStatus ); + sendUIRequestPOSTFinalResult(); // request UI POST final result here so we have it before UI test below break; case POST_STATE_DIALYSATE_INLET_FLOW: @@ -224,14 +217,18 @@ break; case POST_STATE_ALARM_AUDIO: +#ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ALARM_AUDIO ) != SW_CONFIG_ENABLE_VALUE ) +#endif { testStatus = execAlarmAudioSelfTest(); } +#ifndef _RELEASE_ else { testStatus = SELF_TEST_STATUS_PASSED; } +#endif postState = handlePOSTStatus( testStatus ); break; @@ -241,14 +238,19 @@ break; case POST_STATE_ACCELEROMETER: - // TODO I don't like this - testStatus = SELF_TEST_STATUS_PASSED; + #ifndef _RELEASE_ if ( getSoftwareConfigStatus( SW_CONFIG_DISABLE_ACCELEROMETERS ) != SW_CONFIG_ENABLE_VALUE ) #endif { testStatus = execAccelTest(); } +#ifndef _RELEASE_ + else + { + testStatus = SELF_TEST_STATUS_PASSED; + } +#endif postState = handlePOSTStatus( testStatus ); break; @@ -479,16 +481,13 @@ sendUIVersionRequest(); // Send the startup event - SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, systemREG1->DEV, 0x12345678 ) // log startup event w/ device ID bits + SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_STARTUP, resetReason, systemREG1->GBLSTAT ) // log startup event w/ reset reason(s) bits // Send the first submode change event. It is the mode Init and it does not start from a previous // mode previous and current are both published as Init SEND_EVENT_WITH_2_U32_DATA( HD_EVENT_OP_MODE_CHANGE, MODE_INIT, MODE_INIT ) state = POST_STATE_FW_INTEGRITY; -#ifdef SKIP_POST - state = DG_POST_STATE_COMPLETED; -#endif startPOSTDelayCounter = 0; } @@ -526,6 +525,7 @@ *************************************************************************/ static SELF_TEST_STATUS_T execUITest( void ) { + #ifndef DISABLE_UI_POST_TEST SELF_TEST_STATUS_T result = SELF_TEST_STATUS_IN_PROGRESS; @@ -553,6 +553,7 @@ #endif return result; + } /**@}*/