Author Topic: help with joystick meanings  (Read 9428 times)

nbxmike

  • Member
  • ***
  • Posts: 1
help with joystick meanings
« on: March 16, 2018, 11:27:10 am »
I am trying to pull together an off season project for the high school robotics team to keep them interested after competitions.  I am looking at a custom driver's console, which from the USB perspective is just a joystick with a bunch of buttons.  Can anyone point me to a description of what the various data elements typically are?  Like, what is the difference between X,Y,Z and Rx,Ry, Rz - are these just the two joysticks on a dual controller?  What is a slider - is that typically the throttle on those joystick that have them? 

I fully understand that the application on the host is free to do whatever it wants with any data element; but, the First robotics system puts your application twice removed for the USB data forcing you to go through Windows drivers and National Instruments framework so knowing what a normal device does with the fields would help immensely.

Thanks


Jan Axelson

  • Administrator
  • Frequent Contributor
  • *****
  • Posts: 3033
    • Lakeview Research
Re: help with joystick meanings
« Reply #1 on: March 16, 2018, 12:34:52 pm »
See the HID Usage Tables document for definitions of these things:

http://www.usb.org/developers/docs/docs/hidpage/

ulao

  • Frequent Contributor
  • ****
  • Posts: 172
Re: help with joystick meanings
« Reply #2 on: March 19, 2018, 10:13:29 am »
Hid joystick (4) and Hid gamepad (5) are drivers read for DirectX. So the meaning are generic unless you use DrirectX. You can pass any data you want to any of those packets and do what you want with the raw data. In DirectX they all have meanings.

X,Y,Z main stick x/y (z is normally not used unless you have a 3d stick)
Rx,Ry, Rz - often the secondary stick.
Slider and dial are just that, a gamepad that has a slide control or a turnable dial.
buttons are possible 4 sets of 8 buttons
the hat is a 4/8/16.. way hat. I think it will go up to 255 degrees not sure.
 
 joystick (4) has a rudder and peddles where Hid gamepad (5) does not. joysticks do not have everything a game pad has to offer.