Skip to content
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

ESP32: candidate expects 4 arguments, 5 provided when compile #78

Open
ivan3612 opened this issue Oct 7, 2024 · 2 comments
Open

ESP32: candidate expects 4 arguments, 5 provided when compile #78

ivan3612 opened this issue Oct 7, 2024 · 2 comments

Comments

@ivan3612
Copy link

ivan3612 commented Oct 7, 2024

#include "sbus.h"

bfs::SbusTx sbus_tx(&Serial,D0,D1,1);

bfs::SbusData data;

void setup() {
Serial.begin(115200);
while (!Serial) {}
sbus_tx.Begin();
}

void loop () {

sbus_tx.data(data);
/* Write the data to the servos */
sbus_tx.Write();

}

When compelling the above code, error occurred

c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp: In member function 'void bfs::SbusRx::Begin()':
c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp:74:55: error: no matching function for call to 'HardwareSerial::begin(int32_t&, int, int8_t&, int8_t&, bool&)'
uart_->begin(baud_, SERIAL_8E2, rxpin_, txpin_, inv_);
^
In file included from C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/Arduino.h:157:0,
from c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.h:30,
from c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp:26:
C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/HardwareSerial.h:40:10: note: candidate: void HardwareSerial::begin(long unsigned int, uint32_t, int8_t, int8_t)
void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1);
^
C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/HardwareSerial.h:40:10: note: candidate expects 4 arguments, 5 provided
c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp: In member function 'void bfs::SbusTx::Begin()':
c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp:225:55: error: no matching function for call to 'HardwareSerial::begin(int32_t&, int, int8_t&, int8_t&, bool&)'
uart_->begin(baud_, SERIAL_8E2, rxpin_, txpin_, inv_);
^
In file included from C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/Arduino.h:157:0,
from c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.h:30,
from c:\Users\Ivan\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src\sbus.cpp:26:
C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/HardwareSerial.h:40:10: note: candidate: void HardwareSerial::begin(long unsigned int, uint32_t, int8_t, int8_t)
void begin(unsigned long baud, uint32_t config=SERIAL_8N1, int8_t rxPin=-1, int8_t txPin=-1);
^
C:\Users\Ivan\AppData\Local\Arduino15\packages\esp32\hardware\DFRobot_FireBeetle-ESP32\0.0.6\cores\esp32/HardwareSerial.h:40:10: note: candidate expects 4 arguments, 5 provided

exit status 1

Compilation error: exit status 1

@ivan3612 ivan3612 changed the title ESP3 ESP32 candidate expects 4 arguments, 5 provided when complie Oct 7, 2024
@ivan3612 ivan3612 changed the title ESP32 candidate expects 4 arguments, 5 provided when complie ESP32 candidate expects 4 arguments, 5 provided when compile Oct 7, 2024
@ivan3612 ivan3612 changed the title ESP32 candidate expects 4 arguments, 5 provided when compile ESP32: candidate expects 4 arguments, 5 provided when compile Oct 7, 2024
@flybrianfly
Copy link
Member

Looks like that particular ESP32 core dev team didn't include the ability to handle inverted serial. Are you stuck with that ESP32 core library?

@aefo
Copy link

aefo commented Nov 29, 2024

The updated example code in #80 should help show what's required for setting up the example on ESP32. That seemed to compile / run ok locally for me (using v3.0.7 by Espressif Systems for the board manager). Although it looks like you're already adjusted the constructor call to add the required args for sbus_tx setup, so it may be a different issue....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants