edu.wpi.first.wpilibj
Class GenericHID

java.lang.Object
  extended by edu.wpi.first.wpilibj.GenericHID
Direct Known Subclasses:
Joystick, KinectStick

public abstract class GenericHID
extends java.lang.Object

GenericHID Interface


Nested Class Summary
static class GenericHID.Hand
          Which hand the Human Interface Device is associated with.
 
Constructor Summary
GenericHID()
           
 
Method Summary
 boolean getBumper()
          Is the bumper pressed
abstract  boolean getBumper(GenericHID.Hand hand)
          Is the bumper pressed
abstract  double getRawAxis(int which)
          Get the raw axis
abstract  boolean getRawButton(int button)
          Is the given button pressed
abstract  double getThrottle()
          Get the throttle
 boolean getTop()
          Is the top button pressed
abstract  boolean getTop(GenericHID.Hand hand)
          Is the top button pressed
 boolean getTrigger()
          Is the trigger pressed
abstract  boolean getTrigger(GenericHID.Hand hand)
          Is the trigger pressed
abstract  double getTwist()
          Get the twist value
 double getX()
          Get the x position of the HID
abstract  double getX(GenericHID.Hand hand)
          Get the x position of HID
 double getY()
          Get the y position of the HID
abstract  double getY(GenericHID.Hand hand)
          Get the y position of the HID
 double getZ()
          Get the z position of the HID
abstract  double getZ(GenericHID.Hand hand)
          Get the z position of the HID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericHID

public GenericHID()
Method Detail

getX

public final double getX()
Get the x position of the HID

Returns:
the x position of the HID

getX

public abstract double getX(GenericHID.Hand hand)
Get the x position of HID

Parameters:
hand - which hand, left or right
Returns:
the x position

getY

public final double getY()
Get the y position of the HID

Returns:
the y position

getY

public abstract double getY(GenericHID.Hand hand)
Get the y position of the HID

Parameters:
hand - which hand, left or right
Returns:
the y position

getZ

public final double getZ()
Get the z position of the HID

Returns:
the z position

getZ

public abstract double getZ(GenericHID.Hand hand)
Get the z position of the HID

Parameters:
hand - which hand, left or right
Returns:
the z position

getTwist

public abstract double getTwist()
Get the twist value

Returns:
the twist value

getThrottle

public abstract double getThrottle()
Get the throttle

Returns:
the throttle value

getRawAxis

public abstract double getRawAxis(int which)
Get the raw axis

Parameters:
which - index of the axis
Returns:
the raw value of the selected axis

getTrigger

public final boolean getTrigger()
Is the trigger pressed

Returns:
true if pressed

getTrigger

public abstract boolean getTrigger(GenericHID.Hand hand)
Is the trigger pressed

Parameters:
hand - which hand
Returns:
true if the trigger for the given hand is pressed

getTop

public final boolean getTop()
Is the top button pressed

Returns:
true if the top button is pressed

getTop

public abstract boolean getTop(GenericHID.Hand hand)
Is the top button pressed

Parameters:
hand - which hand
Returns:
true if hte top button for the given hand is pressed

getBumper

public final boolean getBumper()
Is the bumper pressed

Returns:
true if the bumper is pressed

getBumper

public abstract boolean getBumper(GenericHID.Hand hand)
Is the bumper pressed

Parameters:
hand - which hand
Returns:
true if hte bumper is pressed

getRawButton

public abstract boolean getRawButton(int button)
Is the given button pressed

Parameters:
button - which button number
Returns:
true if the button is pressed