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

servo_cluster.cpp compile error? #362

Closed
knightinlet opened this issue May 17, 2022 · 4 comments
Closed

servo_cluster.cpp compile error? #362

knightinlet opened this issue May 17, 2022 · 4 comments
Assignees

Comments

@knightinlet
Copy link

knightinlet commented May 17, 2022

After syncing to the latest versions of the source code the build fails with errors in drivers/servo/servo_cluster.cpp complaining error: 'is_assigned' was not declared in this scope in multiple locations within the source code?

The function "is_assigned" seems to have disappeared since the "Big refactor of clusters to reduce memory and improve usability" commit. Am I missing something?

@Gadgetoid
Copy link
Member

I thought is_assigned was some kind of stdlib function. I'm glad I am not the only one running into this issue. I have been unable to find where it's supposed to be defined and what it does, though, but you can see from our CI that... it compile... sometimes... somehow?

I've resorted to:

#ifndef is_assigned
#define is_assigned(x) {true;}
#endif

I don't understand what effect is_assigned could ever have on a uint8_t anyway...

@ZodiusInfuser
Copy link
Member

Oh, this will be sub-par testing on my part! I've primarily been testing Release builds, which would compile out any assert lines. I suspect this is why the CI is fine with it too.

The actual check should be assert(servo < pwms.get_chan_count());, which I did in some functions it seems.

Will get a fix raised tomorrow.

@ZodiusInfuser
Copy link
Member

@knightinlet For now, try building in Release to get rid of those checks (and thus the associated errors)

@knightinlet
Copy link
Author

@Gadgetoid @ZodiusInfuser Thanks for the quick responses. Great work. Builds cleanly now :)

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