Open aagum-bae opened 6 months ago
That happens because you updated to the 3.0.0-rc1
version:
Can reproduce it by installing that version
d:\Users\Lucas\Documents\Arduino\libraries\TMC2209\src\TMC2209\TMC2209.cpp: In member function 'void TMC2209::setup(HardwareSerial&, long int, SerialAddress, int16_t, int16_t)':
d:\Users\Lucas\Documents\Arduino\libraries\TMC2209\src\TMC2209\TMC2209.cpp:32:30: error: no matching function for call to 'HardwareSerial::end(bool)'
32 | hardware_serial_ptr_->end(false);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Lucas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc1\cores\esp32/Arduino.h:197,
from d:\Users\Lucas\Documents\Arduino\libraries\TMC2209\src/TMC2209.h:10,
from d:\Users\Lucas\Documents\Arduino\libraries\TMC2209\src\TMC2209\TMC2209.cpp:7:
C:\Users\Lucas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc1\cores\esp32/HardwareSerial.h:255:10: note: candidate: 'void HardwareSerial::end()'
255 | void end(void);
| ^~~
C:\Users\Lucas\AppData\Local\Arduino15\packages\esp32\hardware\esp32\3.0.0-rc1\cores\esp32/HardwareSerial.h:255:10: note: candidate expects 0 arguments, 1 provided
exit status 1
Compilation error: exit status 1
Just downgrade to 3.0.0-alpha3
and it should work again.
Not sure if this is a bug in the esp32-arduino library or this project.
Thanks for the reply, however I am using 2.0.16
, will try updating to 3.0.0 alpha 3
Hi all, problem solved, thanks @Luro02
Do you have any recommendations on how I can change the library to best work with the various versions of ESP32? I will take a look at this when I have a chance.
One could adjust the code only for the esp32 3.x version;
#if ESP_ARDUINO_VERSION_MAJOR >= 3
hardware_serial_ptr_->end();
#else
hardware_serial_ptr_->end(false);
#endif
Where is the false
argument from and what does it do? Neither the ESP32 nor the Arduino Core AVR implementation has a HardwareSerial::end(bool)
defined?
That works, but need to hit the reset button on the ESP32, figured it out after just messing around.
I remember I needed to add end(false) to fix some bug, but I should have made a comment in the code about it because now I forget why I thought that was necessary. I think I will just replace that line with end() and people can upgrade to the newest esp32 3.x version if they run into any problems. Thanks!
I am using ESP32, the same code with 0 modification was working just fine yesterday, since today morning I have been running into this error and idk what to do.
Error message displayed:
For the example code: