public abstract class GameController extends Joystick
Modifier and Type | Field and Description |
---|---|
Timer |
rumbleTimer |
Constructor and Description |
---|
GameController(int port)
Creates a GameController on a port.
|
Modifier and Type | Method and Description |
---|---|
Direction |
getDPad()
Gives the current Direction of the DPad.
|
abstract double |
getX2()
Gets the X axis of the second joystick.
|
abstract double |
getY2()
Gets the Y axis of the second joystick.
|
void |
rumble(float l,
float r)
Makes the controller rumble.
|
void |
rumble(float l,
float r,
double seconds)
Makes the controller rumble for X seconds.
|
getRawAxis, getWPIJoystick, getX, getY, getZ
public Timer rumbleTimer
public GameController(int port)
port
- The port.public abstract double getX2()
public abstract double getY2()
public Direction getDPad()
public void rumble(float l, float r)
l
- The left rumble value.r
- The right rumble value.public void rumble(float l, float r, double seconds)
l
- The left rumble value.r
- The right rumble value.seconds
- How long the controller should rumble.