From 32e705973227719bdb2af1559f99703f329581d2 Mon Sep 17 00:00:00 2001 From: Giovanni Cascione <43221199+spleen1981@users.noreply.github.com> Date: Sun, 24 Jul 2022 16:34:33 +0200 Subject: [PATCH] add NimBLEHIDDevice::batteryLevel() --- src/NimBLEHIDDevice.cpp | 6 +++--- src/NimBLEHIDDevice.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NimBLEHIDDevice.cpp b/src/NimBLEHIDDevice.cpp index 29150ce..a2310eb 100644 --- a/src/NimBLEHIDDevice.cpp +++ b/src/NimBLEHIDDevice.cpp @@ -203,12 +203,12 @@ void NimBLEHIDDevice::setBatteryLevel(uint8_t level) { /* * @brief Returns battery level characteristic * @ return battery level characteristic - *//* -BLECharacteristic* BLEHIDDevice::batteryLevel() { + */ +NimBLECharacteristic* NimBLEHIDDevice::batteryLevel() { return m_batteryLevelCharacteristic; } - +/* BLECharacteristic* BLEHIDDevice::reportMap() { return m_reportMapCharacteristic; diff --git a/src/NimBLEHIDDevice.h b/src/NimBLEHIDDevice.h index ef2ed73..0e8b282 100644 --- a/src/NimBLEHIDDevice.h +++ b/src/NimBLEHIDDevice.h @@ -55,7 +55,7 @@ public: void pnp(uint8_t sig, uint16_t vid, uint16_t pid, uint16_t version); //NimBLECharacteristic* hidInfo(); void hidInfo(uint8_t country, uint8_t flags); - //NimBLECharacteristic* batteryLevel(); + NimBLECharacteristic* batteryLevel(); void setBatteryLevel(uint8_t level);