-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modbus serial on ESP8266 #3
Comments
Hi --------- Error message: ------------- Arduino: 1.8.3 (Windows 10), TD: 1.37, Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)" H:\Users\Dave\Documents\Arduino\libraries\ModbusSerial\ModbusSerial.cpp: In member function 'bool ModbusSerial::config(HardwareSerial*, long int, u_int, int)': H:\Users\Dave\Documents\Arduino\libraries\ModbusSerial\ModbusSerial.cpp:23:31: error: invalid conversion from 'u_int {aka unsigned int}' to 'SerialConfig' [-fpermissive]
In file included from H:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/Arduino.h:245:0,
H:\Users\Dave\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/HardwareSerial.h:77:10: error: initializing argument 2 of 'void HardwareSerial::begin(long unsigned int, SerialConfig)' [-fpermissive]
|
I've got a fix for that ;-) in ModbusSerial.cpp #ifdef ESP8266
bool ModbusSerial::config(HardwareSerial* port, long baud, SerialConfig format, int txPin)
#else
bool ModbusSerial::config(HardwareSerial* port, long baud, u_int format, int txPin)
#endif in ModbusSerial.h #ifdef ESP8266
bool config(HardwareSerial* port, long baud, SerialConfig format, int txPin) ;
#else
bool config(HardwareSerial* port, long baud, u_int format, int txPin=-1);
#endif |
Thanks for your tip! |
mucho gusto a todos. |
Hi,
Thanks a lot for this lib. I'm trying to use modbus serial on a ESP8266 but I'm not sure what to do, do I need to take ModbusSerial lib from modbus-arduino (there is none on esp8266 lib) and Modbus library from modbus-esp8266, is that correct ?
The text was updated successfully, but these errors were encountered: