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

'Scheduler' is already declared in this scope when building for board = adafruit_feather_nrf52840 #4

Open
aovestdipaperino opened this issue May 19, 2022 · 2 comments

Comments

@aovestdipaperino
Copy link

When I build for adafruit_feather_nrf52840 there is a conflict with the declaration SchedulerRTOS Scheduler in rtos.h.
I tried to wrap CopyThreads classes in their own namespace without being able to override the default.
If this issue is interesting, I can help with a solution.

@jensh
Copy link
Owner

jensh commented May 19, 2022

Thanks for trying CopyThread on nrf52840!
I would not use two different Schedulers at the same time (SchedulerRTOS and CthClass). As far as i know, Arduino expect at most one Singelton instance of Scheduler and the instantiation is outside of CopyThread. You might want to try only the C part of CopyThread without the Arduino adapter in Cth.h.

@aovestdipaperino
Copy link
Author

Thanks for your answer.
For whatever reason when compiling for ESP32 the error doesn't show up, probably due to a different #include order.
I will play with the C version, thanks!

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

2 participants