jfjlaros / simpleRPC

Simple RPC implementation for Arduino.
MIT License
50 stars 17 forks source link

Error HardwareSerial Arduino #20

Closed joserp93 closed 3 years ago

joserp93 commented 3 years ago

Describe the bug At the time of compiling the HardwareSerial.ino test project does not compile with the following errors:

In file included from C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/rpcCall.tcc:5:0,

             from C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/interface.tcc:13,

             from C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/simpleRPC.h:5,

             from C:\Users\User\Documents\Arduino\PRUEBARPC\PRUEBARPC.ino:1:

C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/read.tcc: In instantiation of 'void rpcRead(I&, T*) [with I = HardwareSerial; T = unsigned char]':

C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/interface.tcc:113:12: required from 'void interface(I&, Args ...) [with I = HardwareSerial; Args = {unsigned char ()(unsigned char), const __FlashStringHelper}]'

C:\Users\User\Documents\Arduino\PRUEBARPC\PRUEBARPC.ino:18:73: required from here

C:\Users\User\Documents\Arduino\libraries\simpleRPC\src/read.tcc:19:3: error: no matching function for call to 'HardwareSerial::read(byte*, unsigned int)'

io.read((byte*)data, sizeof(T));

^

In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Arduino.h:232:0,

             from sketch\PRUEBARPC.ino.cpp:1:

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:126:17: note: candidate: virtual int HardwareSerial::read()

 virtual int read(void);

             ^

C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/HardwareSerial.h:126:17: note: candidate expects 0 arguments, 2 provided

exit status 1 Error compilando para la tarjeta Arduino/Genuino Uno.

jfjlaros commented 3 years ago

I think you may be using an older version of the library, one that is out of sync with the current documentation. Could you have a look at this version of the documentation and try again?

Alternatively, I will release a new version today. Then updating the library should fix this.

jfjlaros commented 3 years ago

I just released a new version. I expect it to be visible in the Arduino GUI within one day.

jfjlaros commented 3 years ago

Update: the latest version is now available in the Arduino GUI.

jfjlaros commented 3 years ago

@joserp93 Can you confirm that any of the two options work?