Skip to content

radio: a preset keeps its coding rate, and a placed node joins the mesh's modem - #756

Open
A13xB0 wants to merge 1 commit into
mainfrom
radio-preset-coding-rate
Open

A13xB0 wants to merge 1 commit into
mainfrom
radio-preset-coding-rate

Conversation

@A13xB0

@A13xB0 A13xB0 commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Two ways a node ended up on a different radio from the mesh it was in, both silent.

radio.preset made every preset's coding rate four too high. It copied the preset table's coding rate, MeshCore's denominator (8 for 4/8), into RadioConfig.CodingRate, which holds it minus four. EU/UK (Narrow) became 4/12: half again the airtime in the engine, and a companion sent CR 12 refused it ("firmware rejected an argument as out of range"). It now uses RadioPreset.Config(), which already converted correctly. The table's comment said "denominator minus four" over a column of denominators; it now says what the column holds.

A placed node had no radio. nodes.place left it empty, so the engine fell back to its own SF10 at 250 kHz while the firmware booted on SF8 at 62.5 kHz. On any narrow mesh the node shared a channel with nothing and never heard anybody. A placed node now takes the modem every other node shares, or scenario.DefaultRadio() where they disagree or there are none. DefaultRadio documented itself as "the modem configuration a new or imported node gets" and was called from nowhere.

In the GUI: the map's place tool calls nodes.place.

Before: charlie, placed from the map, hears nothing (heard 0) After: charlie hears the repeater and both companions (heard 3)
before after

Tests: a preset keeps its coding rate; a placed node joins the mesh's modem; with no agreed modem it gets the default.

Docs: MeshBench/docs#45

…sh's modem

radio.preset copied the preset table's coding rate, which is MeshCore's
denominator, into a field that holds it minus four, so EU/UK (Narrow)
became 4/12: half again the airtime in the engine, and a companion told
CR 12 refused it. It now uses the preset's own conversion.

nodes.place left the radio empty, so a placed node fell back to the
engine's SF10 at 250 kHz while its firmware booted on SF8 at 62.5 kHz,
and on a narrow mesh it never heard anybody. It now takes the modem the
mesh shares, or the documented default.

This branch has not been deployed

No deployments
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