Receiving very high axes values

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

Moderator: Moderators

Post Reply
f.schaaf
Posts: 14
Joined: Thu Jul 14, 2016 7:54 am

Receiving very high axes values

Post by f.schaaf »

I have a c++ application the can be run either as plugin for another app, or as standalone.
I find that axes values I receive by

Code: Select all

SiGetEvent
Vary greatly.

When I run the example program 3DxTest, I receive maximum values around 500-600.
When I run as a plugin (for an application that uses the SpaceMouse itself), the maximum values are 500-600 as well.
But when I run as Standalone, I get values that are like 30x higher, around 14000-15000.
The code that is run is exactly the same, it's copied mostly from the 3DxTest App.

I can have the SpaceMouse Settings Window open and I can see no difference in the speed settings for either global speed, nor the speed of each axis for each of the cases above.
What am I missing?
What other settings can scale these values?
f.schaaf
Posts: 14
Joined: Thu Jul 14, 2016 7:54 am

Re: Receiving very high axes values

Post by f.schaaf »

edit:

Code: Select all

Event.Period = 16
In all cases.
f.schaaf
Posts: 14
Joined: Thu Jul 14, 2016 7:54 am

Re: Receiving very high axes values

Post by f.schaaf »

I reduces the problem as follows:

- compile the 3DxTest App -> 3DxTest.exe
- Copy the executable giving it another name, like ->3DxTest2.exe

Those two will behave differently in terms of:
- 3DxTest.exe:
- "APPLICATION USE" will be displayed in the SpaceMouse display when pushing buttons
- The Driver GUI's speed settings are grayed out
- Maximum Value for axes elongation is around ~500
- 3DxTest2.exe:
- "APPLICATION USE" will be NOT displayed in the SpaceMouse display when pushing buttons
- The Driver GUI's speed settings are functional
- Maximum Value for axes elongation depends on speed setting

See attached Screenshots:
1.png
1.png (150.77 KiB) Viewed 11829 times
2.png
2.png (100.02 KiB) Viewed 11829 times
What is this behavior and how can I control it?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Receiving very high axes values

Post by jwick »

If you don't have a cfg file for your application, the driver uses one that has the values scaled by 4:

Code: Select all

  <Settings>
    <ResponseCurve>1.7</ResponseCurve>
    <ScaleX>4.00</ScaleX>
    <ScaleY>4.00</ScaleY>
    <ScaleZ>4.00</ScaleZ>
    <ScaleRx>4.00</ScaleRx>
    <ScaleRy>4.00</ScaleRy>
    <ScaleRz>4.00</ScaleRz>
  </Settings>
3DxTest has a cfg file that does not scale the data.

Make a copy of the 3DxTest.xml file for your application (change the name ane ExecutableName) and save it into %PROGRAMDATA%\3Dconnexion\3DxWare\Cfg and it will get used when your executable is in focus.

Edit: I forgot to add that you can not rely upon the values from the device because users can always scale them. Program for +/- 350-ish and let your users make personal changes as they need to.
f.schaaf
Posts: 14
Joined: Thu Jul 14, 2016 7:54 am

Re: Receiving very high axes values

Post by f.schaaf »

Jwick, thank you so far.

Creating a config file to ensure the correct scaling poses problems for us, e. g.:
- We are a plugin for another app that also uses the SpaceMouse, so we cannot simply overwrite that file's cfg.

I'm using the 3DxWare SDK doc and didn't find this information there.

- Can you point me somewhere I get can detailled information about this config mechanics?
- Can I completely disable this behavior?
f.schaaf
Posts: 14
Joined: Thu Jul 14, 2016 7:54 am

Re: Receiving very high axes values

Post by f.schaaf »

What I tried so far:

Code: Select all

        SPWfloat32 scaleRx;
	SPWfloat32 scaleOverall;

	SiSyncGetScaleRx(devHdl, &scaleRx);
	SiSyncGetScaleOverall(devHdl, &scaleOverall);
But this always returns 1.0 regardless of config.
How can I access this config programmatically?
jwick
Moderator
Moderator
Posts: 3331
Joined: Wed Dec 20, 2006 2:25 pm
Location: USA
Contact:

Re: Receiving very high axes values

Post by jwick »

You need to contact us on the support email if you want to be a plugin to a plugin.
There could be a whole host of issues.
We will have to discuss possible architectures.
If you are not a developer, signup and you will be given the support email address.
Post Reply