Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r24b2fe72608344e67ef37234085d15ad5e4fcc37 -r2acaf549519854f7e6de1511d541582267f4d1e8 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 24b2fe72608344e67ef37234085d15ad5e4fcc37) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 2acaf549519854f7e6de1511d541582267f4d1e8) @@ -21,6 +21,7 @@ #include "FPGA.h" #include "MessageSupport.h" +#include "NVDataMgmt.h" #include "SafetyShutdown.h" #include "SystemCommMessages.h" #include "TaskPriority.h" @@ -225,6 +226,7 @@ static U16 valvesControlSetBits = 0x0000; ///< Valves control set bit static OPN_CLS_STATE_T valveAirTrapStatus; ///< Air trap valve status (open/close) +static HD_VALVES_CAL_RECORD_T valvesCalibrationRecord; ///< Valves calibration record. // Self test function prototypes static VALVE_SELF_TEST_STATE_T handleValveSelfTestEnableValves( void ); @@ -567,7 +569,10 @@ { VALVE_SELF_TEST_STATE_T state = VALVE_SELF_TEST_COMPLETE; - if ( TRUE == areValvesFunctional() ) + BOOL calStatus = getNVRecord2Driver( GET_CAL_VALVES, (U08*)&valvesCalibrationRecord, sizeof( HD_VALVES_CAL_RECORD_T ), + NUM_OF_CAL_DATA_HD_VALVES, ALARM_ID_NO_ALARM ); + + if ( ( TRUE == areValvesFunctional() ) && ( TRUE == calStatus ) ) { valvesSelfTestResult = SELF_TEST_STATUS_PASSED; }