Skip to content

epic(#733): apply radio presets to repeaters, room servers and sensors - #746

Merged
diffwireauto merged 8 commits into
devfrom
feat/733-remote-presets
Oct 2, 2026
Merged

diffwireauto merged 8 commits into
devfrom
feat/733-remote-presets

Conversation

@diffwireauto

Copy link
Copy Markdown
Member

Epic C of Feature #647 (plan of record: docs/initiatives/standalone/647-mesh500-presets/PLAN.md). Epic: #733. Stacked on Epic B (#744): the base is feat/726-preset-catalog, so this diff shows only Epic C. It retargets to dev once #744 merges.

What this changes

Remote nodes (repeaters, room servers, sensors) can apply the same presets through the stock admin CLI.

Task Commit What
#734 a8ef70e The preset picker on the repeater / room server radio card fills frequency, bandwidth, SF and CR. TX power is untouched (a separate command on these nodes).
#662 5a6306c "Apply temporarily" sends tempradio f,bw,sf,cr,minutes instead of set radio. Default 1440 minutes, allowed 1 to 35791 (firmware's 32-bit revert timer overflows beyond that). It's sent after every other command, because the node retunes 2 s after replying. CR goes out as the 4/x denominator.
#735 4f465b9 A preset's path hash sets set path.hash.mode (zero-based). On a temporary save it is held back and stays pending, since firmware has no temporary path hash and it would outlive the revert; a note says so on screen. This is a default I chose; the owner can reverse it.
#745 ba6f946 Manage Sensor: sensors open the repeater login and admin hub. Stock SensorMesh handles the same login and CLI over the mesh.

Verification (C4, #736)

CI-equivalent gates, run at ba6f9462:

  • check_no_emdash.py: OK.
  • flutter analyze --fatal-infos --fatal-warnings: no issues.
  • dart format --set-exit-if-changed: 0 files changed.
  • flutter test: 1040 passed (1 skip predates this work).
  • Builds: Windows release, and a release-signed APK.

test/helpers/remote_radio_commands_test.dart pins:

  • the set radio / tempradio strings;
  • the duration bounds, including the overflow arithmetic;
  • that tempradio goes last;
  • the path hash conversion and the hold-back rule;
  • preset matching against repeater-reported frequencies.

The live OK - temp params for N mins reply and the revert are checked on a real repeater at D1 (#738).

Pre-PR Gemini review

scripts/llm-consult.py --backend gemini --model gemini-2.5-pro. Audit log ~/.claude/llm-consultations/meshcore-open/2026-10-01-gemini-epicC-prompt-gemini-gemini-2.5-pro.log. Cost $0.0138, plus one earlier call that failed with no response parts and wrote no audit log (its cost is unknown).

# Finding Disposition
1 Reset "path hash came from a preset" when the user edits radio values, so a later temporary save sends it Rejected. The hold-back exists because a permanent path hash change outlives the tempradio revert, which is just as true after a frequency tweak. Only a deliberate edit to the path hash itself shows the user wants it applied, and that edit already clears the flag.
2 The duration's helper text "1 to 35791 minutes" looks like a constant error Rejected. helperText renders in the normal hint style; error styling is errorText, which isn't used. A range hint is useful before the user hits a bad value.

Agent: MagentaHawk (session 5a8922d6)

🤖 Generated with Claude Code

diffwireauto and others added 4 commits October 1, 2026 04:46
…tings

The remote-node radio card gains the same grouped RadioPresetPicker as
Radio Settings. Picking a preset fills frequency, bandwidth, SF and CR
and marks the radio field dirty, so Save sends the existing `set radio`.
TX power is untouched: on these nodes it is a separate command. Room
servers share this screen (contacts_screen.dart:1063), so they get it
too. The selection is matched from the current fields to the nearest
kHz (repeaters report e.g. 908.205017). The list refreshes when stale.

Epic: #733
Agent: MagentaHawk (session 5a8922d6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…adio settings

A checkbox on the remote-node radio card switches Save from
`set radio` (persisted, applied after a reboot) to stock `tempradio`
(applied now, reverting after the duration, nothing saved). The
duration defaults to 1440 minutes (owner decision) and is limited to
1-35791: firmware schedules the revert at 2000 + minutes * 60000 ms in
a 32-bit int, which overflows beyond that. Because tempradio retunes
the node 2 s after it replies, it is sent after every other command in
the same save. Coding rate goes out as the 4/x denominator, which is
what firmware range-checks. Unchecked behaviour is unchanged.

Epic: #733
Agent: MagentaHawk (session 5a8922d6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picking a preset that carries a path hash size sets the screen's
existing path hash field to the zero-based mode, so Save sends
`set path.hash.mode N` alongside the radio params.

With "Apply temporarily" checked, a preset's path hash is held back:
firmware has no temporary path hash, so it would outlive the tempradio
revert and leave the node off its mesh. A note says so on screen, and
the value stays pending for a normal save. A path hash the user sets by
hand is always sent. (Default chosen here; flagged for the owner.)

Epic: #733
Agent: MagentaHawk (session 5a8922d6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sensor contacts gain a "Manage Sensor" item that opens the repeater
login and admin hub. Stock sensor firmware handles the same admin login
(SensorMesh::handleLoginReq) and CLI-over-mesh as repeaters, so the
remote settings screen, its preset picker and tempradio option work
there too. Repeater and room server menus are unchanged.

Epic: #733
Agent: MagentaHawk (session 5a8922d6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diffwireauto and others added 2 commits October 1, 2026 14:54
Same gap as the companion form: a repeater on the USA values with a
1- or 2-byte path hash matched MeshCore's "Canada" (3-byte). The remote
matcher now takes the node's path hash mode and applies the same rule.

Epic: #733
Agent: MagentaHawk (session 5a8922d6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
diffwireauto and others added 2 commits October 1, 2026 18:30
So "1 to N minutes" never shows as an error on an untouched form.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@diffwireauto
diffwireauto changed the base branch from feat/726-preset-catalog to dev October 2, 2026 01:41
@diffwireauto
diffwireauto merged commit 8939541 into dev Oct 2, 2026
16 checks passed
@Strycher
Strycher deleted the feat/733-remote-presets branch October 2, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant