Class SN_XboxController

java.lang.Object
edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.XboxController
com.frcteam3255.joystick.SN_XboxController
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable

public class SN_XboxController extends edu.wpi.first.wpilibj.XboxController
Custom class for Xbox Controller use
  • 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.HIDType, edu.wpi.first.wpilibj.GenericHID.RumbleType
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
     
     
     
     
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Construct an instance of an SN_XboxController.
    SN_XboxController(int port, double leftDeadband, double rightDeadband)
    Construct an instance of an SN_XboxController.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setLeftDeadband(double deadband)
    Set the deadband for the left joystick.
    void
    setRightDeadband(double deadband)
    Set the deadband for the right joystick.
    void
    setTriggerPressThreshold(double threshold)
    Set the value that the triggers must be at to register as true while being used as a button.

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

    a, b, back, getAButton, getAButtonPressed, getAButtonReleased, getBackButton, getBackButtonPressed, getBackButtonReleased, getBButton, getBButtonPressed, getBButtonReleased, getLeftBumper, getLeftBumperButton, getLeftBumperButtonPressed, getLeftBumperButtonReleased, getLeftBumperPressed, getLeftBumperReleased, getLeftStickButton, getLeftStickButtonPressed, getLeftStickButtonReleased, getLeftTriggerAxis, getLeftX, getLeftY, getRightBumper, getRightBumperButton, getRightBumperButtonPressed, getRightBumperButtonReleased, getRightBumperPressed, getRightBumperReleased, getRightStickButton, getRightStickButtonPressed, getRightStickButtonReleased, getRightTriggerAxis, getRightX, getRightY, getStartButton, getStartButtonPressed, getStartButtonReleased, getXButton, getXButtonPressed, getXButtonReleased, getYButton, getYButtonPressed, getYButtonReleased, initSendable, leftBumper, leftStick, leftTrigger, leftTrigger, rightBumper, rightStick, rightTrigger, rightTrigger, start, x, y

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

    axisGreaterThan, axisLessThan, button, getAxisCount, getAxisType, getButtonCount, getName, getPort, getPOV, getPOV, getPOVCount, getRawAxis, getRawButton, getRawButtonPressed, getRawButtonReleased, getType, isConnected, pov, pov, povCenter, povDown, povDownLeft, povDownRight, povLeft, povRight, povUp, povUpLeft, povUpRight, setOutput, setOutputs, setRumble

    Methods inherited from class java.lang.Object

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

    • btn_A

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_A
    • btn_B

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_B
    • btn_X

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_X
    • btn_Y

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_Y
    • btn_LeftBumper

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_LeftBumper
    • btn_RightBumper

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_RightBumper
    • btn_Start

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_Start
    • btn_Back

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_Back
    • btn_LeftStick

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_LeftStick
    • btn_RightStick

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_RightStick
    • btn_North

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_North
    • btn_NorthEast

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_NorthEast
    • btn_East

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_East
    • btn_SouthEast

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_SouthEast
    • btn_South

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_South
    • btn_SouthWest

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_SouthWest
    • btn_West

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_West
    • btn_NorthWest

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_NorthWest
    • btn_LeftTrigger

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_LeftTrigger
    • btn_RightTrigger

      public edu.wpi.first.wpilibj2.command.button.Trigger btn_RightTrigger
    • axis_LeftX

      public DoubleSupplier axis_LeftX
    • axis_LeftY

      public DoubleSupplier axis_LeftY
    • axis_RightX

      public DoubleSupplier axis_RightX
    • axis_RightY

      public DoubleSupplier axis_RightY
    • axis_LeftTrigger

      public DoubleSupplier axis_LeftTrigger
    • axis_RightTrigger

      public DoubleSupplier axis_RightTrigger
  • Constructor Details

    • SN_XboxController

      public SN_XboxController(int port, double leftDeadband, double rightDeadband)
      Construct an instance of an SN_XboxController.
      Parameters:
      port - The port index on the Driver Station that the controller is plugged into.
      leftDeadband - The deadband for the left joystick.
      rightDeadband - The deadband for the right joystick.
    • SN_XboxController

      public SN_XboxController(int port)
      Construct an instance of an SN_XboxController.
      Parameters:
      port - The port index on the Driver Station that the controller is plugged into.
  • Method Details

    • setTriggerPressThreshold

      public void setTriggerPressThreshold(double threshold)
      Set the value that the triggers must be at to register as true while being used as a button. A value of zero will make the trigger act as a hair trigger (will activate at the slightest touch) and a value of one will make the trigger be held all the way down to activate.

      Default value is 0.5

      Parameters:
      threshold - for trigger button
    • setLeftDeadband

      public void setLeftDeadband(double deadband)
      Set the deadband for the left joystick.

      Default value is 0.1

      Parameters:
      deadband - to set for the left joystick
    • setRightDeadband

      public void setRightDeadband(double deadband)
      Set the deadband for the right joystick.

      Default value is 0.1

      Parameters:
      deadband - to set for the right joystick