| Modifier and Type | Class and Description |
|---|---|
private class |
GenericHID.InvalidAxisException
The Class InvalidAxisException.
|
private class |
GenericHID.InvalidButtonException
The Class InvalidButtonException.
|
| Modifier and Type | Field and Description |
|---|---|
protected HIDAxis[] |
m_axes
The m_axes.
|
protected HIDButton[] |
m_btns
The m_btns.
|
protected int |
m_numAxes
The m_num btns.
|
protected int |
m_numBtns
The m_num btns.
|
| Modifier | Constructor and Description |
|---|---|
protected |
GenericHID()
RoboLibJ Joysticks.
|
protected |
GenericHID(int numAxes,
int numBtns)
RoboLibJ Joysticks.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addAxisButton(int channel,
double posThresh,
double negThresh)
Adds the axis button.
|
protected void |
addButton(HIDButton button)
Adds the button.
|
protected void |
checkAxis(int axis)
Check if the axis requested exists.
|
protected void |
checkButton(int button)
Check if the button requested exists.
|
HIDAxis |
getAxis(int axis)
Get a Joystick
HIDAxis. |
HIDButton |
getButton(int button)
Get a Joystick
HIDButton. |
int |
getPOV(int pov) |
double |
getRawAxis(int channel)
Get the raw axis
|
boolean |
getRawButton(int channel)
Is the given button pressed
|
void |
setAxis(int index,
HIDAxis axis)
Set a Joystick
HIDAxis. |
void |
setAxisDeadband(int axis,
double deadband)
Set a Joystick
HIDAxis Deadband. |
void |
setAxisInverted(int axis)
Invert a Joystick
HIDAxis. |
void |
setButton(int index,
HIDButton button)
Set a Joystick
HIDButton. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdisableModule, enableModule, getModuleEnabledprotected HIDAxis[] m_axes
protected HIDButton[] m_btns
protected int m_numAxes
protected int m_numBtns
protected GenericHID()
protected GenericHID(int numAxes,
int numBtns)
numAxes - the Number of Axes this Joystick will havenumBtns - the Number of Buttons this Joystick will havepublic final HIDAxis getAxis(int axis)
public final void setAxis(int index,
HIDAxis axis)
public final void setAxisInverted(int axis)
HIDAxis.axis - the axis to invertHIDAxispublic final void setAxisDeadband(int axis,
double deadband)
HIDAxis Deadband.axis - the axisdeadband - the deadbandHIDAxispublic final HIDButton getButton(int button)
public final void setButton(int index,
HIDButton button)
public final double getRawAxis(int channel)
channel - index of the axispublic final boolean getRawButton(int channel)
channel - which button numberpublic int getPOV(int pov)
pov - protected final void addButton(HIDButton button)
button - the btnprotected final void addAxisButton(int channel,
double posThresh,
double negThresh)
channel - the channelposThresh - the pos threshnegThresh - the neg threshprotected final void checkAxis(int axis)
axis - the axis being checkedHIDAxisprotected final void checkButton(int button)
button - the button being checked.HIDButton