emelianov / modbus-esp8266

Most complete Modbus library for Arduino. A library that allows your Arduino board to communicate via Modbus protocol, acting as a master, slave or both. Supports network transport (Modbus TCP) and Serial line/RS-485 (Modbus RTU). Supports Modbus TCP Security for ESP8266/ESP32.
Other
519 stars 186 forks source link

#define MODBUSRTU_DEBUG seems to have no effect when defined outside ModbusSettings.h #322

Closed fredlcore closed 5 months ago

fredlcore commented 9 months ago

I wanted to turn on debug messages and thus added #define MODBUSRTU_DEBUG before #include <ModbusRTU.h>. However, this does not seem to have any effect. Only if I enable the definement in ModbusSettings.h it will take effect. Do I do anything wrong here?

14yannick commented 7 months ago

Same for me did found a solution

emelianov commented 5 months ago

It's works so by C/CPP design

fredlcore commented 5 months ago

You're right, thanks for the explanation.