Index: firmware/App/Drivers/RotaryValve.c =================================================================== diff -u -reef24091316f7c4b5717e72fef7ca06e58fc174a -ra0b8983fa00aa8e2e8ec74744978cffaa4011dcd --- firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision eef24091316f7c4b5717e72fef7ca06e58fc174a) +++ firmware/App/Drivers/RotaryValve.c (.../RotaryValve.c) (revision a0b8983fa00aa8e2e8ec74744978cffaa4011dcd) @@ -186,36 +186,6 @@ /*********************************************************************//** * @brief - * The getValveStatus function gets the current status for a given valve. - * Status bits: - * 0-motor driver fault - * 1-direction fault - * 2-incorrect encoder sensor fault - * 3..7-reserved - * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if invalid valve given. - * @details \b Inputs: valveStatus[] - * @details \b Outputs: none - * @param valve ID of valve to get status for - * @return Status for the given valve - *************************************************************************/ -static U08 getValveStatus( VALVE_T valve ) -{ - U08 result = 0; - - if ( valve < NUM_OF_VALVES ) - { - result = getU08OverrideValue( &valveStatus[ valve ] ); - } - else - { - SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_VALVES_INVALID_VALVE4, (U32)valve ) - } - - return result; -} - -/*********************************************************************//** - * @brief * The resetValve function resets the valve. * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if invalid valve given. * @details \b Inputs: none @@ -413,7 +383,37 @@ return maxEncoderValue; } +/*********************************************************************//** + * @brief + * The getValveStatus function gets the current status for a given valve. + * Status bits: + * 0-motor driver fault + * 1-direction fault + * 2-incorrect encoder sensor fault + * 3..7-reserved + * @details \b Alarm: ALARM_ID_TD_SOFTWARE_FAULT if invalid valve given. + * @details \b Inputs: valveStatus[] + * @details \b Outputs: none + * @param valve ID of valve to get status for + * @return Status for the given valve + *************************************************************************/ +static U08 getValveStatus( VALVE_T valve ) +{ + U08 result = 0; + if ( valve < NUM_OF_VALVES ) + { + result = getU08OverrideValue( &valveStatus[ valve ] ); + } + else + { + SET_ALARM_WITH_2_U32_DATA( ALARM_ID_TD_SOFTWARE_FAULT, SW_FAULT_ID_VALVES_INVALID_VALVE4, (U32)valve ) + } + + return result; +} + + /************************************************************************* * TEST SUPPORT FUNCTIONS *************************************************************************/