From d767a503cd10cdd7041dfec4aace44254533e30e Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 22 Nov 2025 22:37:12 +0100 Subject: [PATCH] remove log out of loop if we find a gpio error --- src/core/emsesp.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/core/emsesp.cpp b/src/core/emsesp.cpp index 13f328015..bde5b1e22 100644 --- a/src/core/emsesp.cpp +++ b/src/core/emsesp.cpp @@ -1665,7 +1665,7 @@ void EMSESP::start() { bool factory_settings = false; #endif - // set valid GPIOs list based on ESP32 board/platform type + // set valid GPIOs list based on ESP32 chip/platform type system_.set_valid_system_gpios(); // start web log service. now we can start capturing logs to the web log @@ -1717,8 +1717,6 @@ void EMSESP::start() { }; LOG_INFO("Library loaded: %d EMS devices, %d device entities, %s", device_library_.size(), EMSESP_TRANSLATION_COUNT, system_.languages_string().c_str()); - system_.get_settings(); // ... and store some of the settings locally - webCustomizationService.begin(); // load the customizations webSchedulerService.begin(); // load the scheduler events webCustomEntityService.begin(); // load the custom telegram reads @@ -1779,12 +1777,12 @@ void EMSESP::shell_prompt() { // main loop calling all services void EMSESP::loop() { - esp32React.loop(); // web services - system_.loop(); // does LED and checks system health, and syslog service + esp32React.loop(); // web services + system_.loop(); // does LED and checks system health, and syslog service + webLogService.loop(); // log in Web UI // run the loop, unless we're in the middle of an OTA upload if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_NORMAL) { - webLogService.loop(); // log in Web UI rxservice_.loop(); // process any incoming Rx telegrams shower_.loop(); // check for shower on/off temperaturesensor_.loop(); // read sensor temperatures @@ -1812,7 +1810,7 @@ void EMSESP::loop() { if (EMSESP::system_.systemStatus() == SYSTEM_STATUS::SYSTEM_STATUS_INVALID_GPIO) { static bool only_once = false; if (!only_once) { - LOG_ERROR("Invalid GPIOs used in settings. Please check your settings."); + LOG_ERROR("Invalid GPIOs used. Please check your settings and log"); only_once = true; } }