ModbusConfig icon indicating copy to clipboard operation
ModbusConfig copied to clipboard

Some examples not working.

Open infinic opened this issue 5 years ago • 1 comments

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){}

                                                                                                                                                                 ^

infinic avatar Dec 03 '19 11:12 infinic

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);

M2000Interpreter avatar Dec 16 '21 19:12 M2000Interpreter