Skip to content

Commit

Permalink
modbus.cpp, evse.cpp: Improve logging on modbus errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dingo35 committed May 2, 2023
1 parent 15aa730 commit 3b02d12
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SmartEVSE-3/src/evse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2608,7 +2608,7 @@ void MBhandleError(Error error, uint32_t token)
{
// ModbusError wraps the error code and provides a readable error message for it
ModbusError me(error);
//_LOG_A("Error response: %02X - %s\n", error, (const char *)me);
_LOG_A("Error response: %02X - %s\n", error, (const char *)me);
}


Expand Down
1 change: 1 addition & 0 deletions SmartEVSE-3/src/modbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ void ModbusDecode(uint8_t * buf, uint8_t len) {
MB.Function = buf[1];
// Modbus Exception code
MB.Exception = buf[2];
_LOG_A("Modbus Exception %i, Address=%i, Function=%i.\n", MB.Exception, MB.Address, MB.Function);
// Modbus data packets minimum length is 8 bytes
} else if (len >= 6) {
// Modbus device address
Expand Down

0 comments on commit 3b02d12

Please sign in to comment.