Skip to content

Commit

Permalink
Merge pull request #19 from dvv/patch-1
Browse files Browse the repository at this point in the history
Allow for additional services like logging
  • Loading branch information
T-vK authored Apr 26, 2020
2 parents 2dd80af + 12b4214 commit 07e4bda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BleKeyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ void BleKeyboard::taskServer(void* pvParameter) {
bleKeyboardInstance->hid->reportMap((uint8_t*)_hidReportDescriptor, sizeof(_hidReportDescriptor));
bleKeyboardInstance->hid->startServices();

bleKeyboardInstance->onStarted(pServer);

BLEAdvertising *pAdvertising = pServer->getAdvertising();
pAdvertising->setAppearance(HID_KEYBOARD);
pAdvertising->addServiceUUID(bleKeyboardInstance->hid->hidService()->getUUID());
Expand Down
2 changes: 2 additions & 0 deletions BleKeyboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class BleKeyboard : public Print
uint8_t batteryLevel;
std::string deviceManufacturer;
std::string deviceName;
protected:
virtual void onStarted(BLEServer *pServer) { };
};

#endif // CONFIG_BT_ENABLED
Expand Down

0 comments on commit 07e4bda

Please sign in to comment.