Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
/**
 * 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);
}
Ejemplo n.º 3
0
void RobotDrive::TankDrive(GenericHID &leftStick, uint32_t leftAxis,
		GenericHID &rightStick, uint32_t rightAxis, bool squaredInputs)
{
	TankDrive(leftStick.GetRawAxis(leftAxis), rightStick.GetRawAxis(rightAxis), squaredInputs);
}
Ejemplo n.º 4
0
void RobotDrive::TankDrive(GenericHID &leftStick, GenericHID &rightStick, bool squaredInputs)
{
	TankDrive(leftStick.GetY(), rightStick.GetY(), squaredInputs);
}
Ejemplo n.º 5
0
void RobotDrive::TankDrive(GenericHID &leftStick, UINT32 leftAxis,
		GenericHID &rightStick, UINT32 rightAxis)
{
	TankDrive(leftStick.GetRawAxis(leftAxis), rightStick.GetRawAxis(rightAxis));
}
Ejemplo n.º 6
0
void RobotDrive::TankDrive(GenericHID &leftStick, GenericHID &rightStick)
{
	TankDrive(leftStick.GetY(), rightStick.GetY());
}