From 641e555e7b995c25d65a5cef762df6efa32f87fb Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 30 Apr 2018 00:51:14 +0200 Subject: [PATCH] Check if HID is actually enabled in options. --- src/main/cms/cms.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/cms/cms.c b/src/main/cms/cms.c index 466c32ab21..771f2f3243 100644 --- a/src/main/cms/cms.c +++ b/src/main/cms/cms.c @@ -70,6 +70,8 @@ #ifdef USE_USB_CDC_HID #include "sensors/battery.h" +#include "pg/pg.h" +#include "pg/usb.h" #endif // DisplayPort management @@ -998,7 +1000,7 @@ void cmsUpdate(uint32_t currentTimeUs) } #endif #ifdef USE_USB_CDC_HID - if (getBatteryCellCount() == 0) { + if (getBatteryCellCount() == 0 && usbDevConfig()->type == COMPOSITE) { return; } #endif