feat(ble): add a NimBLE provider and fold its controls into Settings

Bluedroid cannot initialize beside the Lua runtime on this heap, so the
provider is NimBLE-Arduino. Scans keep the six strongest devices in a fixed
buffer rather than growing one. The standalone BLE app is gone: it was a
screen of toggles that belongs next to the other device settings.
This commit is contained in:
2026-08-04 13:11:17 -04:00
parent a2997b8f8e
commit fce0dfb70a
11 changed files with 507 additions and 43 deletions
+1 -2
View File
@@ -11,7 +11,7 @@ Compared against crosspoint-reader at `src/util/lua/LuaBindings*.cpp`.
`fs.listDirs`, `fs.listFiles`, `fs.exists`, `fs.readFile`, `fs.writeFile`,
`gui.getWidth`, `gui.getHeight`, `gui.fillRect`, `gui.drawRect`, `gui.drawLine`,
`sys.getMillis`, `sys.delay`, `log.debug/info/error`, the whole `http` table,
`sys.getMillis`, `sys.delay`, `log.debug/info/error`, the whole `http` and `ble` tables,
`sys.setTickInterval`, `wifi.getStatus`, `wifi.isConnected`, `wifi.getLocalIP`, and the
`draw()` / `on_tick()` callbacks. `init()` is required in both, so a misspelled entry
point is an error rather than an app that quietly draws nothing.
@@ -37,7 +37,6 @@ strength a status screen wants. Its `state` vocabulary is a subset: crosspoint r
| Clock | nothing exposed; UTC offset is a C++ setting | `sys.isClockSynced`, `settings.getTimezone/setTimezone` with POSIX TZ rules | Timezone here is a stored rule, so `os.date()` returns local time with DST handled by libc. |
| Launching | launcher is C++ | `sys.launch(path)`, home is a Lua app | The launcher is just another app here, named `home`. |
| Modules | single-file apps; `require` unusable | `require` works, `package.searchers` reads the SD card, `/lib` on the path | Shared code such as `ui.lua` needs it. **crosspoint should adopt this.** |
| BLE | `ble.*` | none | No BLE use case here yet. |
| TLS memory | `TlsScratchLoan` lends the framebuffer to wolfSSL | none | crosspoint is heap-starved; this device has ~280KB free. |
## Accidental differences — drift, not design