From 2f5177166a2f11f4494d74bf3692200a36126167 Mon Sep 17 00:00:00 2001 From: oberfritze <139758614+oberfritze@users.noreply.github.com> Date: Mon, 7 Aug 2023 01:52:43 +0200 Subject: [PATCH] Add files via upload Configuration added for SML/OBIS --- src/app.cpp | 12 +++++++++--- src/platformio.ini | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index ed9193a3..c755f0af 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -158,7 +158,9 @@ void app::loopStandard(void) { #endif #ifdef AHOY_SML_OBIS_SUPPORT - sml_loop (); + if (mConfig->sml_obis.ir_connected) { + sml_loop (); + } #endif } @@ -227,7 +229,9 @@ void app::tickNtpUpdate(void) { mSys.cleanup_history(); #ifdef AHOY_SML_OBIS_SUPPORT - sml_cleanup_history (); + if (mConfig->sml_obis.ir_connected) { + sml_cleanup_history (); + } #endif } @@ -365,7 +369,9 @@ void app::tickMidnight(void) { } mSys.cleanup_history (); #ifdef AHOY_SML_OBIS_SUPPORT - sml_cleanup_history(); + if (mConfig->sml_obis.ir_connected) { + sml_cleanup_history(); + } #endif } diff --git a/src/platformio.ini b/src/platformio.ini index 4bb92fbc..a9756a5e 100644 --- a/src/platformio.ini +++ b/src/platformio.ini @@ -9,8 +9,8 @@ ; https://docs.platformio.org/page/projectconf.html [platformio] -src_dir = c:\AhoiDTU\src -include_dir = c:\AhoiDTU\src +src_dir = . +include_dir = . [env] board = d1_mini