FreeSpacenav / spacenavd

Free user-space driver for 6-dof space-mice.
http://spacenav.sourceforge.net
GNU General Public License v3.0
279 stars 55 forks source link

Add /dev/input/eventN number to event struct #14

Closed tomlankhorst closed 5 years ago

tomlankhorst commented 5 years ago

Fixes #13

Corresponds to libspnav PR https://github.com/FreeSpacenav/libspnav/pull/5

tomlankhorst commented 5 years ago

@jtsiomb I totally understand that you cannot suddenly break the protocol. Thanks for taking a look anyway. What do you mean by

spacenavd is only able to use a single device to begin with

When connecting multiple devices, spacenavd retrieves events from both of them. I just achieved what I wanted: to be able to differentiate two connected devices by taking a look at the dev identifier in the spnav_event.

jtsiomb commented 5 years ago

When connecting multiple devices, spacenavd retrieves events from both of them.

Nice, I must have added that feature at some point, and forgot about it. So I as long as I include a device identifier in the events of the new protocol, it'll be easy to support multiple devices. I thought I needed to restructure the code to handle input from multiple physical devices, but I guess I've done that already...

Edit: Ah that's why I don't remember doing this. I didn't write that code, it was implemented in a patch someone else sent me.

tomlankhorst commented 5 years ago

That's great. It works flawlessly in my situation. Hope you find some time soon to work on a slightly revised protocol, if I can help you out, let me know.