How do I get absolute state of device on demand?

Post questions, comments and feedback to our 3Dconnexion Windows Development Team.

Moderator: Moderators

Post Reply
tmagalhaes
Posts: 5
Joined: Wed Oct 21, 2015 12:20 pm

How do I get absolute state of device on demand?

Post by tmagalhaes » Wed Oct 21, 2015 12:26 pm

We want to support 3DConnexion devices in a product that has a game like logic loop.

As such, every so often, we want to poll the device for the joystick's position.
We went about it by trying to use DirectInput but the values we are receiving are not what we expected.
When we let go of the joystick, the values don't go back to 0.

Looking around it seems that developers are being advised to use the SDK but as far as I can tell, it is event driven, which doesn't fit at all with our application.

So, is DirectInput supported, how do we get absolute range of motion values for all axis? Where is some example code that works?
If the SDK is the only supported way, how can we use it to get the absolute axis values?

Thanks

tmagalhaes
Posts: 5
Joined: Wed Oct 21, 2015 12:20 pm

Re: How do I get absolute state of device on demand?

Post by tmagalhaes » Mon Oct 26, 2015 5:35 am

Soooo...
Anything? :/

ngomes
Moderator
Moderator
Posts: 1945
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: How do I get absolute state of device on demand?

Post by ngomes » Tue Oct 27, 2015 2:45 am

Olá tmagalhaes,

Very sorry for the delay in replying to your question. We're looking to see what's the best approach for your use-case and we should have an answer shortly.

tmagalhaes
Posts: 5
Joined: Wed Oct 21, 2015 12:20 pm

Re: How do I get absolute state of device on demand?

Post by tmagalhaes » Tue Oct 27, 2015 2:59 am

Thanks for the reply.
Will be waiting for further information.

ngomes
Moderator
Moderator
Posts: 1945
Joined: Mon Nov 27, 2006 7:22 am
Contact:

Re: How do I get absolute state of device on demand?

Post by ngomes » Fri Nov 06, 2015 9:23 am

Sorry it took us this long to reply.

The 3D mouse motion (axis) data may be modified by the driver using scaling factor set by the user. You should code for the default values and then let the user increase or decrease the data (to "speed up" or "slow down" the camera control).

Regarding polling, DirectInput seems to misinterpret the device USB descriptor and does not provide the raw data (which is absolute to begin with). If you need absolute data, we recommend that you add support for driver API (3DxWare SDK) and simply cache the data (to allow the polling code to retrieve it).

tmagalhaes
Posts: 5
Joined: Wed Oct 21, 2015 12:20 pm

Re: How do I get absolute state of device on demand?

Post by tmagalhaes » Fri Nov 06, 2015 9:34 am

Olá Nuno.

Thanks for the reply, we'll look into those options.

Post Reply