feat(ui-lvgl): on-device map download over WiFi

The map's download button fetches the visible area (overview levels up to
a chosen zoom) into /sdcard/maps from OpenTopoMap or maps/source.txt,
skipping tiles already on the card and rejecting placeholder answers.
Settings > WiFi stores the network in NVS (with scan); WiFi is on only
while a download runs. HTTP runs on a worker task on core 0; the popup
shows link, internal heap and the last TLS/HTTP error.

Internal RAM was the blocker (~13 KB free with WiFi + Bluedroid): the L2
LVGL env now allocates the_mesh in PSRAM (MESH_IN_PSRAM, static RAM
210 -> 87 KB) and mbedTLS allocates from PSRAM. Confirmed on hardware.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-09-25 11:26:44 +02:00
co-authored by Claude Opus 5.5
parent 64321bf12b
commit 0fa7966280
12 changed files with 1030 additions and 9 deletions
+6 -1
View File
@@ -54,6 +54,7 @@ build_flags =
-D FIRMWARE_SOLO_BUILD=1
-D MESHCORE_VERSION='"1.17.1"'
-D AUTO_OFF_MILLIS=60000
-D MESH_IN_PSRAM=1 ; frees ~120 KB internal RAM for WiFi/TLS map downloads
build_src_filter = ${Wio_Tracker_L2.build_src_filter}
+<helpers/esp32/*.cpp>
+<helpers/ui/LGFXDisplay.cpp>
@@ -65,5 +66,9 @@ lib_deps =
${Wio_Tracker_L2.lib_deps}
densaugeo/base64 @ ~1.4.0
lvgl/lvgl @ 9.2.2 ; pinned: bump deliberately, re-test on hardware
SD_MMC ; map tiles on the microSD (framework library)
SD_MMC ; map tiles on the microSD (framework libraries from here on)
FS
WiFi ; on-device map download
HTTPClient
WiFiClientSecure
Preferences