mirror of
https://github.com/agessaman/MeshCore.git
synced 2026-09-02 09:04:38 +00:00
merge: upstream/dev into observer-firmware-dev (2026-07-30, db232808)
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.
This commit is contained in:
@@ -327,9 +327,6 @@ uint32_t SensorMesh::getDirectRetransmitDelay(const mesh::Packet* packet) {
|
||||
int SensorMesh::getInterferenceThreshold() const {
|
||||
return _prefs.interference_threshold;
|
||||
}
|
||||
bool SensorMesh::getCADEnabled() const {
|
||||
return _prefs.cad_enabled;
|
||||
}
|
||||
int SensorMesh::getAGCResetInterval() const {
|
||||
return ((int)_prefs.agc_reset_interval) * 4000; // milliseconds
|
||||
}
|
||||
@@ -714,7 +711,6 @@ SensorMesh::SensorMesh(mesh::MainBoard& board, mesh::Radio& radio, mesh::Millise
|
||||
set_radio_at = revert_radio_at = 0;
|
||||
|
||||
// defaults
|
||||
memset(&_prefs, 0, sizeof(_prefs));
|
||||
_prefs.airtime_factor = 1.0; // one half
|
||||
_prefs.rx_delay_base = 0.0f; // turn off by default, was 10.0;
|
||||
_prefs.tx_delay_factor = 0.5f; // was 0.25f
|
||||
|
||||
Reference in New Issue
Block a user