Skip to content

feat(companion, dispatcher): implement path hash mode for flood packets#44

Merged
rightup merged 3 commits intopyMC-dev:feat/companionfrom
agessaman:dev-companion-v2
Mar 8, 2026
Merged

feat(companion, dispatcher): implement path hash mode for flood packets#44
rightup merged 3 commits intopyMC-dev:feat/companionfrom
agessaman:dev-companion-v2

Conversation

@agessaman
Copy link
Copy Markdown
Contributor

  • Added set_path_hash_mode method to CompanionBase and CompanionRadio to configure path hash mode for flood packets.
  • Introduced default path hash mode in Dispatcher for flood packets with 0 hops, allowing compatibility with packets built without the companion.
  • Updated Packet class to apply path hash mode and prevent overwriting when already set by the companion.
  • Enhanced tests to validate path hash mode functionality and ensure correct behavior for flood packets and TRACE payloads.

- Added `set_path_hash_mode` method to CompanionBase and CompanionRadio to configure path hash mode for flood packets.
- Introduced default path hash mode in Dispatcher for flood packets with 0 hops, allowing compatibility with packets built without the companion.
- Updated Packet class to apply path hash mode and prevent overwriting when already set by the companion.
- Enhanced tests to validate path hash mode functionality and ensure correct behavior for flood packets and TRACE payloads.
…erver

- Changed _DRAIN_BATCH to 1 to ensure clients remain in sync with sends after every frame.
- Updated error handling in _write_err to use ERR_CODE_NOT_FOUND for both bad channel and sendGroupMessage failures, aligning with firmware expectations.
…ses in CompanionFrameServer

- Adjustments to improve compatibility with meshcore_py.
- Changed client_idle_timeout_sec parameter to accept None, allowing users to disable the idle timeout and match firmware behavior.
- Updated documentation to clarify the new behavior regarding connection management and idle timeout settings.
@rightup rightup merged commit 4a278c1 into pyMC-dev:feat/companion Mar 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants