fix(config): add RegionCode values 33-37 + fix ITU2_2M label (#3927)#3928
Conversation
The upstream RegionCode enum (meshtastic/protobufs config.proto) now goes to 37, but three parallel region lists in MeshMonitor had drifted behind, so devices reporting/configured to newer regions showed no label, weren't selectable, and got no calculated frequency. - REGION_OPTIONS (dropdown, constants.ts): was stopping at 32; add 33-37 (ITU3_2M, ITU1_70CM, ITU2_70CM, ITU3_70CM, ITU2_125CM) and correct the value-28 label from the non-upstream `ITU23_2M` to `ITU2_2M`. - regionFrequencyBounds (loraFrequency.ts): was stopping at 32; add 33-37 with freqStart/freqEnd from firmware RadioInterface.cpp (firmware#10627, on develop / awaiting release), and fix the value-28 comment. - EnumMappings.RegionCode (deviceBackupService.ts): was stopping at 26 — device backups of anything ITU1_2M+ exported a raw number; add 27-37. Names/values verified against protobufs master config.proto; frequency bounds against firmware develop. Note 33-37 ship in a future firmware release (mirrors the existing "awaiting firmware" EU_874/EU_917 entries). Tests: REGION_OPTIONS contiguous-coverage + label guards (new constants.test.ts) and slot-0 frequency for each new region. Full suite green (7946/0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015AFBA76hsjqhsXe1BdnYub
|
Claude finished @Yeraze's task —— View job PR Review — fix(config): add RegionCode values 33-37 + fix ITU2_2M label
SummaryThe changes are correct and well-structured. The enum additions are accurately sourced, the frequency bounds align with the firmware, and the test suite is solid. There is one bug that was missed in this PR. Bug:
|
Summary
The upstream
RegionCodeenum (meshtastic/protobufsconfig.proto) now goes up to 37, but three parallel region lists in MeshMonitor had drifted behind. Devices reporting/configured to a newer region showed no label, weren't selectable in the dropdown, and got no calculated LoRa frequency. This brings all three lists current and fixes an existing mislabel spotted while cross-referencing.Fixes #3927.
Changes
REGION_OPTIONS(src/components/configuration/constants.ts) — the region dropdown. Was stopping at32; adds 33–37 (ITU3_2M,ITU1_70CM,ITU2_70CM,ITU3_70CM,ITU2_125CM) and corrects value 28 from the non-upstreamITU23_2Mto the upstream nameITU2_2M.regionFrequencyBounds(src/utils/loraFrequency.ts) — a parallel list with the same drift. Adds 33–37 withfreqStart/freqEndtaken from firmwareRadioInterface.cpp, and fixes the value-28 comment.EnumMappings.RegionCode(src/server/services/deviceBackupService.ts) — the backup export name map was even further behind (stopped at 26), so device backups of anythingITU1_2M+ exported a raw number. Completed 27–37.Sources / verification
protobufsmasterconfig.proto.RadioInterface.cpp(added in meshtastic/firmware#10627, currently ondevelop/ awaiting a firmware release — mirrors the existing "awaiting firmware"EU_874/EU_917entries). Value 37 band is 220–225 MHz per the proto/firmware (the issue paraphrased 220–222).Issues Resolved
Fixes #3927
Documentation Updates
No documentation changes needed (region lists are self-describing labels).
Testing
success: true)constants.test.ts:REGION_OPTIONScovers contiguous values 0–37, no dupes, validNAME - descriptionlabels, value-28 label isITU2_2M, and 33–37 presentloraFrequency.test.ts: slot-0 frequency for each new region (e.g. ITU2_70CM 420.0 → 420.125 MHz)🤖 Generated with Claude Code