fix: set the radio up for a new config before anything transmits on it

setConfig() swapped the config in and released the radio lock, and apply()
only ran later from save(), so the radio task could send queued jobs with
the new TX pin and settings on a CC1101 that wasn't set up for them.
setConfig() now swaps, saves and applies under one lock and save() goes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-12 18:33:59 +02:00
parent 0ba5260d1d
commit c4472ba8e8
4 changed files with 9 additions and 11 deletions

View file

@ -2411,7 +2411,6 @@ void Web::begin() {
}
JsonObject obj = json.as<JsonObject>();
somfy.transceiver.fromJSON(obj);
somfy.transceiver.save();
AsyncJsonResp resp;
resp.beginResponse(request, g_async_content, sizeof(g_async_content));
resp.beginObject();