summaryrefslogtreecommitdiff
path: root/src/libs/BleConnectionStatus.cpp
diff options
context:
space:
mode:
authorkrolyxon <me@krolyxon.com>2026-05-11 14:01:44 +0530
committerkrolyxon <me@krolyxon.com>2026-05-11 14:01:44 +0530
commitf34b1e2fbd94bcc8d0ee2e2e2e43e214d0b329a1 (patch)
tree235d29da4668906d1e11d651980cea8b0c69dec7 /src/libs/BleConnectionStatus.cpp
parent360d2d2ad3bd584014683f3579fc2e2348c16852 (diff)
Migrate to PlatformIO
Now since i have been able to make PSRAM working with platformio, i don't have to use this shitty Arduino-IDE anymore which does not even allow me to use subfolders like a normal programmer would do
Diffstat (limited to 'src/libs/BleConnectionStatus.cpp')
-rw-r--r--src/libs/BleConnectionStatus.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/libs/BleConnectionStatus.cpp b/src/libs/BleConnectionStatus.cpp
new file mode 100644
index 0000000..f01183b
--- /dev/null
+++ b/src/libs/BleConnectionStatus.cpp
@@ -0,0 +1,18 @@
+#include "BleConnectionStatus.h"
+
+BleConnectionStatus::BleConnectionStatus(void) {
+}
+
+void BleConnectionStatus::onConnect(BLEServer* pServer)
+{
+ this->connected = true;
+ BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902));
+ desc->setNotifications(true);
+}
+
+void BleConnectionStatus::onDisconnect(BLEServer* pServer)
+{
+ this->connected = false;
+ BLE2902* desc = (BLE2902*)this->inputMouse->getDescriptorByUUID(BLEUUID((uint16_t)0x2902));
+ desc->setNotifications(false);
+}