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