Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -rbaa9fb9bb10eed6cd211abaa80e9f9acffdeb20d -rafa9d4924d55ac4fc98270a012e92dd1f6ee65d0 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision baa9fb9bb10eed6cd211abaa80e9f9acffdeb20d) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision afa9d4924d55ac4fc98270a012e92dd1f6ee65d0) @@ -17,12 +17,14 @@ #include "Accel.h" #include "AlarmLamp.h" +#include "Battery.h" #include "BloodFlow.h" #include "Buttons.h" #include "Compatible.h" #include "CPLD.h" #include "DialInFlow.h" #include "FPGA.h" +#include "Integrity.h" #include "ModeInitPOST.h" #include "NVDataMgmt.h" #include "OperationModes.h" @@ -135,9 +137,15 @@ break; case POST_STATE_FW_INTEGRITY: - postState = POST_STATE_WATCHDOG; + testStatus = execIntegrityTest(); + postState = handlePOSTStatus( testStatus ); break; + case POST_STATE_BATTERY: + testStatus = execBatteryTest(); + postState = handlePOSTStatus( testStatus ); + break; + case POST_STATE_WATCHDOG: testStatus = execWatchdogTest(); postState = handlePOSTStatus( testStatus ); @@ -169,8 +177,14 @@ break; case POST_STATE_ALARM_AUDIO: +#ifdef DONT_SKIP_NV_POST + // Skip the rest of the POSTs + postState = POST_STATE_COMPLETED; + testStatus = SELF_TEST_STATUS_PASSED; +#else testStatus = execAlarmAudioSelfTest(); postState = handlePOSTStatus( testStatus ); +#endif break; case POST_STATE_ALARM_LAMP: @@ -183,6 +197,10 @@ #endif break; + case POST_STATE_ALARM_AUDIO: + postState = POST_STATE_ACCELEROMETER; + break; + case POST_STATE_ACCELEROMETER: #ifndef DISABLE_ACCELS testStatus = execAccelTest(); @@ -239,7 +257,6 @@ // Should not get here - any failed post test should have already triggered a fault and taken us to fault mode default: SET_ALARM_WITH_2_U32_DATA( ALARM_ID_HD_SOFTWARE_FAULT, SW_FAULT_ID_MODE_INIT_POST_INVALID_POST_STATE, postState ) - postState = POST_STATE_FAILED; break; }