Class SN_F310Gamepad

java.lang.Object
edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.Joystick
com.frcteam3255.joystick.SN_F310Gamepad

public class SN_F310Gamepad extends edu.wpi.first.wpilibj.Joystick
Custom Joystick for the Logitech F310

When the switch on the back of the controller is flipped to the X setting, the triggers register as analog inputs. This custom joystick utilizes those analog triggers.

  • Nested Class Summary

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

    edu.wpi.first.wpilibj.Joystick.AxisType, edu.wpi.first.wpilibj.Joystick.ButtonType

    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.JoystickButton
    Joystick Button 1
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 2
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 7
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 5
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 9
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 6
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 10
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 8
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 3
    edu.wpi.first.wpilibj2.command.button.JoystickButton
    Joystick Button 4
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.POVButton
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     
    edu.wpi.first.wpilibj2.command.button.Trigger
     

    Fields inherited from class edu.wpi.first.wpilibj.Joystick

    kDefaultThrottleChannel, kDefaultTwistChannel, kDefaultXChannel, kDefaultYChannel, kDefaultZChannel
  • Constructor Summary

    Constructors
    Constructor
    Description
    SN_F310Gamepad(int port)
    Logitech F310 Gamepad
  • Method Summary

    Modifier and Type
    Method
    Description
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     
    double
     

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

    getDirectionDegrees, getDirectionRadians, getMagnitude, getThrottle, getThrottleChannel, getTop, getTopPressed, getTopReleased, getTrigger, getTriggerPressed, getTriggerReleased, getTwist, getTwistChannel, getX, getXChannel, getY, getYChannel, getZ, getZChannel, setThrottleChannel, setTwistChannel, setXChannel, setYChannel, setZChannel, top, trigger

    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.JoystickButton btn_A
      Joystick Button 1
    • btn_B

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_B
      Joystick Button 2
    • btn_X

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_X
      Joystick Button 3
    • btn_Y

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_Y
      Joystick Button 4
    • btn_LBump

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LBump
      Joystick Button 5
    • btn_RBump

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RBump
      Joystick Button 6
    • btn_Back

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_Back
      Joystick Button 7
    • btn_Start

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_Start
      Joystick Button 8
    • btn_LStick

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LStick
      Joystick Button 9
    • btn_RStick

      public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RStick
      Joystick Button 10
    • POV_North

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_North
    • POV_NorthEast

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_NorthEast
    • POV_East

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_East
    • POV_SouthEast

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_SouthEast
    • POV_South

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_South
    • POV_SouthWest

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_SouthWest
    • POV_West

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_West
    • POV_NorthWest

      public edu.wpi.first.wpilibj2.command.button.POVButton POV_NorthWest
    • trig_LT

      public edu.wpi.first.wpilibj2.command.button.Trigger trig_LT
    • trig_RT

      public edu.wpi.first.wpilibj2.command.button.Trigger trig_RT
  • Constructor Details

    • SN_F310Gamepad

      public SN_F310Gamepad(int port)
      Logitech F310 Gamepad
      Parameters:
      port - The port on the Driver Station that the joystick is plugged into.
  • Method Details

    • getArcadeMove

      public double getArcadeMove()
      Returns:
      inverted position value of RawAxis(1)
    • getArcadeRotate

      public double getArcadeRotate()
      Returns:
      position value of RawAxis(4)
    • getArcadeStrafe

      public double getArcadeStrafe()
      Returns:
      inverted position value of RawAxis(0)
    • getTankLeft

      public double getTankLeft()
      Returns:
      inverted position value of RawAxis(1)
    • getTankRight

      public double getTankRight()
      Returns:
      inverted position value of RawAxis(5)
    • getAxisLSX

      public double getAxisLSX()
      Returns:
      position value of RawAxis(0)
    • getAxisLSY

      public double getAxisLSY()
      Returns:
      inverted position value of RawAxis(1)
    • getAxisLT

      public double getAxisLT()
      Returns:
      position value of RawAxis(2)
    • getAxisRT

      public double getAxisRT()
      Returns:
      position value of RawAxis(3)
    • getAxisRSX

      public double getAxisRSX()
      Returns:
      position value of RawAxis(4)
    • getAxisRSY

      public double getAxisRSY()
      Returns:
      inverted position value of RawAxis(5)
    • getAxisVar

      public double getAxisVar(SN_IntPreference axisId)
      Parameters:
      axisId - SN_IntPreference
      Returns:
      position value of axis