mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-04-20 02:52:12 +02:00
Merge branch 'main' into main
This commit is contained in:
commit
bb3ec52e89
6 changed files with 27 additions and 7 deletions
7
.gitignore
vendored
7
.gitignore
vendored
|
|
@ -34,3 +34,10 @@ sdkconfig.*
|
|||
# Ignore temporary backup files
|
||||
*.orig
|
||||
*.bak
|
||||
data/
|
||||
build/
|
||||
coredump_report.txt
|
||||
coredump.bin
|
||||
logs/
|
||||
elf_archive/
|
||||
src/SomfyController.ino.cpp
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.0.10
|
||||
3.0.11
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
<meta name="apple-mobile-web-app-title" content="ESPSomfy RTS App">
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
||||
|
||||
<link rel="stylesheet" href="main.css?v=3.0.10c" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=3.0.10c" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=3.0.10c" type="text/css" />
|
||||
<link rel="stylesheet" href="main.css?v=3.0.11c" type="text/css" />
|
||||
<link rel="stylesheet" href="widgets.css?v=3.0.11c" type="text/css" />
|
||||
<link rel="stylesheet" href="icons.css?v=3.0.11c" type="text/css" />
|
||||
<link rel="icon" type="image/png" href="favicon.png" />
|
||||
|
||||
<!-- iPad retina icon -->
|
||||
|
|
@ -114,7 +114,7 @@
|
|||
rel="apple-touch-startup-image">
|
||||
|
||||
|
||||
<script type="text/javascript" src="index.js?v=3.0.10c"></script>
|
||||
<script type="text/javascript" src="index.js?v=3.0.11c"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="divContainer" class="container main" data-auth="false">
|
||||
|
|
|
|||
|
|
@ -4879,6 +4879,15 @@ bool Transceiver::begin() {
|
|||
return true;
|
||||
}
|
||||
void Transceiver::loop() {
|
||||
// Dispatch deferred frequency scan requests from the main task so that
|
||||
// attachInterrupt/detachInterrupt cross-core IPCs don't race with WiFi.
|
||||
if(_pendingScan >= 0) {
|
||||
int8_t pending = _pendingScan;
|
||||
_pendingScan = -1;
|
||||
if(pending == 1) this->beginFrequencyScan();
|
||||
else this->endFrequencyScan();
|
||||
return;
|
||||
}
|
||||
somfy_rx_t rx;
|
||||
if (noiseDetected && rxmode != 3 && this->config.noiseDetection) {
|
||||
if (millis() - noiseStart > 100) {
|
||||
|
|
|
|||
|
|
@ -490,6 +490,10 @@ class Transceiver {
|
|||
bool _received = false;
|
||||
somfy_frame_t frame;
|
||||
public:
|
||||
// -1 = none pending, 1 = beginFrequencyScan pending, 0 = endFrequencyScan pending.
|
||||
// Set from the async_tcp task; consumed by loop() on the main task to avoid
|
||||
// concurrent cross-core IPC races with the WiFi stack (EXCCAUSE_LOAD_PROHIBITED).
|
||||
volatile int8_t _pendingScan = -1;
|
||||
transceiver_config_t config;
|
||||
bool printBuffer = false;
|
||||
//bool toJSON(JsonObject& obj);
|
||||
|
|
|
|||
|
|
@ -2406,7 +2406,7 @@ void Web::begin() {
|
|||
}));
|
||||
|
||||
asyncServer.on("/beginFrequencyScan", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
somfy.transceiver.beginFrequencyScan();
|
||||
somfy.transceiver._pendingScan = 1; // deferred to main task — see Transceiver::loop()
|
||||
AsyncJsonResp resp;
|
||||
resp.beginResponse(request, g_async_content, sizeof(g_async_content));
|
||||
resp.beginObject();
|
||||
|
|
@ -2416,7 +2416,7 @@ void Web::begin() {
|
|||
});
|
||||
|
||||
asyncServer.on("/endFrequencyScan", HTTP_GET, [](AsyncWebServerRequest *request) {
|
||||
somfy.transceiver.endFrequencyScan();
|
||||
somfy.transceiver._pendingScan = 0; // deferred to main task — see Transceiver::loop()
|
||||
AsyncJsonResp resp;
|
||||
resp.beginResponse(request, g_async_content, sizeof(g_async_content));
|
||||
resp.beginObject();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue