Skip to content

Commit 07e4bda

Browse files
authored
Merge pull request #19 from dvv/patch-1
Allow for additional services like logging
2 parents 2dd80af + 12b4214 commit 07e4bda

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

BleKeyboard.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ void BleKeyboard::taskServer(void* pvParameter) {
144144
bleKeyboardInstance->hid->reportMap((uint8_t*)_hidReportDescriptor, sizeof(_hidReportDescriptor));
145145
bleKeyboardInstance->hid->startServices();
146146

147+
bleKeyboardInstance->onStarted(pServer);
148+
147149
BLEAdvertising *pAdvertising = pServer->getAdvertising();
148150
pAdvertising->setAppearance(HID_KEYBOARD);
149151
pAdvertising->addServiceUUID(bleKeyboardInstance->hid->hidService()->getUUID());

BleKeyboard.h

+2
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ class BleKeyboard : public Print
116116
uint8_t batteryLevel;
117117
std::string deviceManufacturer;
118118
std::string deviceName;
119+
protected:
120+
virtual void onStarted(BLEServer *pServer) { };
119121
};
120122

121123
#endif // CONFIG_BT_ENABLED

0 commit comments

Comments
 (0)