Remove unnecessary comments, clean up code

This commit is contained in:
nikrozman committed 2026-03-03 21:42:07 +01:00
1 parent cb433f76c9
commit 8e9a3712ac
16 files changed
+197 -331

No files matched your search

+17 -17
View File
@@ -5,17 +5,17 @@ A BLE HID mouse that uses the onboard IMU of a **Seeed XIAO nRF52840 Sense** to
## Features
- **6-DoF gyro + accelerometer** via LSM6DS3 with complementary filter
- **Hardware tap detection** — single tap = left click, double tap = right click
- **BLE HID mouse** — works natively on Windows, macOS, Linux, Android, iOS
- **BLE Battery Service** — charge level visible in OS Bluetooth settings
- **Web config UI** (`web/index.html`) — configure over BLE from any Chrome/Edge browser, no app install
- **Flash persistence** — config survives power cycles (LittleFS)
- **Live IMU stream** — 20 Hz gyro/accel data streamed to the web UI visualiser
- **Live telemetry** — temperature, uptime, click counts, gyro bias RMS, recal count
- **Temperature compensation** — gyro drift correction by Δ temperature since last calibration
- **Auto-recalibration** — recalibrates automatically after 5 minutes of idle
- **Configurable charge rate** — OFF / 50 mA slow / 100 mA fast via BQ25100 HICHG pin
- **Boot-loop detection** — 3 rapid reboots trigger safe mode (config service disabled, flash wiped)
- **Hardware tap detection** - single tap = left click, double tap = right click
- **BLE HID mouse** - works natively on Windows, macOS, Linux, Android, iOS
- **BLE Battery Service** - charge level visible in OS Bluetooth settings
- **Web config UI** (`web/index.html`) - configure over BLE from any Chrome/Edge browser, no app install
- **Flash persistence** - config survives power cycles (LittleFS)
- **Live IMU stream** - 20 Hz gyro/accel data streamed to the web UI visualiser
- **Live telemetry** - temperature, uptime, click counts, gyro bias RMS, recal count
- **Temperature compensation** - gyro drift correction by Δ temperature since last calibration
- **Auto-recalibration** - recalibrates automatically after 5 minutes of idle
- **Configurable charge rate** - OFF / 50 mA slow / 100 mA fast via BQ25100 HICHG pin
- **Boot-loop detection** - 3 rapid reboots trigger safe mode (config service disabled, flash wiped)
## Hardware
@@ -26,22 +26,22 @@ A BLE HID mouse that uses the onboard IMU of a **Seeed XIAO nRF52840 Sense** to
## LED Status
The XIAO has three user LEDs (active LOW — HIGH = off, LOW = on):
The XIAO has three user LEDs (active LOW - HIGH = off, LOW = on):
| LED | Pattern | Meaning |
|---|---|---|
| Blue | Single pulse every 10 s | BLE connected (heartbeat) |
| Green | Single pulse every 10 s | Advertising / not connected (heartbeat) |
| Green | Rapid flutter (~10 Hz) | Gyro calibration in progress |
| Red | Fast blink (continuous) | IMU init failed — hardware fault |
| Red | 3 slow blinks on boot | Boot-loop detected — entered safe mode |
| Red | Fast blink (continuous) | IMU init failed - hardware fault |
| Red | 3 slow blinks on boot | Boot-loop detected - entered safe mode |
| Red | 6 rapid blinks | Battery critically low (< 3.10 V) |
> **Blue** = BLE-related state. **Green** = device activity. **Red** = fault only.
## Web Config UI
Open `web/index.html` in Chrome or Edge (desktop). Requires Web Bluetooth — enable it at `chrome://flags/#enable-web-bluetooth` on Linux.
Open `web/index.html` in Chrome or Edge (desktop). Requires Web Bluetooth - enable it at `chrome://flags/#enable-web-bluetooth` on Linux.
**Configurable parameters:**
@@ -56,8 +56,8 @@ Open `web/index.html` in Chrome or Edge (desktop). Requires Web Bluetooth — en
**Commands:**
- **Calibrate Gyro** — recalculates bias offset; hold the device still on a flat surface for ~1 s
- **Factory Reset** — wipes flash config, restores defaults
- **Calibrate Gyro** - recalculates bias offset; hold the device still on a flat surface for ~1 s
- **Factory Reset** - wipes flash config, restores defaults
## Building