Documentation of return values in ModbusServer.h and Arduino Reference does not match source code
smacinnes opened this issue · 0 comments
smacinnes commented
The documentation of return values in ModbusServer.h for configure functions are reversed from the actual source code. This error then shows up in the Arduino Reference site.
Comments in src/ModbusServer.h claiming return value of 0 on success, 1 on failure
ArduinoModbus/src/ModbusServer.h
Lines 32 to 40 in 12c32ce
Source code in src/ModbusServer.cpp showing a return value of 0 on failure, 1 on success:
ArduinoModbus/src/ModbusServer.cpp
Lines 53 to 77 in 12c32ce
Error showing in Arduino Reference:
https://www.arduino.cc/reference/en/libraries/arduinomodbus/modbusserver.configurecoils/
This is the case for:
configureCoils()configureDiscreteInputs()configureHoldingRegisters()configureInputRegisters()poll()