feat: Add support for SpaceMouse mod (6D input knob) (#1853)

Use `-DSPACEMOUSE=YES` CMake option to activate on Horus color targets.
Co-authored-by: Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
This commit is contained in:
Risto
2022-09-18 09:23:48 +02:00
committed by GitHub
co-authored by Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
parent 3765e678b9
commit 9dc4065525
42 changed files with 491 additions and 47 deletions
+5
View File
@@ -547,6 +547,11 @@ bool inputsMoved()
sum += getValue(MIXSRC_TILT_X+i) >> INAC_STICKS_SHIFT;
#endif
#if defined(SPACEMOUSE)
for (uint8_t i=0; i<(MIXSRC_LAST_SPACEMOUSE - MIXSRC_FIRST_SPACEMOUSE); i++)
sum += get_spacemouse_value(i) >> INAC_STICKS_SHIFT;
#endif
if (abs((int8_t)(sum-inactivity.sum)) > 1) {
inactivity.sum = sum;
return true;