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
+12
View File
@@ -212,6 +212,11 @@ static void serialSetCallBacks(int mode, void* ctx, const etx_serial_port_t* por
gpsSetSerialDriver(ctx, drv);
break;
#endif
#if defined(SPACEMOUSE)
case UART_MODE_SPACEMOUSE:
spacemouseSetSerialDriver(ctx, drv);
break;
#endif
#endif
}
}
@@ -267,6 +272,13 @@ static void serialSetupPort(int mode, etx_serial_init& params)
params.rx_enable = true;
break;
#endif
#if defined(SPACEMOUSE)
case UART_MODE_SPACEMOUSE:
params.baudrate = SPACEMOUSE_BAUDRATE;
params.rx_enable = true;
break;
#endif
#endif
}
}