Document set_path_hash_mode / get_path_hash_mode in README - #103
Open
joeyleake wants to merge 1 commit into
Open
Document set_path_hash_mode / get_path_hash_mode in README#103joeyleake wants to merge 1 commit into
joeyleake wants to merge 1 commit into
Conversation
Both commands already existed in commands/device.py but had no entry in the README's command reference table, so users had no way to discover them (reported as "missing"). Add rows under Advanced Configuration explaining that mode controls how many bytes of each hop's node ID are stored per hop in advertised/logged paths (bytes per hop = mode + 1), matching the plen >> 6 / hash_mode + 1 logic in reader.py and commands/base.py. Fixes meshcore-dev#84
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.
Fixes #84
Problem
set_path_hash_mode()andget_path_hash_mode()already existed insrc/meshcore/commands/device.py, but neither was listed in README.md's
command reference table, so there was no way to discover them short of
reading the source. The issue reporter assumed the functionality itself
was missing.
Fix
Added both to the Device Commands table under "Advanced Configuration",
next to the existing set_multi_acks entry. The description explains what
path hash mode actually controls — how many bytes of each hop's node ID
are stored per hop in advertised/logged paths (bytes per hop = mode + 1) —
based on the actual encoding logic in reader.py
(
path_hash_mode = plen >> 6,path_byte_count = path_len * (path_hash_mode + 1)) and commands/base.py's encode_reply_path, not justa restated stub.
No code changes — docs only.
Testing
Full suite: 179 passed, 2 failed (test_send_cmd,
test_advert_path_preserves_embedded_zero_bytes) — both pre-existing on a
clean main checkout, unrelated to this change.