Index: firmware/App/Services/FpgaTD.c =================================================================== diff -u -r0054e875bf1b9a85d017e6e388b225f51ae6d032 -re7fc14ea1f82609c49bd3e82480523fe312a27f2 --- firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision 0054e875bf1b9a85d017e6e388b225f51ae6d032) +++ firmware/App/Services/FpgaTD.c (.../FpgaTD.c) (revision e7fc14ea1f82609c49bd3e82480523fe312a27f2) @@ -46,8 +46,8 @@ #define MIN_POWER_ON_TIME_FOR_COMM_FAILS ( 1 * MS_PER_SECOND ) ///< Allow FPGA comm errors for first second after power-up #define FPGA_H4_ENABLE_BIT_MASK 0x01 ///< Bit mask for enabling the blood pump. -#define FPGA_H4_DIRECTION_REV_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction. -#define FPGA_H4_BRAKE_AND_HOLD_TORQUE 0x05 ///< Bit mask for braking the blood pump while holding the torque of the pump. +#define FPGA_H4_DIR_FORWARD_BIT_MASK 0x02 ///< Bit mask for setting the blood pump direction. +#define FPGA_H4_BRAKE_AND_HOLD_TORQUE 0x06 ///< Bit mask for braking the blood pump while holding the torque of the pump. #define FPGA_H13_OPEN_BIT_MASK 0x01 ///< Bit mask for setting H13 valve position to open. #define FPGA_H20_OPEN_BIT_MASK 0x02 ///< Bit mask for setting H20 valve position to open. @@ -476,13 +476,14 @@ *************************************************************************/ void setH4Direction( MOTOR_DIR_T dir ) { - if ( MOTOR_DIR_REVERSE == dir ) + if ( MOTOR_DIR_FORWARD == dir ) { - fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIRECTION_REV_BIT_MASK; + fpgaActuatorSetPoints.h4Control &= ~( 1 << 2 ); + fpgaActuatorSetPoints.h4Control |= FPGA_H4_DIR_FORWARD_BIT_MASK; } else { - fpgaActuatorSetPoints.h4Control &= ~((U08)FPGA_H4_DIRECTION_REV_BIT_MASK); + fpgaActuatorSetPoints.h4Control &= ~((U08)FPGA_H4_DIR_FORWARD_BIT_MASK); } }