mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-04 06:16:35 +02:00
Notify the batteryLevel change (#4517)
This commit is contained in:
committed by
GitHub
parent
534f0810a6
commit
3274602eb0
@ -194,6 +194,7 @@ BLECharacteristic* BLEHIDDevice::protocolMode() {
|
|||||||
|
|
||||||
void BLEHIDDevice::setBatteryLevel(uint8_t level) {
|
void BLEHIDDevice::setBatteryLevel(uint8_t level) {
|
||||||
m_batteryLevelCharacteristic->setValue(&level, 1);
|
m_batteryLevelCharacteristic->setValue(&level, 1);
|
||||||
|
m_batteryLevelCharacteristic->notify();
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* @brief Returns battery level characteristic
|
* @brief Returns battery level characteristic
|
||||||
|
Reference in New Issue
Block a user