Files
ZephCore/zephcore
Steve PinkhamandClaude Opus 4.8 8cde6d83f3 fix(cli): persist 'set freq' across a later savePrefs()
The `set freq <mhz>` handler saved the new frequency to prefs, then
reverted _prefs->freq to the old value in RAM to keep the running radio
on the old params until reboot. But _prefs is the source of truth for
every savePrefs(), so:
  - `get freq` / `get radio` reported the old value right after a
    successful `set freq`;
  - the next savePrefs() from any other `set` command (e.g. `set rxduty`)
    rewrote the old freq back over the persisted new one, losing the
    change on reboot.

Mirror the `set radio` handler: keep _prefs->freq = f and freeze the
running radio on the old freq via freezeRadioParams() instead of
reverting the pref. Semantics unchanged (applies at reboot; the live
radio stays on the old freq until then); _prefs now correctly retains
the new value so `get` reflects it and later saves can't clobber it.
freezeRadioParams() is implemented for the Repeater and Room Server
roles; the CommonCLI base default is a no-op, so other roles are
unaffected.

Verified on Seeed XIAO MG24 + Wio-SX1262 (Repeater role, built from
release v20260704.220543 + this patch): `set freq 903.0` is retained by
`get freq` immediately and survives an intervening `set rxduty` + reboot.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 17:19:00 -04:00
..
2026-07-04 16:47:46 +02:00
2026-07-07 23:14:22 +02:00
2026-07-08 15:25:58 +02:00
2026-06-07 22:47:17 +02:00
2026-07-02 13:13:26 +02:00
2026-06-07 22:47:17 +02:00
2026-06-21 20:38:57 +02:00
2026-06-07 22:47:17 +02:00
2026-07-04 09:41:09 +02:00
2026-07-08 20:36:48 +02:00
2026-07-04 15:47:27 +02:00
2026-07-03 09:11:43 +02:00
2026-06-07 22:47:17 +02:00
2026-06-07 22:47:17 +02:00
2026-07-04 09:41:09 +02:00
2026-02-22 13:09:18 +01:00
2026-07-04 14:19:25 +02:00