File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,3 +34,10 @@ sdkconfig.*
3434# Ignore temporary backup files
3535* .orig
3636* .bak
37+ data /
38+ build /
39+ coredump_report.txt
40+ coredump.bin
41+ logs /
42+ elf_archive /
43+ src /SomfyController.ino.cpp
Original file line number Diff line number Diff line change 1- 3.0.10
1+ 3.0.11
Original file line number Diff line number Diff line change 88 < meta name ="apple-mobile-web-app-title " content ="ESPSomfy RTS App ">
99 < meta name ="apple-mobile-web-app-status-bar-style " content ="black ">
1010
11- < link rel ="stylesheet " href ="main.css?v=3.0.10c " type ="text/css " />
12- < link rel ="stylesheet " href ="widgets.css?v=3.0.10c " type ="text/css " />
13- < link rel ="stylesheet " href ="icons.css?v=3.0.10c " type ="text/css " />
11+ < link rel ="stylesheet " href ="main.css?v=3.0.11c " type ="text/css " />
12+ < link rel ="stylesheet " href ="widgets.css?v=3.0.11c " type ="text/css " />
13+ < link rel ="stylesheet " href ="icons.css?v=3.0.11c " type ="text/css " />
1414 < link rel ="icon " type ="image/png " href ="favicon.png " />
1515
1616 <!-- iPad retina icon -->
114114 rel ="apple-touch-startup-image ">
115115
116116
117- < script type ="text/javascript " src ="index.js?v=3.0.10c "> </ script >
117+ < script type ="text/javascript " src ="index.js?v=3.0.11c "> </ script >
118118</ head >
119119< body >
120120 < div id ="divContainer " class ="container main " data-auth ="false ">
Original file line number Diff line number Diff line change @@ -4879,6 +4879,15 @@ bool Transceiver::begin() {
48794879 return true ;
48804880}
48814881void Transceiver::loop () {
4882+ // Dispatch deferred frequency scan requests from the main task so that
4883+ // attachInterrupt/detachInterrupt cross-core IPCs don't race with WiFi.
4884+ if (_pendingScan >= 0 ) {
4885+ int8_t pending = _pendingScan;
4886+ _pendingScan = -1 ;
4887+ if (pending == 1 ) this ->beginFrequencyScan ();
4888+ else this ->endFrequencyScan ();
4889+ return ;
4890+ }
48824891 somfy_rx_t rx;
48834892 if (noiseDetected && rxmode != 3 && this ->config .noiseDetection ) {
48844893 if (millis () - noiseStart > 100 ) {
Original file line number Diff line number Diff line change @@ -490,6 +490,10 @@ class Transceiver {
490490 bool _received = false ;
491491 somfy_frame_t frame;
492492 public:
493+ // -1 = none pending, 1 = beginFrequencyScan pending, 0 = endFrequencyScan pending.
494+ // Set from the async_tcp task; consumed by loop() on the main task to avoid
495+ // concurrent cross-core IPC races with the WiFi stack (EXCCAUSE_LOAD_PROHIBITED).
496+ volatile int8_t _pendingScan = -1 ;
493497 transceiver_config_t config;
494498 bool printBuffer = false ;
495499 // bool toJSON(JsonObject& obj);
Original file line number Diff line number Diff line change @@ -2406,7 +2406,7 @@ void Web::begin() {
24062406 }));
24072407
24082408 asyncServer.on (" /beginFrequencyScan" , HTTP_GET, [](AsyncWebServerRequest *request) {
2409- somfy.transceiver .beginFrequencyScan ();
2409+ somfy.transceiver ._pendingScan = 1 ; // deferred to main task — see Transceiver::loop()
24102410 AsyncJsonResp resp;
24112411 resp.beginResponse (request, g_async_content, sizeof (g_async_content));
24122412 resp.beginObject ();
@@ -2416,7 +2416,7 @@ void Web::begin() {
24162416 });
24172417
24182418 asyncServer.on (" /endFrequencyScan" , HTTP_GET, [](AsyncWebServerRequest *request) {
2419- somfy.transceiver .endFrequencyScan ();
2419+ somfy.transceiver ._pendingScan = 0 ; // deferred to main task — see Transceiver::loop()
24202420 AsyncJsonResp resp;
24212421 resp.beginResponse (request, g_async_content, sizeof (g_async_content));
24222422 resp.beginObject ();
You can’t perform that action at this time.
0 commit comments