From f34b1e2fbd94bcc8d0ee2e2e2e43e214d0b329a1 Mon Sep 17 00:00:00 2001 From: krolyxon Date: Mon, 11 May 2026 14:01:44 +0530 Subject: 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 --- firmware/ble_mouse.cpp | 74 -------------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100644 firmware/ble_mouse.cpp (limited to 'firmware/ble_mouse.cpp') diff --git a/firmware/ble_mouse.cpp b/firmware/ble_mouse.cpp deleted file mode 100644 index 8e666ec..0000000 --- a/firmware/ble_mouse.cpp +++ /dev/null @@ -1,74 +0,0 @@ -#include -#include -#include "badusb.h" -#include "config.h" - -#include "buttons.h" -#include "display.h" - -// ===== BLE MOUSE ===== -// BleMouse bleMouse("Orion-RF", "Orion-RF", 100); -extern BleMouse bleMouse; - -// ===== MAIN ===== -void ble_mouse_run() -{ - u8g2.clearBuffer(); - u8g2.setFont(u8g2_font_6x10_tr); - u8g2.drawStr(10, 25, "BLE Mouse"); - u8g2.drawStr(10, 45, "Connecting..."); - u8g2.sendBuffer(); - - delay(800); - - while (1) - { - // 🔥 EXIT FIRST (clean) - if (btnBack()) break; - - bool connected = bleMouse.isConnected(); - - int dx = 0; - int dy = 0; - - if (connected) - { - if (!digitalRead(BTN_UP)) dy = -6; - if (!digitalRead(BTN_DOWN)) dy = 6; - if (!digitalRead(BTN_LEFT)) dx = -6; - if (!digitalRead(BTN_RIGHT)) dx = 6; - - if (dx || dy) - bleMouse.move(dx, dy); - - // ✅ single click (not spam) - static bool lastSelect = false; - bool currentSelect = !digitalRead(BTN_SELECT); - - if (currentSelect && !lastSelect) - bleMouse.click(MOUSE_LEFT); - - lastSelect = currentSelect; - } - - // ===== UI ===== - u8g2.clearBuffer(); - u8g2.setFont(u8g2_font_6x10_tr); - - u8g2.drawStr(10, 20, "BLE Mouse"); - - if (connected) - u8g2.drawStr(10, 35, "Connected"); - else - u8g2.drawStr(10, 35, "Waiting"); - - u8g2.drawStr(10, 55, "BACK = Exit"); - - u8g2.sendBuffer(); - - delay(10); // important for BLE stability - } -} - - - -- cgit v1.2.3