Index: firmware/App/Controllers/Valves.h =================================================================== diff -u -r7ce686fa967206c341805b79916298ae187854de -r361e8cae2edec18e5ba1a26690788b5c30ce4833 --- firmware/App/Controllers/Valves.h (.../Valves.h) (revision 7ce686fa967206c341805b79916298ae187854de) +++ firmware/App/Controllers/Valves.h (.../Valves.h) (revision 361e8cae2edec18e5ba1a26690788b5c30ce4833) @@ -19,15 +19,15 @@ /// Valves positions typedef enum valveStatesNames { - VALVE_POSITION_NOT_IN_POSITION = 0, ///< Valve position is unknown - VALVE_POSITION_A_INSERT_EJECT, ///< Valve is in Position A, Insert/Eject - VALVE_POSITION_B_OPEN, ///< Valve is in Position B, Open - VALVE_POSITION_C_CLOSE, ///< Valve is in Position C, Close + VALVE_POSITION_NOT_IN_POSITION = 0, ///< Valve position is unknown (cannot be used as a command) + VALVE_POSITION_A_INSERT_EJECT, ///< Position A, Insert/Eject (current position or commanded) + VALVE_POSITION_B_OPEN, ///< Position B, Open (current position or commanded) + VALVE_POSITION_C_CLOSE, ///< Position C, Close (current position or commanded) NUM_OF_VALVE_POSITIONS, ///< Number of valve positions } VALVE_POSITION_T; -/// Valves names -typedef enum valveNames +/// 3 way valves names +typedef enum valvesNames { VDI = 0, ///< Valve Dialyzer Inlet VDO, ///< Valve Dialyzer Outlet @@ -46,9 +46,9 @@ S16 currentPos; ///< Current position in counts S16 nextPos; ///< Next position in counts F32 current; ///< Current of the valves - S16 posC; - S16 posA; - S16 posB; + S16 posC; ///< Calculated Position C + S16 posA; ///< Calculated Position A + S16 posB; ///< Calculated Position B } HD_VALVE_DATA_T; @@ -63,8 +63,6 @@ HD_VALVE_FAST_DATA_T fastDataRemoveLater; // TODO REMOVE THE struct -HD_VALVE_DATA_T valveData; ///< Valves data struct - // ********** public function prototypes ********* void initValves( void ); @@ -79,7 +77,7 @@ VALVE_POSITION_T getValvePosition( VALVE_T valve ); -BOOL setValveBloodTrap( OPN_CLS_STATE_T state ); +void setValveAirTrap( OPN_CLS_STATE_T state ); BOOL testSetValvesDataPublishInterval( U32 value );