[2.8] Inferred max hops: stop overwriting on every packet

Open
#449 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Start with the inferred max hops logic in receivers.py (lines 63-90), then check where each service (position.py:45, device_metrics.py:41, environment_metrics.py:60, air_quality.py:54, power_metrics.py:42, health_metrics.py:33, host_metrics.py:38) overwrites the value per packet. Choose between inferring from unscaled ports or keeping a rolling max, and confirm the choice with a maintainer first. Done when a text packet with hop_start 3 followed by a position packet with hop_start 1 leaves the inferred max at 3, and tests cover that sequence.

Written by the indexing model from the issue text.

Description

enhancement meshtastic-2.8

Part of pskillen/meshflow-api#437 (Meshtastic 2.8.x support). Code: HP-1 · Priority: Should · Size: S

Summary

2.8 HopScaling lowers hop_start on broadcast POSITION/TELEMETRY/NODEINFO/NEIGHBORINFO depending on mesh density, so meshtastic_inferred_max_hops flaps. It's overwritten on every packet (receivers.py:63-90; services position.py:45, device_metrics.py:41, environment_metrics.py:60, air_quality.py:54, power_metrics.py:42, health_metrics.py:33, host_metrics.py:38).

Infer from unscaled ports, or keep a rolling max.

Acceptance criteria

  • Text(hop_start 3) then position(hop_start 1) yields 3
  • Tests

Depends on: none

Dominant language
Python
Stars
1
Forks
0
Avg merge
1d 20h
Merged PRs (30d)
5

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pskillen/meshflow-api

All issues in pskillen/meshflow-api

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.