Skip to content

Added description of special SNR values in RouteDiscovery#883

Open
domusonline wants to merge 1 commit intomeshtastic:masterfrom
domusonline:issues/issue-9013
Open

Added description of special SNR values in RouteDiscovery#883
domusonline wants to merge 1 commit intomeshtastic:masterfrom
domusonline:issues/issue-9013

Conversation

@domusonline
Copy link
Copy Markdown

…op types

This PR introduces a description (comments) on SNR special values that work as flags in the RouteDiscovery messages.
It was requested in the discussion for firmware issue 9013 (make MQTT and UDP hops clear in the traceroute displays)

Checklist before merging

  • All top level messages commented
  • All enum members have unique descriptions

(no changes were made)

@GUVWAF
Copy link
Copy Markdown
Member

GUVWAF commented Apr 2, 2026

@garthvh @jamesarich would a separate enum for the proposed 'magic numbers' be acceptable for app implementation?

E.g.:

enum TraceRouteSNR {
  UNKNOWN = -128;
  MQTT = -127;
  UDP = 127;
}

This way we maintain the contract between firmware and API, while saving several bytes over the air.

@jamesarich
Copy link
Copy Markdown
Contributor

This way we maintain the contract between firmware and API, while saving several bytes over the air.

I'm cool with this getting defined and documented and in the firmware and protocols before the clients take this on - which is the typical flow for new features .

@garthvh
Copy link
Copy Markdown
Member

garthvh commented Apr 3, 2026

@garthvh @jamesarich would a separate enum for the proposed 'magic numbers' be acceptable for app implementation?

E.g.:


enum TraceRouteSNR {

  UNKNOWN = -128;

  MQTT = -127;

  UDP = 127;

}

This way we maintain the contract between firmware and API, while saving several bytes over the air.

Seems like kind of a hack still, can we just have a transport enum?

/*
* The list of SNRs (in dB, scaled by 4) in the route towards the destination.
* Special values (ouside normal SNR range) are used as flags:
* -128 : Unknonw SNR
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

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.

5 participants