Apply infrastructure radio changes after a two-second reply handoff

Persist set freq and set radio atomically, then apply through the existing safe radio scheduler without rebooting. Retain the old tuple until the delay and reply handoff finish, including queued room/sensor replies and TX-complete callbacks. End temporary sessions when accepting a permanent change.

Display applied RF settings even when radio2 is off. Share radio validation across immediate and scheduled setters to preserve STM32 Mini flash capacity. Update command documentation, regression coverage, and CI.

Validated production timing, persistence, display, CLI, fleet/reply, RX, sleep and Morse regressions. W12 repeater, room-server and sensor builds pass. Canonical STM32 Mini Repeater passes flash and RAM admission with 448 bytes of flash remaining. Physical W12 RF testing was not performed.
This commit is contained in:
mikecarper committed 2026-10-26 00:38:13 -07:00
1 parent c98684021a
commit 4f76345b67
22 files changed
+414 -67

No files matched your search

+2
View File
@@ -1116,6 +1116,7 @@ bool SensorMesh::handleIncomingMsg(ClientInfo& from, uint32_t timestamp, uint8_t
}
void SensorMesh::servicePendingPrimaryRadioSettings(bool tx_gap) {
if (!_cli.primaryRadioApplyReady(!hasOutbound() && _mgr->getOutboundTotal() == 0)) return;
const bool revert_radio_due = revert_radio_at && millisHasNowPassed(revert_radio_at);
const bool radio_apply_ready = !radio_apply_retry_at || millisHasNowPassed(radio_apply_retry_at);
bool radio_apply_failed = false;
@@ -1488,6 +1489,7 @@ bool SensorMesh::scheduleNormalRadio() {
// path wait for an idle outbound queue before touching the radio.
set_radio_at = 0;
revert_radio_at = futureMillis(1);
saved_radio_apply_pending = true;
radio_apply_retry_at = 0;
radio_apply_failures = 0;
return true;