mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 20:35:33 +03:00
Check if HID is actually enabled in options.
This commit is contained in:
parent
b824f900d9
commit
641e555e7b
1 changed files with 3 additions and 1 deletions
|
@ -70,6 +70,8 @@
|
||||||
|
|
||||||
#ifdef USE_USB_CDC_HID
|
#ifdef USE_USB_CDC_HID
|
||||||
#include "sensors/battery.h"
|
#include "sensors/battery.h"
|
||||||
|
#include "pg/pg.h"
|
||||||
|
#include "pg/usb.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// DisplayPort management
|
// DisplayPort management
|
||||||
|
@ -998,7 +1000,7 @@ void cmsUpdate(uint32_t currentTimeUs)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USE_USB_CDC_HID
|
#ifdef USE_USB_CDC_HID
|
||||||
if (getBatteryCellCount() == 0) {
|
if (getBatteryCellCount() == 0 && usbDevConfig()->type == COMPOSITE) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue