Does the Prefs Pane scaling require using the SDK?

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

Moderator: Moderators

Post Reply
JetForMe
Posts: 10
Joined: Wed Mar 27, 2019 12:36 am

Does the Prefs Pane scaling require using the SDK?

Post by JetForMe » Thu Apr 29, 2021 12:46 am

I've successfully integrated the space mouse using IOKit (IOHIDManager) and without linking to the SDK. Values returned using IOHIDValueGetScaledValue() (physical or calibrated returns same value) come back in the range -1400 to 1400. They do not seem to change based on any settings in prefs pane.

Am I correct to assume that requires using the SDK?

Also, it seems the device doesn't properly report its min/max values for the rotation axes, only the translation axes. Is this a bug? This is from a SpaceMouse Compact I got recently, with Firmware 4.37

Code: Select all

                          Usage Page    (Generic Desktop) 
                          Usage (8 (0x8))    
                              Collection (Application)    
                                    Collection (Physical)    
                                      ReportID................    (1)  
                                      Logical Minimum.........    (65186)  
                                      Logical Maximum.........    (350)  
                                      Physical Minimum........    (64136)  
                                      Physical Maximum........    (1400)  
                                      Unit Exponent...........    (12)  
                                      Unit....................    (17)  
                                      Usage (X)    
                                      Usage (Y)    
                                      Usage (Z)    
                                      Report Size.............    (16)  
                                      Report Count............    (3)  
                                      Input...................   (Data, Variable, Relative, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                                    Collection (Physical)    
                                      ReportID................    (2)  
                                      Usage (Rx)    
                                      Usage (Ry)    
                                      Usage (Rz)    
                                      Report Size.............    (16)  
                                      Report Count............    (3)  
                                      Input...................   (Data, Variable, Relative, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                                    Collection (Logical)    
                                      ReportID................    (3)  
                                      Usage Page    (Generic Desktop) 
                                      Usage Page    (Button) 
                                      Usage Minimum...........    (1)  
                                      Usage Maximum...........    (2)  
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (1)  
                                      Physical Minimum........    (0)  
                                      Physical Maximum........    (1)  
                                      Report Size.............    (1)  
                                      Report Count............    (2)  
                                      Input...................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                      Report Count............    (14)  
                                      Input...................   (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Bitfield) 
                                    End Collection     
                                    Collection (Logical)    
                                      ReportID................    (4)  
                                      Usage Page    (LED) 
                                      Usage 75 (0x4b)    
                                      Logical Minimum.........    (0)  
                                      Logical Maximum.........    (1)  
                                      Report Count............    (1)  
                                      Report Size.............    (1)  
                                      Output..................   (Data, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) 
                                      Report Count............    (1)  
                                      Report Size.............    (7)  
                                      Output..................   (Constant, Variable, Absolute, No Wrap, Linear, Preferred State, No Null Position, Nonvolatile, Bitfield) 
                                    End Collection     

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

Re: Does the Prefs Pane scaling require using the SDK?

Post by ngomes » Mon May 03, 2021 1:52 am

Hi JetForMe,
JetForMe wrote:
Thu Apr 29, 2021 12:46 am
Am I correct to assume that requires using the SDK?
I believe so. Are you targeting macOS 11? Kernel extensions have been deprecated in 10.15 and are no longer available in the newer version of the operating system. This means we can't mangle the data before it bubbles up to applications.
Also, it seems the device doesn't properly report its min/max values for the rotation axes, only the translation axes. Is this a bug? This is from a SpaceMouse Compact I got recently, with Firmware 4.37
I think it s a long-time limitation of the device HID descriptors. If I can still recall this (I may very well be wrong here), applications and system have come to rely on those values, even if incorrect. Newer SpaceMouse types have the data clamped to to the [-350,350] range.
Nuno Gomes

JetForMe
Posts: 10
Joined: Wed Mar 27, 2019 12:36 am

Re: Does the Prefs Pane scaling require using the SDK?

Post by JetForMe » Mon May 03, 2021 1:00 pm

ngomes wrote:
Mon May 03, 2021 1:52 am
I believe so. Are you targeting macOS 11? Kernel extensions have been deprecated in 10.15 and are no longer available in the newer version of the operating system. This means we can't mangle the data before it bubbles up to applications.
Yeah, macOS 11 for sure (as that's what I'm on now), although support for one or two major revisions back would be nice.
ngomes wrote:
Mon May 03, 2021 1:52 am
I think it s a long-time limitation of the device HID descriptors. If I can still recall this (I may very well be wrong here), applications and system have come to rely on those values, even if incorrect. Newer SpaceMouse types have the data clamped to to the [-350,350] range.
I think I'm seeing [-1400,1400].

It would be great if Apple would include support in SceneKit out-of-the-box with its built-in camera control modes so I don't have to do this :P

But I proved it out and got it working in SwiftUI as best as I could figure out how with the total lack of documentation. I may try to rework it to use the SceneKit camera control, since it has optional constraints on motion that I wouldn't have to reimplement. It's a pity there's no scaling prefs, but I think I can live with it.

Post Reply