feat(repeater): default network profile, band-matched to companion freq

Enabling the repeater now defaults to a dedicated radio profile rather
than relaying on the companion's current frequency: same-network
repeating isn't the MeshCore community norm. The default profile is
seeded with a frequency in the same legal band as the companion's own
network (433/868/915 MHz, via defaultRepeaterFreqForBand()) rather than
a flat firmware constant, so it can't land outside what's allowed for
the operator's region.

Also fixes a gap where a true first boot (no prefs file yet) never hit
the DataStore.cpp migration fallback and stayed on repeater_use_profile=0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Jakub
2026-06-20 01:04:35 +02:00
co-authored by Claude Sonnet 4.6
parent aba924bac9
commit afe7b8a0ca
7 changed files with 81 additions and 26 deletions
@@ -6,10 +6,14 @@
// and keeps the relaying controls next to the numbers that show them working.
//
// Network modes:
// - Current — repeat on the companion's current frequency (default).
// - Current — repeat on the companion's current frequency. Opt-in only:
// relaying on whatever network the operator is chatting on
// isn't the MeshCore community norm.
// - Custom — enabling the repeater switches the radio to a dedicated profile
// (preset or manual), and disabling restores the companion params.
// Set the profile equal to the companion's for "same network".
// Default for a never-configured device, seeded with a frequency
// in the same band as the companion's own network (so the default
// can't land outside what's legal for the operator's region).
// Included by UITask.cpp.
#include <helpers/ui/DisplayDriver.h>