Open MohrJonas opened 1 year ago
That's the serial protocol that the legacy device speaks (the one we're adapting). If you're making your own it's not really relevant to you. You'll be reading the data from whatever sensors your device has instead.
Alright, thank you for that information. What data does the trans_report, rot_report and buttons_report expect?
The translations and rotations are 16-bit signed values (though only -350..+350 range is used I think), one for each axis. Buttons are one bit per button, though not all of them are actually used. button_bits
has some bit positions that are definitely mapped to something on a SpaceMouse Pro.
Awesome, thanks for the answer 😀 Are these values absolute or relative to the previous one, meaning if, for example, the X axis is rotated 20 degrees and is then rotated to 25 degrees, do you report 25 degrees (the absolute value) or 5 degrees (because that's the relative change that has occurred)?
They are absolute (despite the fact that the report descriptor says they're relative).
I'm trying to adapt this software to a DIY spacemouse and was wondering if you could elaborate on the internal workings a bit more. Looking at the source code,
descriptors.c
seems pretty clear to me. As far as I understand it, it defines the USB manufacturer, model and some other stuff.My understanding of
magellan.c
is the following:tud_task()
function to do some USB-related stuff