Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r5e92f2578534a1f51e10d181d2566939b890e687 -ra0b8983fa00aa8e2e8ec74744978cffaa4011dcd --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 5e92f2578534a1f51e10d181d2566939b890e687) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision a0b8983fa00aa8e2e8ec74744978cffaa4011dcd) @@ -324,6 +324,31 @@ /*********************************************************************//** * @brief + * The execValvesSelfTest function executes the valves self-test. Calibration + * factors are loaded from non-volatile memory and CRC checked. + * @details \b Inputs: Calibration record stored in non-volatile memory. + * @details \b Outputs: valvesCalibrationRecord + * @return self-test result (pass/fail) + *************************************************************************/ +SELF_TEST_STATUS_T execValvesSelfTest( void ) +{ + BOOL calStatus = TRUE; /* TODO getNVRecord2Driver( GET_CAL_VALVES, (U08*)&valvesCalibrationRecord, sizeof( HD_VALVES_CAL_RECORD_T ), + NUM_OF_CAL_DATA_HD_VALVES, ALARM_ID_NO_ALARM );*/ + + if ( TRUE == calStatus ) + { + valvesSelfTestResult = SELF_TEST_STATUS_PASSED; + } + else + { + valvesSelfTestResult = SELF_TEST_STATUS_FAILED; + } + + return valvesSelfTestResult; +} + +/*********************************************************************//** + * @brief * The handleValvesWait4PostState function handles the Wait for POST state * of the state machine for a given valve. * @details \b Inputs: current operating mode @@ -613,31 +638,6 @@ /*********************************************************************//** * @brief - * The execValvesSelfTest function executes the valves self-test. Calibration - * factors are loaded from non-volatile memory and CRC checked. - * @details \b Inputs: Calibration record stored in non-volatile memory. - * @details \b Outputs: valvesCalibrationRecord - * @return self-test result (pass/fail) - *************************************************************************/ -SELF_TEST_STATUS_T execValvesSelfTest( void ) -{ - BOOL calStatus = TRUE; /* TODO getNVRecord2Driver( GET_CAL_VALVES, (U08*)&valvesCalibrationRecord, sizeof( HD_VALVES_CAL_RECORD_T ), - NUM_OF_CAL_DATA_HD_VALVES, ALARM_ID_NO_ALARM );*/ - - if ( TRUE == calStatus ) - { - valvesSelfTestResult = SELF_TEST_STATUS_PASSED; - } - else - { - valvesSelfTestResult = SELF_TEST_STATUS_FAILED; - } - - return valvesSelfTestResult; -} - -/*********************************************************************//** - * @brief * The checkValveInRange function checks whether the selected valve is in range * and if not it will trigger the provided software fault. * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if given valve is invalid.