Index: firmware/App/Controllers/Valves.c =================================================================== diff -u -r61153247029a9a246ca1beadc66d772e3e583e4e -r37a8a58b766a496b39241dd7ae46dc10dbda35e4 --- firmware/App/Controllers/Valves.c (.../Valves.c) (revision 61153247029a9a246ca1beadc66d772e3e583e4e) +++ firmware/App/Controllers/Valves.c (.../Valves.c) (revision 37a8a58b766a496b39241dd7ae46dc10dbda35e4) @@ -235,10 +235,9 @@ /*********************************************************************//** * @brief * The initValves function initializes the valves driver. - * @details - * Inputs: valveSelfTestState, valvesSelfTestResult, valvesStatus, + * @details Inputs: valveSelfTestState, valvesSelfTestResult, valvesStatus, * valvesControlSetBits - * Outputs: valveSelfTestState, valvesSelfTestResult, valvesStatus + * @details Outputs: valveSelfTestState, valvesSelfTestResult, valvesStatus * @return none *************************************************************************/ void initValves( void ) @@ -264,9 +263,8 @@ /*********************************************************************//** * @brief * The homeValve function sets the homing request flag of a valve to TRUE. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus (The flag that sets the homing request) + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus (The flag that sets the homing request) * @param valve that is set to be homed * @return none *************************************************************************/ @@ -278,9 +276,8 @@ /*********************************************************************//** * @brief * The setValvePosition function sets the requested position of a valve. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its position is set * @param position that the valve is set * @return returns TRUE if the requested position was legal @@ -305,9 +302,8 @@ /*********************************************************************//** * @brief * The getValvePosition function returns the current position of a valve. - * @details - * Inputs: none - * Outputs: valvesStatus + * @details Inputs: none + * @details Outputs: valvesStatus * @param valve that the position is requested * @return returns the current position of the valve in enum *************************************************************************/ @@ -320,9 +316,8 @@ * @brief * The setValveBloodTrap function set the blood trap valve to open or close * position. - * @details - * Inputs: none - * Outputs: none + * @details Inputs: none + * @details Outputs: none * @param: state enumeration of open or close for valve * @return: none *************************************************************************/ @@ -341,9 +336,8 @@ /*********************************************************************//** * @brief * The execValvesSelfTest function executes the valves self test. - * @details - * Inputs: valveSelfTestState - * Outputs: valveSelfTestState + * @details Inputs: valveSelfTestState + * @details Outputs: valveSelfTestState * @return valvesSelfTestResult The status of the self test *************************************************************************/ SELF_TEST_STATUS_T execValvesSelfTest( void ) @@ -374,9 +368,8 @@ /*********************************************************************//** * @brief * The execValves function executes the valves exec state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ void execValves( void ) @@ -436,9 +429,8 @@ /*********************************************************************//** * @brief * The handleValveSelfTestEnableValves function starts the valves self test. - * @details - * Inputs: valvesSelfTestResult, valvesSelfTestResult - * Outputs: valvesSelfTestResult, valvesSelfTestResult + * @details Inputs: valvesSelfTestResult, valvesSelfTestResult + * @details Outputs: valvesSelfTestResult, valvesSelfTestResult * @return next state of the self test state machine *************************************************************************/ static VALVE_SELF_TEST_STATE_T handleValveSelfTestEnableValves( void ) @@ -464,9 +456,8 @@ * @brief * The handleValveSelfTestConfirmEnable function checks to make sure the * valves are enabled properly. - * @details - * Inputs: valvesSelfTestResult - * Outputs: valvesSelfTestResult + * @details Inputs: valvesSelfTestResult + * @details Outputs: valvesSelfTestResult * @return next state of the self test state machine *************************************************************************/ static VALVE_SELF_TEST_STATE_T handleValveSelfTestConfirmEnable( void ) @@ -491,9 +482,8 @@ /*********************************************************************//** * @brief * The handleValveStateWaitForPost function handles the wait for POST state. - * @details - * Inputs: valveSelfTestState - * Outputs: none + * @details Inputs: valveSelfTestState + * @details Outputs: none * @param valve that is waiting for POST to complete * @return next state of exec state *************************************************************************/ @@ -513,9 +503,8 @@ * @brief * The handleValveStateHomingNotStarted function handles homing not started * state of the state machine. - * @details - * Inputs: valvesStatus, valveSelfTestState, isDoorClosed - * Outputs: valvesStatus + * @details Inputs: valvesStatus, valveSelfTestState, isDoorClosed + * @details Outputs: valvesStatus * @param valve that is set to be homed * @return next state of the exec state machine *************************************************************************/ @@ -553,9 +542,8 @@ * @brief * The handleValveStateHomingFindEnergizedEdge function handles find * energized state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its energized edge is found * @return next state of the exec state machine *************************************************************************/ @@ -598,9 +586,8 @@ * @brief * The handleValveStateHomingFindDeenergizedEdge function handles find * de-energized state of the state machine. - * @details. - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its de-energized edge is found * @return next state of the exec state machine *************************************************************************/ @@ -673,9 +660,8 @@ * @brief * The handleValveStateIdle function handles the idle state of the valves * state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in idle state * @return next state of the exec state machine *************************************************************************/ @@ -726,9 +712,8 @@ * @brief * The handleValveStateInTransition function handles the in transition * state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in position transition * @return next state of the exec state machine *************************************************************************/ @@ -780,9 +765,8 @@ * @brief * The handleValveStateInBypassMode function handles the bypass mode * state of the state machine. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that is in position transition * @return next state of the exec state machine *************************************************************************/ @@ -816,10 +800,9 @@ /*********************************************************************//** * @brief * The setValveControlMode function sets the valves control mode. - * @details - * Inputs: valvesControlSetBits, valvesControlModesSetBits, + * @details Inputs: valvesControlSetBits, valvesControlModesSetBits, * valvesControlModesResetBits - * Outputs: valvesControlSetBits + * @details Outputs: valvesControlSetBits * @param valve that its control mode is set * @param mode the control mode that the valve will be set to * @return none @@ -843,9 +826,8 @@ * @brief * The execMonitorValves function handles monitoring of the valves. The * function calls other functions to monitor the values. - * @details - * Inputs: none - * Outputs: none + * @details Inputs: none + * @details Outputs: none * @return none *************************************************************************/ static void execMonitorValves( void ) @@ -876,9 +858,8 @@ * The areValvesEnabled function checks the current valves status from FPGA * to the enable bit mask of each valve. If any of the valves is not enabled * the function raises an alarm. - * @details - * Inputs: valvesStatus, valvesControlStatusBits - * Outputs: none + * @details Inputs: valvesStatus, valvesControlStatusBits + * @details Outputs: none * @return Returns TRUE if all the valves are enabled properly *************************************************************************/ static BOOL areValvesFunctional( void ) @@ -932,9 +913,8 @@ /*********************************************************************//** * @brief * The setFPGAValue function sets the position of a valve to FPGA. - * @details - * Inputs: none - * Outputs: none + * @details Inputs: none + * @details Outputs: none * @param valve that its FPGA set point is updated * @param position that is set in counts * @param enableCurrentRelaxation flag. Indicates whether current relaxation @@ -981,9 +961,8 @@ * The convertAndMonitorValvesCurrent function gets the current values * in counts from FPGA and converts them to current. If any of the values * is above the threshold, the function raises an alarm. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void convertAndMonitorValvesCurrent( void ) @@ -1034,9 +1013,8 @@ * checks whether any of the valves have deviated from their current position \n * if they are in idle state. If any of the valves have deviated, the function \n * raises an alarm. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void getAndMonitorValvesCurrentPosition( void ) @@ -1089,9 +1067,8 @@ * @brief * The getPublishValvesDataInterval function gets the valves data publish * interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: none + * @details Inputs: valvesDataPublishInterval + * @details Outputs: none * @return data publish time interval *************************************************************************/ U32 getPublishValvesDataInterval( void ) @@ -1110,9 +1087,8 @@ * @brief * The publishValvesData function publishes the data of the valves at the * specified time interval. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its data is published * @return none *************************************************************************/ @@ -1143,9 +1119,8 @@ * @brief * The setValveNextStep function calculates the next step of a valve and * calls another function to set the next step. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its next step is calculated and set * @return none *************************************************************************/ @@ -1203,9 +1178,8 @@ * The setFPGAValvePWM function checks whether the valve should be moving * CW or CCW and converts the PWM in percent to PWM in counts accordingly. * The converted PWM in counts is set via the FPGA functions. - * @details - * Inputs: valvesStatus - * Outputs: none + * @details Inputs: valvesStatus + * @details Outputs: none * @param valve which its PWM is being set * @return none *************************************************************************/ @@ -1252,9 +1226,8 @@ * @brief * The getValvesCurrentPWM function gets the PWM counts from the FPGA module * and converts them in to duty cycle in percent. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @return none *************************************************************************/ static void getValvesCurrentPWM( void ) @@ -1293,9 +1266,8 @@ * @brief * The testSetValvesDataPublishInterval function overrides the valves data * publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @param value which is override value for the valve data publish interval * @return TRUE if override successful, FALSE if not *************************************************************************/ @@ -1319,9 +1291,8 @@ * @brief * The testResetValvesDataPublishInterval function resets the override * of the valves publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @return TRUE if override reset successful, FALSE if not *************************************************************************/ BOOL testResetValvesDataPublishInterval( void ) @@ -1341,9 +1312,8 @@ /*********************************************************************//** * @brief * The testSetValvesPositionOverride function overrides the valves position. - * @details - * Inputs: valvesPositionOverride, valvesStatus - * Outputs: valvesPositionOverride + * @details Inputs: valvesPositionOverride, valvesStatus + * @details Outputs: valvesPositionOverride * @param valve to override its position * @param position of the valve that will be overridden * @return TRUE if override successful, FALSE if not @@ -1372,9 +1342,8 @@ * @brief * The testResetValvesDataPublishInterval function resets the override * of the valves publish interval. - * @details - * Inputs: valvesDataPublishInterval - * Outputs: valvesDataPublishInterval + * @details Inputs: valvesDataPublishInterval + * @details Outputs: valvesDataPublishInterval * @param valve that its data publish will be overridden * @return TRUE if override reset successful, FALSE if not *************************************************************************/ @@ -1398,9 +1367,8 @@ * @brief * The testSetValvePWMOverride function overrides the valves PWM in bypass * control mode. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve to override its PWM * @param pwm in percent * @param direction of the movement of the valve in clockwise or counter @@ -1442,9 +1410,8 @@ * @brief * The testResetValvePWMOverride function resets the override PWM in bypass * control mode. - * @details - * Inputs: valvesStatus - * Outputs: valvesStatus + * @details Inputs: valvesStatus + * @details Outputs: valvesStatus * @param valve that its data publish will be overridden * @return TRUE if override reset successful, FALSE if not *************************************************************************/