mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-01 22:48:17 +00:00
Append mqtt_neighbors_enabled(u8) + mqtt_neighbors_interval(u32) to the observer tail of MQTTPrefs. The layout is kept byte-identical to the flex neighbors build: the enable flag lands in the old struct's zeroed trailing padding (offset 2857) and the interval begins exactly at the former baseline (2860), so sizeof grows 2860 -> 2864 (net +4 bytes). offsetof static_asserts lock the layout so a mismatch fails the build. The codec now accepts three v1 payload sizes: register 2860 as a "pre-neighbors" Current payload so an in-lineage upgrade reads its existing /mqtt_prefs and defaults the neighbors tail (off / 24h). Because 2864 is the shared Current baseline, a /mqtt_prefs written by either the flex build or this firmware is interchangeable. Add the 12/24/336h interval constants, neighbors defaults, and a load-time interval clamp that keeps persisted values inside the signed-delta millis() scheduling window. Extend the host codec suite with a pre-neighbors migration case and neighbors round-trip coverage.