A
A
Alecxandrys2015-01-13 23:11:33
Java
Alecxandrys, 2015-01-13 23:11:33

usb joystick+java+hidapijava?

Hello
Please tell me how to correctly read the data from the joystick in Java.
Hidapi.jar is used and everything works until the moment of interpreting the received data,
but I could not understand the format of the data being read.
The entire packet is read into a buffer, which is a byte array.
For clarity, the cells of the array during the output are separated by the "+" symbol.
Data for 4 readings were taken in the center position, with the thrust slider set to 0, without the buttons being pressed.
There were no manipulations between readings.
+0+0+4+0+32+0+32+-128+-1+
+0+0+63+-88+28+0+0+-128+0+
+0+0+63+0 +32+-25+32+-128+-1+
It is required to understand the output format and why they change indefinitely when idle

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zildarius, 2015-01-16
@zildarius

Is there anything in the documentation about this?
Is there nothing in the javadoc either?
Which method returns an array of bytes?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question