v0.1.8 — Heard Adverts
Highlights
Heard Adverts — every advert MeshCore decodes goes into a 64-entry LRU buffer (RAM, evaporates on reboot). New screen reachable from the admin menu lists them with type icons, last-heard age, alias-when-known, and a queued badge for entries you've saved this session. Detail modal shows fingerprint-style pubkey + per-hop path direction.
- Live updates while the screen is visible: 1 Hz rate-limited rebuild, focus preserved by pubkey, skipped while a modal is open.
- Save discovered chat contacts — Save button on the detail modal appends a
from_discovery: trueentry toconfig.jsonwith conservative defaults (all permissions off, no SOS in/out). Activates on next boot via the existing ContactStore + MCLiteMesh registration path. CHAT-only — repeaters/rooms/sensors stay infrastructure. After save:[Reboot now, OK]confirmation. - Manual advert button in the header — sends a local advert immediately and re-anchors the periodic 9-min schedule. Toast confirms.
- Clear button wipes the in-memory buffer.
Config persistence hardening
ConfigManager::save()now uses atomic writes: stage to.tmp, retain previous file as.bakduring the rename, drop.bakon successful completion. Steady state is justconfig.json.- Boot fallback to
config.json.bakif the live file is missing or corrupt (mid-save power loss). Successful recovery promotes the loaded content back to main and removes.bak. - Required because
config.jsonholds the device identity keys — a torn truncate-write would brick the unit.
Other changes
- Boot screen — MCLite mark glyph above the title, drawn programmatically (no raster asset).
- Default
dim_brightness20 → 0 — auto-dim now goes fully dark, prevents long-term burn-in on the always-on status bar. - Long-standing log fix:
[MCLiteMesh] Discovered contactwas printing the raw packedpath_lenbyte (low 6 bits = hops, upper 2 = hash size). Values like70actually meant 6 hops with 2-byte hashes. Now masked correctly. - Config tool: amber 'Added via device — review me' badge on
from_discoverycontacts, with an inline ✕ to mark reviewed. Round-trip preserves the flag on both load paths and the export builder. - i18n: 19 new keys covering type names, field labels, hops format, save/reboot/queue/error states, advert-sent toast — across en/de/fr/it and the embedded LANG_FILES.
Tests
- 185 native test cases (was 172). New coverage in
test_heard_advert_cache(14) andtest_config(atomic writes,.bakfallback, recovery cleanup,from_discoveryround-trip, append-discovered-contact success/duplicate/cap).
Compatibility
- Backward-compatible config: missing
from_discoveryparses asfalse. Old firmware ignores the field. - ConfigManager now writes through the atomic path even for the existing offgrid-toggle save — no caller change needed.
- To force first-boot regen, delete both
config.jsonandconfig.json.bak.
Install
- Web flasher: laserir.github.io/MCLite/tools/web-flasher — pick v0.1.8
- Manual: `esptool.py write_flash 0x0 mclite-v0.1.8.bin`
🤖 Generated with Claude Code