Package com.frcteam3255.joystick
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.ButtonTypeNested classes/interfaces inherited from class edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.GenericHID.HIDType, edu.wpi.first.wpilibj.GenericHID.RumbleType -
Field Summary
FieldsModifier and TypeFieldDescriptionedu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 1edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 2edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 7edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 5edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 9edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 6edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 10edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 8edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 3edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 4edu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.POVButtonedu.wpi.first.wpilibj2.command.button.Triggeredu.wpi.first.wpilibj2.command.button.TriggerFields inherited from class edu.wpi.first.wpilibj.Joystick
kDefaultThrottleChannel, kDefaultTwistChannel, kDefaultXChannel, kDefaultYChannel, kDefaultZChannel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoubledoubledoubledoubledoubledoublegetAxisVar(SN_IntPreference axisId) doubledoubleMethods 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, triggerMethods 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
-
Field Details
-
btn_A
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_AJoystick Button 1 -
btn_B
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_BJoystick Button 2 -
btn_X
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_XJoystick Button 3 -
btn_Y
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_YJoystick Button 4 -
btn_LBump
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LBumpJoystick Button 5 -
btn_RBump
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RBumpJoystick Button 6 -
btn_Back
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_BackJoystick Button 7 -
btn_Start
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_StartJoystick Button 8 -
btn_LStick
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LStickJoystick Button 9 -
btn_RStick
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RStickJoystick 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
- Parameters:
axisId- SN_IntPreference- Returns:
- position value of axis
-