E5EF
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3877145 commit 3d2c056Copy full SHA for 3d2c056
libraries/BLE/src/BLEHIDDevice.cpp
@@ -42,7 +42,10 @@ BLEHIDDevice::BLEHIDDevice(BLEServer* server) {
42
43
m_batteryLevelCharacteristic = m_batteryService->createCharacteristic((uint16_t) 0x2a19, BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_NOTIFY);
44
m_batteryLevelCharacteristic->addDescriptor(batteryLevelDescriptor);
45
- m_batteryLevelCharacteristic->addDescriptor(new BLE2902());
+ BLE2902 *batLevelIndicator = new BLE2902();
46
+ // Battery Level Notification is ON by default, making it work always on BLE Pairing and Bonding
47
+ batLevelIndicator->setNotifications(true);
48
+ m_batteryLevelCharacteristic->addDescriptor(batLevelIndicator);
49
50
/*
51
* This value is setup here because its default value in most usage cases, its very rare to use boot mode
0 commit comments