mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-08-02 10:16:11 +00:00
feat(repeater): dedicated Tools screen + optional radio profile
Move the repeater controls out of Settings > Radio (where the indented sub-item labels collided with the value column on a 128px OLED) onto their own full-width Tools > Repeater screen, holding the toggle, the five flood-politeness filters, and live forwarding stats (Forwarded / Pool free / Queue) together. Toggle text standardised to ON/OFF throughout. Adds an optional dedicated radio profile (Network: Current/Custom): enabling the repeater can switch the radio to a preset/manual freq/bw/sf/cr and disabling restores the companion's params (revert-on-disable). A profile equal to the companion = same network; a different one = drop onto a separate repeater network. MyMesh::applyRepeaterRadio() is the single decision point (boot + every toggle/edit), gated by repeaterProfileValid(); the profile re-applies after a reboot left with the repeater on. Persisted behind schema 0xC0DE0010, cleared to off when an upgraded file yields an invalid config. Docs updated (settings_screen, tools_screen, README, FEATURES). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
22ad46257f
commit
0da487729d
@@ -173,11 +173,21 @@ struct NodePrefs { // persisted to file
|
||||
static const int8_t REPEAT_SNR_DISABLED = -128;
|
||||
uint8_t repeat_suppress_dup;
|
||||
|
||||
// Optional dedicated radio profile for repeater mode. When repeater_use_profile
|
||||
// is 1, enabling the repeater switches the radio to repeater_freq/bw/sf/cr and
|
||||
// disabling restores the companion's freq/bw/sf/cr (the fields above). 0 = the
|
||||
// repeater stays on the current companion frequency (default — no switch).
|
||||
uint8_t repeater_use_profile;
|
||||
float repeater_freq;
|
||||
float repeater_bw;
|
||||
uint8_t repeater_sf;
|
||||
uint8_t repeater_cr;
|
||||
|
||||
// Tail sentinel written at the end of /new_prefs. Bump the low byte when
|
||||
// adding/removing/reordering fields in DataStore::savePrefs/loadPrefsInt so
|
||||
// older saves are detected on load and skipped (zero-init defaults kept).
|
||||
// High 24 bits identify the file format; low byte is the schema revision.
|
||||
static const uint32_t SCHEMA_SENTINEL = 0xC0DE000F;
|
||||
static const uint32_t SCHEMA_SENTINEL = 0xC0DE0010;
|
||||
|
||||
// Bit-index for each home page. Used by page_order (entries store bit+1) and
|
||||
// by home_pages_mask. Single source of truth — both HomeScreen::pageBit/bitToPage
|
||||
|
||||
Reference in New Issue
Block a user