Skip to content

Add LoRa coding rate preset override controls#1929

Open
RCGV1 wants to merge 2 commits into
meshtastic:mainfrom
RCGV1:codex/lora-coding-rate-override
Open

Add LoRa coding rate preset override controls#1929
RCGV1 wants to merge 2 commits into
meshtastic:mainfrom
RCGV1:codex/lora-coding-rate-override

Conversation

@RCGV1

@RCGV1 RCGV1 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary

  • Adds a LoRa coding-rate control to the LoRa config screen.
  • Keeps preset mode on preset bandwidth/spreading factor while allowing only firmware-valid higher coding-rate overrides.
  • Uses a default toggle plus stepped slider so users can see when they are following the preset and when they are adding redundancy.
  • Preserves protobuf default behavior by saving coding_rate = 0 for preset-default CR instead of writing an explicit equal-to-default value.

Reasoning

Firmware now allows config.lora.coding_rate to override a preset only when the value is a valid higher/more redundant CR. Equal or lower values should fall back to the preset CR. The UI mirrors that rule by filtering preset-mode choices to 0 or strictly higher values, while custom mode still exposes explicit 4/5...4/8 values.

Screenshot

LoRa coding rate override slider in preset mode

Verification

  • git diff --check passed.
  • Built for Benjamin's iPhone with:
    xcodebuild -workspace Meshtastic.xcworkspace -scheme Meshtastic -configuration Debug -destination 'platform=iOS,id=00008130-000578880102001C' -derivedDataPath /tmp/meshtastic-device-derived -skipPackagePluginValidation -skipMacroValidation build
  • Initial device build hit a codesign internal error while disk was nearly full; after clearing this branch's derived-data caches, the same build succeeded.
  • Installed the built app to the iPhone successfully. Launch was denied because the phone was locked.
  • Focused test compile was attempted earlier, but the test bundle hit the same local code-signing/disk-space issue rather than a source failure.

@garthvh

garthvh commented Jun 28, 2026

Copy link
Copy Markdown
Member

I don't really like this pattern, once you go to custom stuff you are customizing things.

@RCGV1

RCGV1 commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

I disagree, modifying your coding rate isn't "custom" it doesn't make your packets get ignored by other nodes running different coding rates. I want to encourage people to use different coding rates, as depending on your deployment, you may need a higher coding rate to get out. @NomDeTom can back me up here

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