From 918b0275a9742ba9d22f88673db4fa9bcef9b28d Mon Sep 17 00:00:00 2001 From: archipelago Date: Tue, 21 Jul 2026 08:36:59 -0400 Subject: [PATCH] feat(ui): MeshCore RF frequency-plan presets by country + Custom entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The RF section shipped as four bare fields; restore a prepopulated plan list (dropdown) with Custom unlocking free entry, per operator direction. Preset labels carry the full values, so the number fields render only in Custom mode — no duplicated display. Presets limited to verifiable sources: the repo's MeshCore community plans (EU 868/433), the MeshCore firmware's own build defaults (platformio.ini arduino_base 869.618/62.5/ SF8 CR5; companion example 915.0/250/SF10/CR5), and the operator-attested Portugal plan (869.618/62.5/SF8/CR8). Stored params are matched back to a named preset on load; hand-editing flips the dropdown to Custom. Co-Authored-By: Claude Fable 5 --- neode-ui/src/utils/loraRegions.ts | 26 ++++++ neode-ui/src/views/mesh/MeshDevicePanel.vue | 90 ++++++++++++++++----- 2 files changed, 96 insertions(+), 20 deletions(-) diff --git a/neode-ui/src/utils/loraRegions.ts b/neode-ui/src/utils/loraRegions.ts index 07a86941..f9415388 100644 --- a/neode-ui/src/utils/loraRegions.ts +++ b/neode-ui/src/utils/loraRegions.ts @@ -100,3 +100,29 @@ export function meshcorePlanFor(code: string | null | undefined): MeshcorePlan | if (!code) return undefined return MESHCORE_PLANS[code.toUpperCase()] } + +/** A named MeshCore RF preset for the Device-panel dropdown. */ +export interface MeshcoreRfPreset { + id: string + label: string + freqMhz: number + bwKhz: number + sf: number + cr: number +} + +/** + * Prepopulated MeshCore RF plans by country/region for the Device panel's + * preset dropdown ("Custom" in the UI unlocks free entry). Values are only + * added here when verifiable: the MeshCore community plans above, the + * MeshCore firmware's own build defaults (platformio.ini `arduino_base`: + * 869.618/62.5/SF8, CR default 5; companion example: 915.0/250/SF10/CR5), + * and operator-attested deployment plans. + */ +export const MESHCORE_RF_PRESETS: MeshcoreRfPreset[] = [ + { id: 'eu_868', label: 'Europe / UK — 869.525 MHz, 250 kHz, SF11, CR4/5', freqMhz: 869.525, bwKhz: 250, sf: 11, cr: 5 }, + { id: 'pt', label: 'Portugal — 869.618 MHz, 62.5 kHz, SF8, CR4/8', freqMhz: 869.618, bwKhz: 62.5, sf: 8, cr: 8 }, + { id: 'fw_default', label: 'MeshCore firmware default — 869.618 MHz, 62.5 kHz, SF8, CR4/5', freqMhz: 869.618, bwKhz: 62.5, sf: 8, cr: 5 }, + { id: 'us_anz_915', label: 'US / Canada / ANZ — 915.0 MHz, 250 kHz, SF10, CR4/5', freqMhz: 915.0, bwKhz: 250, sf: 10, cr: 5 }, + { id: 'eu_433', label: 'Europe (433 MHz) — 433.65 MHz, 250 kHz, SF11, CR4/5', freqMhz: 433.65, bwKhz: 250, sf: 11, cr: 5 }, +] diff --git a/neode-ui/src/views/mesh/MeshDevicePanel.vue b/neode-ui/src/views/mesh/MeshDevicePanel.vue index 5364dedd..0a74a2d7 100644 --- a/neode-ui/src/views/mesh/MeshDevicePanel.vue +++ b/neode-ui/src/views/mesh/MeshDevicePanel.vue @@ -1,7 +1,7 @@