-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
GCC 4.7 Template Use Fix #748
Conversation
* | ||
*/ | ||
|
||
#include "UOrbPublication.hpp" | ||
#include "Subscription.hpp" | ||
#include "topics/parameter_update.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
help me: why are (only) these topics listed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only instantiated the templates currently using the C++ wrappers in the code base. We can add to this list as more are required. It would also be possible to make ORB_DEFINE do this automatically, but this could lead to instantiated templates that we never use (if strip fails to remove them). If you use a new template that isn't listed you will get a link error that should make it obvious you need to add the template instantiation to the uORB library. We could also typedef the currently available instantiated templates as Subscription_parameter_update etc if this would be helpful.
This last commit brings the code up to where it can support my roboclaw segway work. It adds the encoder message. I also tried enabling fixedwing_backside and building it, which now works. Enabling the fixedwing backside build also required instantiating several commonly used templates for control work. So the template instantiation list thomas mentioned should now be more complete/useful out of the box for users. |
I just added a subscription to an app using this interface (outside of the apps of @jgoppert) and it successfully compiled. As mentioned in the description of this PR this was not possible before. |
This looks good to me @thomasgubler If you have run it, I propose to merge. |
@jgoppert is this tested from your side beyond the compilation? |
I can verify that for my segway controller that it is successfully arming/ changing modes etc using the uORB::Pub/Sub. I am still working on updating my segway motor controller driver for the v2 so I haven't gotten that running yet. It would also be possible to enable fixedwing backside and verify in HIL, but I haven't done that yet. |
This was now tested live on my segway, so it should be good to merge. |
This fixes our use of templates for BlockParam/ UOrbSub/UOrbPub.
Before the templates were linking only in one module and being thrown away in the rest. This made it impossible to use templates unless they were only used once, such as the current att_pos_ekf_estimator. Also this fixed the explicit typing of BlockParamInt/ BlockParamFloat (which was being used in multiple modules).
also: