1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Check if HID is actually enabled in options.

This commit is contained in:
Chris 2018-04-30 00:51:14 +02:00
parent b824f900d9
commit 641e555e7b

View file

@ -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