Skip to content

fix: align EU and beacon frequency slots#2093

Merged
garthvh merged 1 commit into
meshtastic:mainfrom
RCGV1:codex/frequency-followups
Jul 16, 2026
Merged

fix: align EU and beacon frequency slots#2093
garthvh merged 1 commit into
meshtastic:mainfrom
RCGV1:codex/frequency-followups

Conversation

@RCGV1

@RCGV1 RCGV1 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • align the EU_866 Lite profile with the firmware's 865.6–867.6 MHz plan, 400 kHz spacing, and 37.5 kHz padding
  • resolve beacon-offered channels through the firmware default slot on regions that define one
  • add regression coverage for EU_866 centers and ham-region Add-versus-Switch behavior

Root cause

EU_866 retained obsolete frequency bounds with no Lite-profile spacing or padding. The beacon join comparison used the hash-only slot helper even after the connected-radio side became default-slot-aware, producing a needless Switch recommendation for matching ham meshes.

Validation

  • xcodebuild test -project Meshtastic.xcodeproj -scheme Meshtastic -destination 'platform=iOS Simulator,id=5669CB03-8FA2-4A97-BE04-A8566204116D' -only-testing:MeshtasticTests/LoRaChannelCalculatorTests -only-testing:MeshtasticTests/BeaconAddVsSwitchTests

Fixes #2091
Fixes #2092

Summary by CodeRabbit

  • Bug Fixes

    • Improved beacon channel matching by honoring firmware-defined default slots when no explicit channel is provided.
    • Updated EU866 frequency calculations to use the correct regional frequency range and spacing.
    • Improved join decisions when a device is already configured for the beacon’s default slot or a different slot.
  • Tests

    • Added coverage for EU866 LiteFast frequency calculations and beacon join scenarios.

@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 2e698e8e-ec99-4feb-b422-e8c3c7dd07d6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@RCGV1
RCGV1 marked this pull request as ready for review July 16, 2026 05:06

@garthvh garthvh left a comment

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.

Verified locally before merging (CI doesn't run tests):

  • EU_866 now matches the firmware's Lite plan exactly — the values here are the ones worked out in #2091 from RDEF(EU_866, 865.6f, 867.6f, ..., PROFILE_LITE) (spacing 0.4, padding 0.0375; LiteFast slot 1 → 865.700 MHz).
  • Beacon-side slotForChannelName now resolves through the region default slot, closing the ham-band Add-vs-Switch gap from #2092 — matching-preset beacons on default-slot regions now correctly offer Add instead of a needless reboot.
  • Ran LoRaChannelCalculatorTests, BeaconAddVsSwitchTests, and ModemPresetFrequencySlotTests on the branch: 28 tests, all green — no regression to the existing slot math or beacon decisions.

Fast turnaround on both follow-ups — thanks!

@garthvh
garthvh merged commit dd19e79 into meshtastic:main Jul 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants