void RobotDrive::ArcadeDrive(GenericHID &moveStick, uint32_t moveAxis, GenericHID &rotateStick, uint32_t rotateAxis, bool squaredInputs) { float moveValue = moveStick.GetRawAxis(moveAxis); float rotateValue = rotateStick.GetRawAxis(rotateAxis); ArcadeDrive(moveValue, rotateValue, squaredInputs); }
/** * Arcade drive implements single stick driving. * Given a single Joystick, the class assumes the Y axis for the move value and the X axis * for the rotate value. * (Should add more information here regarding the way that arcade drive works.) * @param stick The joystick to use for Arcade single-stick driving. The Y-axis will be selected * for forwards/backwards and the X-axis will be selected for rotation rate. * @param squaredInputs If true, the sensitivity will be increased for small values */ void RobotDrive::ArcadeDrive(GenericHID &stick, bool squaredInputs) { // simply call the full-featured ArcadeDrive with the appropriate values ArcadeDrive(stick.GetY(), stick.GetX(), squaredInputs); }
void RobotDrive::TankDrive(GenericHID &leftStick, uint32_t leftAxis, GenericHID &rightStick, uint32_t rightAxis, bool squaredInputs) { TankDrive(leftStick.GetRawAxis(leftAxis), rightStick.GetRawAxis(rightAxis), squaredInputs); }
void RobotDrive::TankDrive(GenericHID &leftStick, GenericHID &rightStick, bool squaredInputs) { TankDrive(leftStick.GetY(), rightStick.GetY(), squaredInputs); }
void RobotDrive::TankDrive(GenericHID &leftStick, UINT32 leftAxis, GenericHID &rightStick, UINT32 rightAxis) { TankDrive(leftStick.GetRawAxis(leftAxis), rightStick.GetRawAxis(rightAxis)); }
void RobotDrive::TankDrive(GenericHID &leftStick, GenericHID &rightStick) { TankDrive(leftStick.GetY(), rightStick.GetY()); }