Index: firmware/App/Modes/ModeInitPOST.c =================================================================== diff -u -r2fff37fa585181917705645494549b5fd4a4d522 -ra79db345deaaeef0f1b619dc49d031fdae22d7e6 --- firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision 2fff37fa585181917705645494549b5fd4a4d522) +++ firmware/App/Modes/ModeInitPOST.c (.../ModeInitPOST.c) (revision a79db345deaaeef0f1b619dc49d031fdae22d7e6) @@ -16,6 +16,8 @@ ***************************************************************************/ #include "Accel.h" +#include "ConcentratePumps.h" +#include "ConductivitySensors.h" #include "CPLD.h" #include "DrainPump.h" #include "Fans.h" @@ -26,6 +28,8 @@ #include "NVDataMgmt.h" #include "OperationModes.h" #include "Pressures.h" +#include "Reservoirs.h" +#include "ROPump.h" #include "RTC.h" #include "SystemCommMessages.h" #include "TemperatureSensors.h" @@ -98,10 +102,6 @@ #ifdef SKIP_POST postState = DG_POST_STATE_COMPLETED; #endif -#ifdef DONT_SKIP_NV_POST - // Only run NVDataMgmt POST - postState = DG_POST_STATE_NVDATAMGMT; -#endif break; case DG_POST_STATE_FW_COMPATIBILITY: @@ -129,14 +129,12 @@ 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 DG_POST_STATE_TEMPERATURE_SENSORS: -#ifdef DONT_SKIP_NV_POST - // Skip the rest of the POSTs - postState = DG_POST_STATE_COMPLETED; -#else testStatus = execTemperatureSensorsSelfTest(); postState = handlePOSTStatus( testStatus ); -#endif break; case DG_POST_STATE_ACCELEROMETER: @@ -153,29 +151,46 @@ postState = handlePOSTStatus( testStatus ); break; -#ifdef _VECTORCAST_ - case DG_POST_DRAIN_PUMP: + case DG_POST_STATE_RO_PUMP: + testStatus = execROPumpSelfTest(); + postState = handlePOSTStatus( testStatus ); + break; + + case DG_POST_STATE_DRAIN_PUMP: testStatus = execDrainPumpSelfTest(); postState = handlePOSTStatus( testStatus ); break; -// To be able to run integration test in VectorCAST. -// Not all the fans and thermistors have been implemented so POST might fail - case DG_POST_STATE_THERMISTORS: - testStatus = execThermistorsSelfTest(); + + case DG_POST_STATE_CONCENTRATE_PUMPS: + testStatus = execConcenratePumpsSelfTest(); postState = handlePOSTStatus( testStatus ); break; - case DG_POST_STATE_FANS: - testStatus = execFansSelfTest(); + case DG_POST_STATE_CONDUCTIVITY_SENSORS: + testStatus = execConductivitySensorsSelfTest(); postState = handlePOSTStatus( testStatus ); break; + case DG_POST_STATE_RESERVOIRS: + testStatus = execReservoirsSelfTest(); + postState = handlePOSTStatus( testStatus ); + break; + case DG_POST_STATE_UV_REACTORS: testStatus = execUVReactorsSelfTest(); postState = handlePOSTStatus( testStatus ); break; -#endif + case DG_POST_STATE_THERMISTORS: + testStatus = execThermistorsSelfTest(); + postState = handlePOSTStatus( testStatus ); + break; + + case DG_POST_STATE_FANS: + testStatus = execFansSelfTest(); + postState = handlePOSTStatus( testStatus ); + break; + case DG_POST_STATE_WATCHDOG: testStatus = execWatchdogTest(); postState = handlePOSTStatus( testStatus ); @@ -184,7 +199,8 @@ // Should be last POST (and last POST test must be a test that completes in a single call) case DG_POST_STATE_LOAD_CELL: testStatus = execLoadCellsSelfTest(); - handlePOSTStatus( testStatus ); // ignoring return value because last test + handlePOSTStatus( testStatus ); + // Ignoring return value because last test if ( TRUE == tempPOSTPassed ) { postState = DG_POST_STATE_COMPLETED;