fix: swap restored radio config under the radio lock

Restoring a backup wrote the transceiver config in place from the async
task while the radio task could be transmitting with it.

Read the record into a copy and swap it in through the new
Transceiver::setConfig, which Transceiver::fromJSON now uses as well.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-11 12:46:40 +02:00
parent 352f36e478
commit 00a084048f
3 changed files with 15 additions and 7 deletions

View file

@ -559,6 +559,7 @@ class Transceiver {
bool printBuffer = false;
//bool toJSON(JsonObject& obj);
bool fromJSON(JsonObject& obj);
void setConfig(const transceiver_config_t &cfg);
bool save();
bool begin();
void loop();