Repository navigation
Save extra_sf and discovery_mod_timestamp in /prefs.json - #3799
Open
marcelverdult wants to merge 1 commit into
Open
marcelverdult wants to merge 1 commit into
marcelverdult wants to merge 1 commit into
Conversation
marcelverdult
added a commit
to marcelverdult/MeshCore_Refactor
that referenced
this pull request
Nov 11, 2026
…a-sf-disc docs: note for upstream PR meshcore-dev#3799 (extra_sf, discovery_mod_timestamp)
marcelverdult
force-pushed
the
upstream-candidate/prefs-extra-sf-disc
branch
from
November 11, 2026 11:41
b9805cc to
e27f68d
Compare
Member
|
Hey there, thanks for the PR. The tests aren't needed for this. Only the 3 lines in CommonCLI.cpp, please remove all other changes. |
NodePrefs::saveSerial()/loadSerial() leave out two fields that the firmware
keeps as live state, so both are reset on every reboot of a node that boots
from /prefs.json:
- discovery_mod_timestamp ("has this node changed since", read by the
repeater and sensor discovery replies). The legacy binary loader still reads
it, so it was lost only after the move to /prefs.json.
- extra_sf (side detector spread factors set with "extra.sf"). It was never
persisted in either format.
Both are now written ("disc_mod" next to the advert intervals, "extra_sf" in
the radio object as hex, like the companion's scope key). The constructor
zeroes extra_sf, which had no initialiser and is now written out.
Compatibility: a file without the keys loads as before, the serializer leaves
a field alone when its key is missing. A firmware that does not know the keys
skips them like any unknown key.
marcelverdult
force-pushed
the
upstream-candidate/prefs-extra-sf-disc
branch
from
November 12, 2026 12:04
e27f68d to
1dc2493
Compare
Contributor
Author
|
Done, reduced to the three lines (they are in CommonCLI.h). |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NodePrefs::saveSerial()/loadSerial() leave out two fields that the firmware keeps as live state, so both are reset on every reboot of a node that boots from /prefs.json:
Both are now written ("disc_mod" next to the advert intervals, "extra_sf" in the radio object as hex, like the companion's scope key). The constructor zeroes extra_sf, which had no initialiser and is now written out.
Compatibility: a file without the keys loads as before, the serializer leaves a field alone when its key is missing. A firmware that does not know the keys skips them like any unknown key.