mirror of
https://github.com/pelgraine/Meck.git
synced 2026-10-31 04:02:01 +01:00
Release note
Combined Bluetooth + WiFi build (meck_max_ble_wifi): switching between Bluetooth and WiFi now restarts the device each time, because Bluetooth only frees its memory on a restart and WiFi cannot start without it. Whichever you turn on first after a restart works straight away; turning on the other one shows a restart hint, asks you to press Enter again, restarts, and turns the chosen connection on by itself. From the companion app, set wifi.enabled now takes effect at the app's reboot.
Why
Bluetooth off keeps the Bluetooth stack's memory until a restart; WiFi off frees WiFi's driver. On device, WiFi on/off, Bluetooth on/off, then WiFi on failed ("failed to create task", largest free block 7668 bytes) and the app could not connect over Bluetooth until a restart.
Changes (combined build only, except README)
- main.cpp: tracks which connection has been on since this restart; a switch then needs a restart (also Bluetooth after the Web Reader freed it).
- main.cpp: "Switch to WiFi?" / "Switch to Bluetooth?" popup with "Enter again to restart"; a second press within 5 s shows "Restarting..." and restarts, saving pending contacts first (new MyMesh::saveContactsIfDirty(), as CMD_REBOOT does).
- main.cpp: the choice survives the restart in RTC memory and the connection turns on once the home screen shows. Normal restart or power-on: both off.
- main.cpp: app "set wifi.enabled" keeps the choice for the app's reboot instead of switching after 1 s. Reply text unchanged.
- UITask.cpp: restart hints ("restart into Bluetooth:" / "Press Enter to Restart into Wifi") only when a restart is needed; Enter or long press uses the confirmation.
- SettingsScreen.h: WiFi Radio and WiFi setup rows use the same confirmation.
- French added for all new text.
- README.md: new "Combined Bluetooth + WiFi build (T-Deck Max)" section.
Testing: PC harness on the real new logic: both directions, late and timely confirm, start-up pickup after the splash, app wifi.enabled 1/0, Web Reader case, normal restart and power-on leftovers. Full firmware build not run.