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

Updated example to be compile compatible with ESP32 & README.md updates #80

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aefo
Copy link

@aefo aefo commented Nov 29, 2024

Updated example to work with ESP32 setup (the constructor is different, based on conditional compilation).

Added to README.md to help discovery of this library for Microzone receiver users where it's called M-Bus (instead of SBus)

Original error message for the example running on the ESP32 was:

C:\Users\myUser\Documents\Arduino\rc_receiver_mbus\sbus_example\sbus_example.ino:29:29: error: no matching function for call to 'bfs::SbusRx::SbusRx(HardwareSerial*)'
   29 | bfs::SbusRx sbus_rx(&Serial2);
      |                             ^
In file included from C:\Users\myUser\Documents\Arduino\rc_receiver_mbus\sbus_example\sbus_example.ino:26:
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:53:3: note: candidate: 'bfs::SbusRx::SbusRx(HardwareSerial*, int8_t, int8_t, bool, bool)'
   53 |   SbusRx(HardwareSerial *bus, const int8_t rxpin, const int8_t txpin,
      |   ^~~~~~
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:53:3: note:   candidate expects 5 arguments, 1 provided
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:50:3: note: candidate: 'bfs::SbusRx::SbusRx(HardwareSerial*, int8_t, int8_t, bool)'
   50 |   SbusRx(HardwareSerial *bus, const int8_t rxpin, const int8_t txpin,
      |   ^~~~~~
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:50:3: note:   candidate expects 4 arguments, 1 provided
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:47:7: note: candidate: 'constexpr bfs::SbusRx::SbusRx(const bfs::SbusRx&)'
   47 | class SbusRx {
      |       ^~~~~~
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:47:7: note:   no known conversion for argument 1 from 'HardwareSerial*' to 'const bfs::SbusRx&'
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:47:7: note: candidate: 'constexpr bfs::SbusRx::SbusRx(bfs::SbusRx&&)'
c:\Users\myUser\Documents\Arduino\libraries\Bolder_Flight_Systems_SBUS\src/sbus.h:47:7: note:   no known conversion for argument 1 from 'HardwareSerial*' to 'bfs::SbusRx&&'

exit status 1

Compilation error: no matching function for call to 'bfs::SbusRx::SbusRx(HardwareSerial*)'

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

Successfully merging this pull request may close these issues.

1 participant