-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Embed camera definition files for Yuneec camera #479
Conversation
Note that this does not work for the iOS build yet because |
2d5b54e
to
b68bd95
Compare
This is a way to cache the camera defintion files inside the library.
It turned out rather tedious to do the embedding ourselves. Therefore, we resort to using a helper repo for this. I found this here: https://stackoverflow.com/questions/4864866#answer-19180226
The Windows build failed with: CUSTOMBUILD : error : Resource file "/C:/dronecode_sdk/plugins/camera/camera_definition_files/e90.xml" cannot be open. I gave up at that point.
In order to build for e.g. iOS we need to re-use the cpp_rsc binary which is built for the build host by the `default` build.
b68bd95
to
595b901
Compare
So Yuneec MAVLink camera doesn't supply the camera definition file URL - as per the MAVLink Camera API spec? |
No, they do supply it but the problem is that the file is not accessible currently through the MFi transport layer (mavlink is transmitted but no http yet), so this is an interim workaround. |
This should use the default binary for cross-compilation.
00406c3
to
30f99aa
Compare
add_subdirectory(third_party/cpp_rsc/src) | ||
else() | ||
# For cross-compilation, re-use the binary from default. | ||
set_property(GLOBAL PROPERTY CPPRSC_CMD ${CMAKE_CURRENT_BINARY_DIR}/../default/third_party/cpp_rsc/src/cpp_rsc) |
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 don't get where that is used :/
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.
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 see. And add_resource
and link_resource_file
come from cpp_rsc as well.
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 find it a bit scary, but if we need it 😁...
add_subdirectory(third_party/cpp_rsc/src) | ||
else() | ||
# For cross-compilation, re-use the binary from default. | ||
set_property(GLOBAL PROPERTY CPPRSC_CMD ${CMAKE_CURRENT_BINARY_DIR}/../default/third_party/cpp_rsc/src/cpp_rsc) |
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 see. And add_resource
and link_resource_file
come from cpp_rsc as well.
Embed camera definition files for Yuneec camera
This is an interim workaround where the camera definition xml files are embedded in the library.
The tool to embed the xml files is cpp_rsc.