ModbusConfig
ModbusConfig copied to clipboard
Some examples not working.
Some examples not working with Arduino core for ESP8266 ver 2.6 and upper, because SoftwareSerial library has been updated. E.g.:
In constructor 'SoftwareSerialEx::SoftwareSerialEx(int, int, bool, unsigned int)':
ModbusConfig_SingleRS485:77:161: error: no matching function for call to 'SoftwareSerial::SoftwareSerial(int&, int&, bool&, unsigned int&)'
SoftwareSerialEx(int receivePin, int transmitPin, bool inverse_logic, unsigned int buffSize) : SoftwareSerial(receivePin, transmitPin, inverse_logic, buffSize){}
^
Transfer the 256 buffer size to Begin() instruction.
class SoftwareSerialEx : public SoftwareSerial { public: int RxPin = -1; int TxPin = -1; int BaudRate = -1; SoftwareSerialEx(int receivePin, int transmitPin, bool inverse_logic) : SoftwareSerial(receivePin, transmitPin, inverse_logic){} };
Connector->serial = new SoftwareSerialEx(connection.RxPin, connection.TxPin, false); Connector->serial->begin(connection.BaudRate,SWSERIAL_8N1, -1, -1, false, 256);