MagellanMotionEvent on Opteron

Questions and answers about 3Dconnexion devices on UNIX and Linux.

Moderator: Moderators

Post Reply
jjk439
Posts: 4
Joined: Sun Oct 21, 2007 3:56 pm

MagellanMotionEvent on Opteron

Post by jjk439 »

I'm modifying an app to work with the SpacePilot which works fine on x86 Linux systems, but has problems when runnng on an opteron system the value of the atom
MagellanMotionEvent differs from the actual event type received by X when the joystick is moved.

I initialize by calling MagellanInit in xdrvlib.c
The MagellanMotionEvent is set to 1050 by the call to XInternAtom.
When I move the joystick, the client message event type received in my Xevent loop has the value of 1045 and thus MagellanTranslateEvent doesn't recognize the event as a motion event. If I change the line of code in MagellanTranslateEvent that reads

if(Event->xclient.message_type == MagellanMotionEvent)
to if(Event->xclient.message_type == 1045)

everything works fine.

Has anyone seen this problem?

Thanks,

John
jjk439
Posts: 4
Joined: Sun Oct 21, 2007 3:56 pm

Post by jjk439 »

Upgrading to the new driver (v1.2.11) fixed the problem and all is working fine now.

John
jwick
Moderator
Moderator
Posts: 3374
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Post by jwick »

You have to call XInternAtom each time you run your app to get the correct value. It won't necessarily always be the same (though sometimes, by chance, it is).
jjk439
Posts: 4
Joined: Sun Oct 21, 2007 3:56 pm

Post by jjk439 »

Yes, I realize that the atom needs to be initialized each time the app is run.
With the old driver, the atom got initialized to 1050, but when the SpacePilot actually generated the event, the event value was actually 1045.

As soon as I upgraded to the latest driver, the events actually received matched the atom value and all is working fine.


John
Post Reply