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:
co-authored by
Niel Horne (elecpower), Raphael Coeffic (raphaelcoeffic) and Peter Feerick (pfeerick).
parent
3765e678b9
commit
9dc4065525
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user