mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-08-25 13:40:09 +00:00
Absorbs 106 upstream commits. Seven files conflicted; the substantive one was upstream's new JSON ConfigSerializer (PR #2982), which replaces the binary /com_prefs layout with /prefs.json and makes NodePrefs a ConfigSerializer subclass. Prefs migration - Adopt upstream's ConfigSerializer. writeCommonPrefsImage() and its documented offsets (0-294) are deleted, along with the now-unreachable saveCommonPrefsImageAtomically()/CommonPrefsFileStore atomic rename path. - Load order is /prefs.json, then /com_prefs, then /node_prefs. Upstream dropped the /node_prefs fallback; it is restored here so devices that never advanced past that filename keep their config. - Legacy files are never removed, so migration cannot destroy its own source and a deferred or failed save simply retries next boot. - /com_prefs is treated as a format migration only, not an "upgrade", so it does not trip the bridge.source tx->rx flip on existing nodes. - The MQTTPrefsAtomicStore legacy gate is retained: the observer tail recovered from an old-format file still commits to /mqtt_prefs before /prefs.json is written. - MQTTPrefs and /mqtt_prefs are untouched; savePrefs keeps its save_mqtt parameter and now returns upstream's bool. Fixes to upstream code - RadioPrefs::structure() bound both "rxgain" and "fem_rxgain" to rx_boosted_gain, so radio_fem_rxgain was never persisted. Bound to the correct field. - discovery_mod_timestamp was dropped from structure(); it gates 'since'-filtered DISCOVER replies and is set on every config change, so losing it would silently stop discovery responses after a reboot. Added as "disc_mod". Merge artifacts repaired - Restored bblanchon/ArduinoJson to the native test env; a clean but wrong auto-merge at the lib_deps block boundary dropped it and broke all 19 host test suites. - Migrated the fork's WebConfig UITask screens off the removed DisplayDriver::Color enum to upstream's UIColor element types. - Removed duplicate getCADEnabled() definitions in companion MyMesh.cpp and simple_sensor SensorMesh.cpp that both sides had added. - Dropped memset(&_prefs, 0, ...) in the four example meshes; NodePrefs now has a vtable. guard gains an initializer that memset used to provide. Other resolutions - simple_room_server keeps both the fork's discover.* commands and upstream's new room.post. - docs/payloads.md taken from upstream, undoing content earlier merges had reverted (Control data section, split login tables). Verified: 273/273 host tests pass across native and native_kiss_modem; Heltec v3 repeater, repeater_observer_mqtt, room_server_observer_mqtt, sensor, and companion_radio_ble all build clean.