diff --git a/README.md b/README.md index b54750f..38f0a13 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ To compile this project you will need to install VS Code and the PlatformIO exte ## Programming your ESP32 - Start by cloning or downloading this repository. +- Change `board = ...` in platformio.ini to match the ESP32 board you are actually using. - Copy the file `Credentials.cpp.template` to `Credentials.cpp`. - Change the SSID and password in `Credentials.cpp` to match your home network settings. - If you want to use MQTT, also insert your MQTT server's address and your user name / password (can be left empty if not required). diff --git a/src/Components/Modbus/ModbusTCP.cpp b/src/Components/Modbus/ModbusTCP.cpp index 11ef974..f13ffef 100644 --- a/src/Components/Modbus/ModbusTCP.cpp +++ b/src/Components/Modbus/ModbusTCP.cpp @@ -207,7 +207,7 @@ namespace ModbusTCP gModbusServer.start( Constants::DaheimladenWallbox::TCPPort, Constants::DaheimladenWallbox::MaxClients, - Constants::DaheimladenWallbox::Timeout); + Constants::DaheimladenWallbox::TimeoutMs); gModbusServer.registerWorker(Constants::DaheimladenWallbox::ServerId, READ_INPUT_REGISTER, ReadInputRegister); gModbusServer.registerWorker(Constants::DaheimladenWallbox::ServerId, READ_HOLD_REGISTER, ReadHoldRegister); diff --git a/src/Configuration/Constants.h b/src/Configuration/Constants.h index 6d1b5fa..0c41af9 100644 --- a/src/Configuration/Constants.h +++ b/src/Configuration/Constants.h @@ -65,7 +65,7 @@ namespace Constants constexpr uint8_t ServerId = 0xFF; constexpr uint16_t TCPPort = 502; constexpr uint8_t MaxClients = 8; - constexpr uint32_t Timeout = 2000; + constexpr uint32_t TimeoutMs = 2000; constexpr float VoltageFactor = 10.0f; constexpr float CurrentFactor = 10.0f; constexpr float EnergyFactor = 10.0f;