| 1 | #include "BleConnectionStatus.h" |
| 2 | |
| 3 | BleConnectionStatus::BleConnectionStatus(void) { |
| 4 | } |
| 5 | |
| 6 | void BleConnectionStatus::onConnect(BLEServer* pServer) |
| 7 | { |
| 8 | this->connected = true; |
| 9 | BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); |
| 10 | desc->setNotifications(true); |
| 11 | } |
| 12 | |
| 13 | void BleConnectionStatus::onDisconnect(BLEServer* pServer) |
| 14 | { |
| 15 | this->connected = false; |
| 16 | BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902)); |
| 17 | desc->setNotifications(false); |
| 18 | } |