Package com.frcteam3255.joystick
Class SN_DualActionStick
java.lang.Object
edu.wpi.first.wpilibj.GenericHID
edu.wpi.first.wpilibj.Joystick
com.frcteam3255.joystick.SN_DualActionStick
public class SN_DualActionStick
extends edu.wpi.first.wpilibj.Joystick
Custom 12 Button Joystick set up for Logitech F310 Gamepad
Adds custom axis return methods such as getArcadeMove() and
getArcadeRotate()
-
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 2edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 3edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 9edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 5edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 11edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 7edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 6edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 12edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 8edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 10edu.wpi.first.wpilibj2.command.button.JoystickButtonJoystick Button 1edu.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.POVButtonFields inherited from class edu.wpi.first.wpilibj.Joystick
kDefaultThrottleChannel, kDefaultTwistChannel, kDefaultXChannel, kDefaultYChannel, kDefaultZChannel -
Constructor Summary
ConstructorsConstructorDescriptionSN_DualActionStick(int port) Logitech F310 Gamepad with 12 Buttons and custom Axes -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoublegetAxisVar(SN_IntPreference axisId) doubledoubledoubledoubledoubledoubleMethods 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_X
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_XJoystick Button 1 -
btn_A
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_AJoystick Button 2 -
btn_B
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_BJoystick 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_LTrig
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LTrigJoystick Button 7 -
btn_RTrig
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RTrigJoystick Button 8 -
btn_Back
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_BackJoystick Button 9 -
btn_Start
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_StartJoystick Button 10 -
btn_LStick
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_LStickJoystick Button 11 -
btn_RStick
public edu.wpi.first.wpilibj2.command.button.JoystickButton btn_RStickJoystick Button 12 -
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
-
-
Constructor Details
-
SN_DualActionStick
public SN_DualActionStick(int port) Logitech F310 Gamepad with 12 Buttons and custom Axes- 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(2)
-
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)
-
getLeftStickX
public double getLeftStickX()- Returns:
- position value of RawAxis(0)
-
getLeftStickY
public double getLeftStickY()- Returns:
- inverted position value of RawAxis(1)
-
getRightStickX
public double getRightStickX()- Returns:
- position value of RawAxis(2)
-
getRightStickY
public double getRightStickY()- Returns:
- inverted position value of RawAxis(3)
-
getAxisVar
- Parameters:
axisId- id number of controller axis, viewable in this file if needed- Returns:
- position value of RawAxis(axisId)
-