Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class KinectStick

    java.lang.Object
      edu.wpi.first.wpilibj.GenericHID
          edu.wpi.first.wpilibj.KinectStick

    public class KinectStick

extends GenericHID

Author:
  bradmiller Handles input from the Joystick data sent by the FRC Kinect Server when used with a Kinect device connected to the Driver Station. Each time a value is requested the most recent value is returned. Default gestures embedded in the FRC Kinect Server are described in the document Getting Started with Microsoft Kinect for FRC.

Nested Class Summary

Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.GenericHID
`GenericHID.Hand`

Constructor Summary
`KinectStick(int id)` Construct an instance of a KinectStick.

Method Summary
`boolean` | `getBumper(GenericHID.Hand hand)` Get the button value for the button set as the default bumper in (@link Joystick)
`double` | `getRawAxis(int axis)` Get the value of the KinectStick axis.
`boolean` | `getRawButton(int button)` Get the button value for buttons 1 through 12.
`double` | `getThrottle()` Get the Throttle value of the KinectStick.
`boolean` | `getTop(GenericHID.Hand hand)` Get the button value for the button set as the default top in (@link Joystick)
`boolean` | `getTrigger(GenericHID.Hand hand)` Get the button value for the button set as the default trigger in (@link Joystick)
`double` | `getTwist()` Get the Twist value of the KinectStick.
`double` | `getX(GenericHID.Hand hand)` Get the X value of the KinectStick.
`double` | `getY(GenericHID.Hand hand)` Get the Y value of the KinectStick.
`double` | `getZ(GenericHID.Hand hand)` Get the Z value of the KinectStick.

Methods inherited from class edu.wpi.first.wpilibj.GenericHID
`getBumper, getTop, getTrigger, getX, getY, getZ`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### KinectStick

    public KinectStick(int id)

  Construct an instance of a KinectStick.

  Parameters:
    `id` - which KinectStick to read, in the default gestures an id of 1 corresponds to the left arm and 2 to the right arm.

Method Detail

### getX

    public double getX(GenericHID.Hand hand)

  Get the X value of the KinectStick. This axis is unimplemented in the default gestures but can be populated by teams editing the Kinect Server. See (@link Joystick for axis number mapping)

  Specified by:
    `getX` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The X value of the KinectStick

### getY

    public double getY(GenericHID.Hand hand)

  Get the Y value of the KinectStick. This axis represents arm angle in the default gestures See (@link Joystick for axis number mapping)

  Specified by:
    `getY` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The Y value of the KinectStick

### getZ

    public double getZ(GenericHID.Hand hand)

  Get the Z value of the KinectStick. This axis is unimplemented in the default gestures but can be populated by teams editing the Kinect Server. See (@link Joystick for axis number mapping)

  Specified by:
    `getZ` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The Z value of the KinectStick

### getTwist

    public double getTwist()

  Get the Twist value of the KinectStick. This axis is unimplemented in the default gestures but can be populated by teams editing the Kinect Server. See (@link Joystick for axis number mapping)

  Specified by:
    `getTwist` in class `GenericHID`
  Returns:
    The Twist value of the KinectStick

### getThrottle

    public double getThrottle()

  Get the Throttle value of the KinectStick. This axis is unimplemented in the default gestures but can be populated by teams editing the Kinect Server. See (@link Joystick for axis number mapping)

  Specified by:
    `getThrottle` in class `GenericHID`
  Returns:
    The Throttle value of the KinectStick

### getRawAxis

    public double getRawAxis(int axis)

  Get the value of the KinectStick axis.

  Specified by:
    `getRawAxis` in class `GenericHID`
  Parameters:
    `axis` - The axis to read [1-6].
  Returns:
    The value of the axis

### getTrigger

    public boolean getTrigger(GenericHID.Hand hand)

  Get the button value for the button set as the default trigger in (@link Joystick)

  Specified by:
    `getTrigger` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The state of the button.

### getTop

    public boolean getTop(GenericHID.Hand hand)

  Get the button value for the button set as the default top in (@link Joystick)

  Specified by:
    `getTop` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The state of the button.

### getBumper

    public boolean getBumper(GenericHID.Hand hand)

  Get the button value for the button set as the default bumper in (@link Joystick)

  Specified by:
    `getBumper` in class `GenericHID`
  Parameters:
    `hand` - Unused
  Returns:
    The state of the button.

### getRawButton

    public boolean getRawButton(int button)

  Get the button value for buttons 1 through 12. The default gestures implement only 9 buttons. The appropriate button is returned as a boolean value.

  Specified by:
    `getRawButton` in class `GenericHID`
  Parameters:
    `button` - The button number to be read.
  Returns:
    The state of the button.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"