From 53b82c32c3ee02f9e9017f0b121e59f3630cc8cf Mon Sep 17 00:00:00 2001 From: Emanuele Trabattoni Date: Mon, 14 Jul 2025 11:35:19 +0200 Subject: [PATCH] DebugLog level in every header --- lib/ETH/ETH_Driver.h | 2 ++ lib/GPIO/TCA9554PWR_Driver.h | 4 ++++ lib/I2C/I2C_Driver.h | 2 ++ lib/RS485/RS485_Driver.h | 2 +- lib/RTC/PCF85063_Driver.h | 3 +++ lib/SENECA/S50140_Driver.cpp | 2 +- lib/SENECA/S50140_Driver.h | 4 +++- lib/TEMP/R4DCB08_Driver.h | 2 ++ lib/utils/utils.h | 2 ++ 9 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lib/ETH/ETH_Driver.h b/lib/ETH/ETH_Driver.h index 3aabc6e..514d56c 100644 --- a/lib/ETH/ETH_Driver.h +++ b/lib/ETH/ETH_Driver.h @@ -1,5 +1,7 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + #include #include #include diff --git a/lib/GPIO/TCA9554PWR_Driver.h b/lib/GPIO/TCA9554PWR_Driver.h index 5ea2da8..506e58a 100644 --- a/lib/GPIO/TCA9554PWR_Driver.h +++ b/lib/GPIO/TCA9554PWR_Driver.h @@ -1,4 +1,8 @@ #pragma once + +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + +#include #include "I2C_Driver.h" /****************************************************** The macro defines the TCA9554PWR information ******************************************************/ diff --git a/lib/I2C/I2C_Driver.h b/lib/I2C/I2C_Driver.h index 55210ce..3eab38e 100644 --- a/lib/I2C/I2C_Driver.h +++ b/lib/I2C/I2C_Driver.h @@ -1,5 +1,7 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + #include #include #include diff --git a/lib/RS485/RS485_Driver.h b/lib/RS485/RS485_Driver.h index f581e92..ff410d5 100644 --- a/lib/RS485/RS485_Driver.h +++ b/lib/RS485/RS485_Driver.h @@ -1,6 +1,6 @@ #pragma once -// #define DEBUGLOG_DEFAULT_LOG_LEVEL_TRACE +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO #include #include diff --git a/lib/RTC/PCF85063_Driver.h b/lib/RTC/PCF85063_Driver.h index 45d3ef1..96d2df6 100644 --- a/lib/RTC/PCF85063_Driver.h +++ b/lib/RTC/PCF85063_Driver.h @@ -1,5 +1,8 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + +#include #include "I2C_Driver.h" #include diff --git a/lib/SENECA/S50140_Driver.cpp b/lib/SENECA/S50140_Driver.cpp index e7efd80..1ced720 100644 --- a/lib/SENECA/S50140_Driver.cpp +++ b/lib/SENECA/S50140_Driver.cpp @@ -3,7 +3,7 @@ namespace drivers { - S50140::S50140(drivers::MODBUS &bus, const uint8_t address) : m_bus(bus), m_address(address) + S50140::S50140(drivers::MODBUS &bus, const uint8_t address) : m_bus(bus), m_address(address), m_lastRequest(millis()) { } S50140::~S50140() diff --git a/lib/SENECA/S50140_Driver.h b/lib/SENECA/S50140_Driver.h index 8edb4b0..1ff0289 100644 --- a/lib/SENECA/S50140_Driver.h +++ b/lib/SENECA/S50140_Driver.h @@ -1,5 +1,7 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + #include #include @@ -75,6 +77,6 @@ namespace drivers private: const uint8_t m_address; drivers::MODBUS &m_bus; - uint64_t m_lastRequest = 0; + uint64_t m_lastRequest; }; } \ No newline at end of file diff --git a/lib/TEMP/R4DCB08_Driver.h b/lib/TEMP/R4DCB08_Driver.h index 36a0cf4..0adee3d 100644 --- a/lib/TEMP/R4DCB08_Driver.h +++ b/lib/TEMP/R4DCB08_Driver.h @@ -1,5 +1,7 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + #include #include diff --git a/lib/utils/utils.h b/lib/utils/utils.h index 3be02d2..1ac741a 100644 --- a/lib/utils/utils.h +++ b/lib/utils/utils.h @@ -1,5 +1,7 @@ #pragma once +#define DEBUGLOG_DEFAULT_LOG_LEVEL_INFO + #include #include #include