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
+7
View File
@@ -7,6 +7,7 @@ option(AFHDS3 "AFHDS3 TX Module" ON)
option(MULTIMODULE "DIY Multiprotocol TX Module (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module)" ON)
option(GHOST "Ghost TX Module" ON)
option(HARDWARE_EXTERNAL_ACCESS_MOD "Support for R9M 2019 hardware mod" OFF)
option(SPACEMOUSE "Support for SpaceMouse" OFF)
set(PWR_BUTTON "PRESS" CACHE STRING "Pwr button type (PRESS/SWITCH)")
set(CPU_TYPE STM32F4)
@@ -246,6 +247,12 @@ if(INTERNAL_GPS)
message("-- Internal GPS enabled")
endif()
if(SPACEMOUSE)
add_definitions(-DSPACEMOUSE)
set(SRC ${SRC} spacemouse.cpp)
message("-- SpaceMouse enabled")
endif()
set(GVAR_SCREEN model_gvars.cpp)
if(HARDWARE_TOUCH)
+1
View File
@@ -335,6 +335,7 @@ void rotaryEncoderCheck();
#define STORAGE_NUM_SLIDERS 4
enum Analogs {
STICK1,
STICK2,