Merge pull request #5676 from conkerkh/CMS_FIX
Disable CMS when USB is connected on CDC_HID enabled targets.
This commit is contained in:
commit
fba59c32b6
|
@ -68,6 +68,11 @@
|
|||
|
||||
#include "rx/rx.h"
|
||||
|
||||
#ifdef USE_USB_CDC_HID
|
||||
#include "sensors/battery.h"
|
||||
#include "pg/usb.h"
|
||||
#endif
|
||||
|
||||
// DisplayPort management
|
||||
|
||||
#ifndef CMS_MAX_DEVICE
|
||||
|
@ -993,6 +998,11 @@ void cmsUpdate(uint32_t currentTimeUs)
|
|||
return ;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_USB_CDC_HID
|
||||
if (getBatteryCellCount() == 0 && usbDevConfig()->type == COMPOSITE) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
static int16_t rcDelayMs = BUTTON_TIME;
|
||||
static int holdCount = 1;
|
||||
|
|
Loading…
Reference in New Issue