Decision
Clients let the user raise the coding rate while use_preset is true. The preset keeps setting bandwidth and spreading factor, and a coding rate above the preset's own value replaces it. Choosing a coding rate at or below the preset's value means "use the preset's".
Context
LoRaConfig.coding_rate is the denominator of the LoRa coding rate, 5 to 8 for 4/5 to 4/8. Clients currently hide it or grey it out whenever use_preset is on, and the proto comment on modem_preset says the preset replaces it.
Firmware already supports this. Since meshtastic/firmware#9155 (2.7.18), RadioInterface::applyModemConfig() takes the preset's bandwidth and spreading factor and uses coding_rate in place of the preset's value when it is valid and higher. A lower or unset value falls back to the preset. The change is on the client side only.
A higher coding rate does not split the mesh. Meshtastic sends the coding rate in the explicit LoRa header, so nodes on the same preset still receive each other in both directions. The frequency slot and the channel hash are also unaffected, because they come from the preset name and the channel name.
What the user gets is more forward error correction in exchange for airtime. The payload section of a packet sent at 4/8 takes 60% longer on air than at 4/5 with the same bandwidth and spreading factor, and that counts against the duty cycle and channel utilisation limits.
Required Client Behavior
-
Show the coding rate control while use_preset is true, labelled as an override of the preset, for example "Coding rate (preset: 4/5)".
-
Offer only the values above the preset's coding rate, up to 4/8, plus "Preset default". A lower value would be ignored by firmware, so the client must not offer it.
-
Write "Preset default" as coding_rate = 0. Any value at or below the preset's is stored as 0 too, so nothing misleading is left in the config.
-
Show the coding rate the radio is actually using wherever the client shows the preset's radio parameters, not the preset's nominal value.
-
Say near the control that a higher coding rate lengthens every transmission and uses more of the duty cycle and channel utilisation budget.
-
When the user switches presets, keep the override only while it is still above the new preset's coding rate, and reset it to "Preset default" otherwise.
-
Leave the custom-settings path (use_preset false) unchanged.
Acceptance Criteria
With use_preset on and a preset with a 4/5 coding rate, picking 4/8 writes coding_rate = 8, the radio reports 4/8, and the node still exchanges messages with an unmodified node on the same preset.
With use_preset on, no value below the preset's coding rate is offered, and "Preset default" writes 0.
Switching to a preset whose coding rate is equal to or above the stored override resets the control to "Preset default".
Firmware older than 2.7.18 ignores coding_rate while a preset is on, so clients hide the control on it.
Platform Tracking
Decision
Clients let the user raise the coding rate while
use_presetis true. The preset keeps setting bandwidth and spreading factor, and a coding rate above the preset's own value replaces it. Choosing a coding rate at or below the preset's value means "use the preset's".Context
LoRaConfig.coding_rateis the denominator of the LoRa coding rate, 5 to 8 for 4/5 to 4/8. Clients currently hide it or grey it out wheneveruse_presetis on, and the proto comment onmodem_presetsays the preset replaces it.Firmware already supports this. Since meshtastic/firmware#9155 (2.7.18),
RadioInterface::applyModemConfig()takes the preset's bandwidth and spreading factor and usescoding_ratein place of the preset's value when it is valid and higher. A lower or unset value falls back to the preset. The change is on the client side only.A higher coding rate does not split the mesh. Meshtastic sends the coding rate in the explicit LoRa header, so nodes on the same preset still receive each other in both directions. The frequency slot and the channel hash are also unaffected, because they come from the preset name and the channel name.
What the user gets is more forward error correction in exchange for airtime. The payload section of a packet sent at 4/8 takes 60% longer on air than at 4/5 with the same bandwidth and spreading factor, and that counts against the duty cycle and channel utilisation limits.
Required Client Behavior
Show the coding rate control while
use_presetis true, labelled as an override of the preset, for example "Coding rate (preset: 4/5)".Offer only the values above the preset's coding rate, up to 4/8, plus "Preset default". A lower value would be ignored by firmware, so the client must not offer it.
Write "Preset default" as
coding_rate = 0. Any value at or below the preset's is stored as 0 too, so nothing misleading is left in the config.Show the coding rate the radio is actually using wherever the client shows the preset's radio parameters, not the preset's nominal value.
Say near the control that a higher coding rate lengthens every transmission and uses more of the duty cycle and channel utilisation budget.
When the user switches presets, keep the override only while it is still above the new preset's coding rate, and reset it to "Preset default" otherwise.
Leave the custom-settings path (
use_presetfalse) unchanged.Acceptance Criteria
With
use_preseton and a preset with a 4/5 coding rate, picking 4/8 writescoding_rate = 8, the radio reports 4/8, and the node still exchanges messages with an unmodified node on the same preset.With
use_preseton, no value below the preset's coding rate is offered, and "Preset default" writes 0.Switching to a preset whose coding rate is equal to or above the stored override resets the control to "Preset default".
Firmware older than 2.7.18 ignores
coding_ratewhile a preset is on, so clients hide the control on it.Platform Tracking