eax64 / phantom-controller

Userland linux joystick driver for dji phantom 2 controller
4 stars 0 forks source link

get date? #1

Open fdcqsjn opened 8 years ago

fdcqsjn commented 8 years ago

hi eax64: How can i get the date from /dev/uinput this is the problem.

jstest dev/uinput
Driver version is 0.8.0.
jstest is not fully compatible with your kernel. Unable to retrieve button map!
Joystick (Unknown) has 2 axes and 2 buttons.
Testing ... (interrupt to exit)
jstest: error reading: Invalid argument
eax64 commented 8 years ago

Hi, I've just added a couple of lines in the readme about how to use this program. Try jstest /dev/input/js0 (or js1 if you have an other joystick device plugged in) You can also try jstest-gtk.

fdcqsjn commented 8 years ago

Thank you very much! Problem had been sovled. I open the wrong path before. Could you give me some tutorial about how to write this joystick driver code.just a few comments in your code.Thanks!

 jstest /dev/input/js1
Driver version is 2.1.0.
Joystick (phantom-controller) has 4 axes (X, Y, Rz, Gas)
and 6 buttons (Btn0, Btn1, Btn2, Btn3, Btn4, Btn5).
Testing ... (interrupt to exit)

And the buttons mapping maybe different ,I used the latest DJI DT7(which have a inside battery). Should I change the code? or use jstest-gtk remapping?