Index: firmware/App/Controllers/Valves.h =================================================================== diff -u -ra4f5ed3748870d287a4c2c6fcc003fc4d3b9233f -r5a04a1445b684aedd199e0294311db468635c152 --- firmware/App/Controllers/Valves.h (.../Valves.h) (revision a4f5ed3748870d287a4c2c6fcc003fc4d3b9233f) +++ firmware/App/Controllers/Valves.h (.../Valves.h) (revision 5a04a1445b684aedd199e0294311db468635c152) @@ -8,7 +8,8 @@ /** * @defgroup Valves Valves * @brief Valves module - * Driver that runs the valves in HD. + * Driver that runs the valves in HD. The driver can home the valves + * as well as setting a position. * * @addtogroup Valves * @{ @@ -50,8 +51,10 @@ S16 posA; ///< Calculated Position A S16 posB; ///< Calculated Position B U32 pwm; ///< Valve PWM in the bypass mode + U32 airTrapValve; ///< Air trap valve status } HD_VALVE_DATA_T; +#pragma pack(pop) /// HD valves PWM override payload typedef struct @@ -62,17 +65,6 @@ U32 direction; ///< Valve direction } OVERRIDE_VALVES_PWM_DIR_SET_PAYLOAD_T; -// TODO REMOVE the struct -typedef struct -{ - S16 currentPos; - F32 current; - S16 cmdPosition; -} HD_VALVE_FAST_DATA_T; -#pragma pack(pop) -HD_VALVE_FAST_DATA_T fastDataRemoveLater; -// TODO REMOVE THE struct - // ********** public function prototypes ********* void initValves( void ); @@ -81,14 +73,16 @@ void execValves( void ); -void homeValve( VALVE_T valve ); +BOOL homeValve( VALVE_T valve ); BOOL setValvePosition( VALVE_T valve, VALVE_POSITION_T position ); VALVE_POSITION_T getValvePosition( VALVE_T valve ); void setValveAirTrap( OPN_CLS_STATE_T state ); +OPN_CLS_STATE_T getValveAirTrapStatus( void ); + BOOL testSetValvesDataPublishInterval( U32 value ); BOOL testResetValvesDataPublishInterval( void );