Class RumbleXboxController

java.lang.Object
edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.XboxController
frc.robot.userinterface.RumbleXboxController

public class RumbleXboxController
extends edu.wpi.first.wpilibj.XboxController
An Xbox controller with added vibrational capabilities.
  • Nested Class Summary

    Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.XboxController

    edu.wpi.first.wpilibj.XboxController.Axis, edu.wpi.first.wpilibj.XboxController.Button

    Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.GenericHID

    edu.wpi.first.wpilibj.GenericHID.Hand, edu.wpi.first.wpilibj.GenericHID.HIDType, edu.wpi.first.wpilibj.GenericHID.RumbleType
  • Field Summary

    Fields 
    Modifier and Type Field Description
    edu.wpi.first.wpilibj2.command.button.JoystickButton A  
    edu.wpi.first.wpilibj2.command.button.JoystickButton B  
    edu.wpi.first.wpilibj2.command.button.JoystickButton LB  
    edu.wpi.first.wpilibj2.command.button.JoystickButton LS  
    edu.wpi.first.wpilibj2.command.button.JoystickButton RB  
    edu.wpi.first.wpilibj2.command.button.JoystickButton RS  
    edu.wpi.first.wpilibj2.command.button.JoystickButton X  
    edu.wpi.first.wpilibj2.command.button.JoystickButton Y  
  • Constructor Summary

    Constructors 
    Constructor Description
    RumbleXboxController​(int port)  
  • Method Summary

    Modifier and Type Method Description
    double getLeftJoystickX()  
    double getLeftJoystickY()  
    double getLeftTrigger()  
    int getPOVAngle()  
    double getRightJoystickX()  
    double getRightJoystickY()  
    double getRightTrigger()  
    void setRumble​(double intensity)
    Sets the degree to which the Xbox controller rumbles.

    Methods inherited from class edu.wpi.first.wpilibj.XboxController

    getAButton, getAButtonPressed, getAButtonReleased, getBackButton, getBackButtonPressed, getBackButtonReleased, getBButton, getBButtonPressed, getBButtonReleased, getBumper, getBumperPressed, getBumperReleased, getStartButton, getStartButtonPressed, getStartButtonReleased, getStickButton, getStickButtonPressed, getStickButtonReleased, getTriggerAxis, getX, getXButton, getXButtonPressed, getXButtonReleased, getY, getYButton, getYButtonPressed, getYButtonReleased

    Methods inherited from class edu.wpi.first.wpilibj.GenericHID

    getAxisCount, getAxisType, getButtonCount, getName, getPort, getPOV, getPOV, getPOVCount, getRawAxis, getRawButton, getRawButtonPressed, getRawButtonReleased, getType, getX, getY, isConnected, setOutput, setOutputs, setRumble

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • A

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton A
    • B

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton B
    • X

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton X
    • Y

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton Y
    • LB

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton LB
    • RB

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton RB
    • LS

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton LS
    • RS

      public final edu.wpi.first.wpilibj2.command.button.JoystickButton RS
  • Constructor Details

    • RumbleXboxController

      public RumbleXboxController​(int port)
      Parameters:
      port - The port the joystick is plugged into (usually 1 or 2)
  • Method Details

    • getLeftJoystickX

      public double getLeftJoystickX()
      Returns:
      The X axis of the left joystick (-1 to 1).
    • getLeftJoystickY

      public double getLeftJoystickY()
      Returns:
      The Y axis of the left joystick (-1 to 1).
    • getRightJoystickX

      public double getRightJoystickX()
      Returns:
      The X axis of the right joystick (-1 to 1).
    • getRightJoystickY

      public double getRightJoystickY()
      Returns:
      The Y axis of the right joystick (-1 to 1).
    • getLeftTrigger

      public double getLeftTrigger()
      Returns:
      The degree to which the left trigger has been pushed (0 to 1).
    • getRightTrigger

      public double getRightTrigger()
      Returns:
      The degree to which the right trigger has been pushed (0 to 1).
    • getPOVAngle

      public int getPOVAngle()
    • setRumble

      public void setRumble​(double intensity)
      Sets the degree to which the Xbox controller rumbles.
      Parameters:
      intensity - The value to set the rumble to (0 to 1).