mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-02-17 12:12:11 +01:00
chore: clean up W5500 debug logs
- Reduce verbose logs in main loop - Remove detailed HTTP traces on shade commands - Keep useful messages for W5500 initialization and IP status
This commit is contained in:
parent
0e0a482afb
commit
4df4fc87d2
3 changed files with 94 additions and 78 deletions
|
|
@ -37,7 +37,7 @@ void setup() {
|
|||
net.setup();
|
||||
somfy.begin();
|
||||
//git.checkForUpdate();
|
||||
esp_task_wdt_init(15, true); //enable panic so ESP32 restarts (increased from 7 to 15 seconds)
|
||||
esp_task_wdt_init(30, true); //enable panic so ESP32 restarts (increased to 30 seconds for W5500)
|
||||
esp_task_wdt_add(NULL); //add current thread to WDT watch
|
||||
|
||||
}
|
||||
|
|
@ -54,41 +54,52 @@ void loop() {
|
|||
ESP.restart();
|
||||
return;
|
||||
}
|
||||
|
||||
uint32_t timing = millis();
|
||||
|
||||
|
||||
net.loop();
|
||||
if(millis() - timing > 100) Serial.printf("Timing Net: %ldms\n", millis() - timing);
|
||||
if(millis() - timing > 100) {
|
||||
Serial.printf("Timing Net: %ldms\n", millis() - timing);
|
||||
}
|
||||
esp_task_wdt_reset();
|
||||
timing = millis();
|
||||
|
||||
|
||||
somfy.loop();
|
||||
if(millis() - timing > 100) Serial.printf("Timing Somfy: %ldms\n", millis() - timing);
|
||||
if(millis() - timing > 100) {
|
||||
Serial.printf("Timing Somfy: %ldms\n", millis() - timing);
|
||||
}
|
||||
esp_task_wdt_reset();
|
||||
timing = millis();
|
||||
|
||||
|
||||
if(net.connected() || net.softAPOpened) {
|
||||
if(!rebootDelay.reboot && net.connected() && !net.softAPOpened) {
|
||||
git.loop();
|
||||
esp_task_wdt_reset();
|
||||
}
|
||||
|
||||
webServer.loop();
|
||||
if(millis() - timing > 100) Serial.printf("Timing WebServer: %ldms\n", millis() - timing);
|
||||
if(millis() - timing > 100) {
|
||||
Serial.printf("Timing WebServer: %ldms\n", millis() - timing);
|
||||
}
|
||||
esp_task_wdt_reset();
|
||||
timing = millis();
|
||||
|
||||
|
||||
sockEmit.loop();
|
||||
if(millis() - timing > 100) Serial.printf("Timing Socket: %ldms\n", millis() - timing);
|
||||
if(millis() - timing > 100) {
|
||||
Serial.printf("Timing Socket: %ldms\n", millis() - timing);
|
||||
}
|
||||
esp_task_wdt_reset();
|
||||
}
|
||||
|
||||
|
||||
if(rebootDelay.reboot && millis() > rebootDelay.rebootTime) {
|
||||
net.end();
|
||||
ESP.restart();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// Final watchdog reset before end of loop
|
||||
esp_task_wdt_reset();
|
||||
|
||||
|
||||
// Small delay to prevent tight loop from consuming too much CPU
|
||||
delay(1);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue