Skip navigation.
Home
The QNX Community Portal

View topic - Is there any Joystick driver or sample code available?

Is there any Joystick driver or sample code available?

Discussion about the general applications that run on QNX6

Is there any Joystick driver or sample code available?

Postby LeoMa » Wed Jan 25, 2017 9:33 pm

Hello all,

I am using QNX 6.3.2 for robotic application programming. I need to read the input from joystick. I can read the joystick (Logitech Attack 3) data through the command:
hidview -a -d2 (Joystick's id is 2)

the data will be shown on the screen. I wonder if there is some code sample available, so that I can read the input for joystick in my code
? Thanks

Leo Ma
LeoMa
New Member
 
Posts: 1
Joined: Thu Jan 19, 2017 6:45 pm

Re: Is there any Joystick driver or sample code available?

Postby nico04 » Thu Jan 26, 2017 8:33 am

There's a thread on a similar topic here : http://www.openqnx.com/phpbbforum/viewtopic.php?t=4195
There's no real answer but it's interesting to read it.

Hid API is accessible through sys/hiddi.h and sys/hidut.h.
#include <sys/hiddi.h>
#include <sys/hidut.h>

You have to link your binary with hiddi.
LIBS+=hiddi

Explore header files to know about structures and functions.

Nicolas
nico04
Active Member
 
Posts: 77
Joined: Wed Sep 29, 2010 9:59 am
Location: France


Return to QNX6 - Applications

Who is online

Users browsing this forum: No registered users and 1 guest