Skip to content

fix(mesh): Set hopStart to match hopLimit in sent packets#4324

Merged
jamesarich merged 2 commits intomainfrom
fix/hops
Jan 26, 2026
Merged

fix(mesh): Set hopStart to match hopLimit in sent packets#4324
jamesarich merged 2 commits intomainfrom
fix/hops

Conversation

@jamesarich
Copy link
Collaborator

This commit updates MeshCommandSender to set the hopStart field on outgoing MeshPackets to be equal to the hopLimit.

Previously, hopStart was not being explicitly set, leaving it at its default value. This change ensures that the initial hop count is correctly recorded in the packet, which is essential for accurate hop count tracking and debugging within the mesh.

The build extension function for MeshPacket has been modified to set both hopLimit and hopStart to the resolved hop limit value. New tests have been added to MeshCommandSenderHopLimitTest to verify that hopStart is correctly set for various packet-sending functions, including sendToRadio and requestUserInfo.

fixes #4308

This commit updates `MeshCommandSender` to set the `hopStart` field on outgoing `MeshPacket`s to be equal to the `hopLimit`.

Previously, `hopStart` was not being explicitly set, leaving it at its default value. This change ensures that the initial hop count is correctly recorded in the packet, which is essential for accurate hop count tracking and debugging within the mesh.

The `build` extension function for `MeshPacket` has been modified to set both `hopLimit` and `hopStart` to the resolved hop limit value. New tests have been added to `MeshCommandSenderHopLimitTest` to verify that `hopStart` is correctly set for various packet-sending functions, including `sendToRadio` and `requestUserInfo`.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich enabled auto-merge January 26, 2026 14:01
@github-actions github-actions bot added the bugfix PR tag label Jan 26, 2026
@jamesarich jamesarich changed the title feat(mesh): Set hopStart to match hopLimit in sent packets fix(mesh): Set hopStart to match hopLimit in sent packets Jan 26, 2026
@codecov
Copy link

codecov bot commented Jan 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (ed6606b) to head (d8e6480).
⚠️ Report is 4 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #4324   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files          3       3           
  Lines         28      28           
  Branches       8       8           
=====================================
  Misses        28      28           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@jamesarich jamesarich added this pull request to the merge queue Jan 26, 2026
Merged via the queue into main with commit 2b6c318 Jan 26, 2026
9 checks passed
@jamesarich jamesarich deleted the fix/hops branch January 26, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Node Exchange User Info Requests sends frames with StartHop 0

1 participant