1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-16 04:45:24 +03:00

Disable stick commands when HID is active and USB is connected

Moved to shared code and cms.c refactoring

Added missing line endings and comments

Passing tests - defines added

Added missing definition

Added check for USE_USB_CDC_HID in cmsUpdate

Code refactoring and condition change

Remove unnecessary include

Disable stick commands when HID is active and USB is connected

cdcDeviceIsMayBeActive refactored

Disable stick commands when HID is active and USB is connected
This commit is contained in:
dkustec 2020-08-13 18:37:33 +02:00
parent 968e72fae8
commit 60cc80825a
4 changed files with 23 additions and 8 deletions

View file

@ -46,6 +46,7 @@
#include "flight/failsafe.h"
#include "io/beeper.h"
#include "io/usb_cdc_hid.h"
#include "io/dashboard.h"
#include "io/gps.h"
#include "io/vtx_control.h"
@ -228,6 +229,13 @@ void processRcStickPositions()
}
doNotRepeat = true;
#ifdef USE_USB_CDC_HID
// If this target is used as a joystick, we should leave here.
if (cdcDeviceIsMayBeActive()) {
return;
}
#endif
// actions during not armed
if (rcSticks == THR_LO + YAW_LO + PIT_LO + ROL_CE) {