FR: Add Hop Limits to send functions by NekoCWD · Pull Request #828 · meshtastic/python
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds an optional hop-limit override to several high-level “send” helper methods in MeshInterface, allowing callers to control routing TTL per message while still delegating packet construction/sending to sendData() / _sendPacket().
Changes:
- Add optional
hopLimitparameter tosendText(),sendAlert(),sendPosition(),sendTelemetry(),sendWaypoint(), anddeleteWaypoint(). - Forward
hopLimitthrough tosendData()so it ultimately setsmeshPacket.hop_limitin_sendPacket(). - Update docstring for
sendText()and partially forsendAlert()to mentionhopLimit.
Comment on lines 467 to 470
| Arguments: | ||
| text {string} -- The text of the alert to send | ||
| hopLimit -- hop limit to use | ||
|
|
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this docstring, hopLimit is listed under “Arguments”, but it’s a keyword argument (optional) in the function signature. Move it to the “Keyword Arguments” section (or clarify it’s optional) to avoid misleading API docs.
Copilot uses AI. Check for mistakes.
Codecov Report
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.59%. Comparing base (cfb2378) to head (c7ee644).
⚠️ Report is 87 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@ ## master #828 +/- ## ========================================== + Coverage 59.99% 60.59% +0.59% ========================================== Files 24 24 Lines 4267 4337 +70 ========================================== + Hits 2560 2628 +68 - Misses 1707 1709 +2
| Flag | Coverage Δ | |
|---|---|---|
| unittests | 60.59% <100.00%> (+0.59%) |
⬆️ |
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.
🚀 New features to boost your workflow:
- ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
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