未验证 提交 3d2c0566 编写于 作者: R Rodrigo Garcia 提交者: GitHub

fixes BLE HID Battery Level Indicator (#6864)

* fixes BLE HID Battery Level Indicator

* Fixing identation
上级 3877145b
......@@ -42,7 +42,10 @@ BLEHIDDevice::BLEHIDDevice(BLEServer* server) {
m_batteryLevelCharacteristic = m_batteryService->createCharacteristic((uint16_t) 0x2a19, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY);
m_batteryLevelCharacteristic->addDescriptor(batteryLevelDescriptor);
m_batteryLevelCharacteristic->addDescriptor(new BLE2902());
BLE2902 *batLevelIndicator = new BLE2902();
// Battery Level Notification is ON by default, making it work always on BLE Pairing and Bonding
batLevelIndicator->setNotifications(true);
m_batteryLevelCharacteristic->addDescriptor(batLevelIndicator);
/*
* This value is setup here because its default value in most usage cases, its very rare to use boot mode
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册