-
Notifications
You must be signed in to change notification settings - Fork 803
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
camera_manager_plugin: fix mavlink messages for camera info and video stream information #1051
Conversation
… stream information This time with structs instead of the direct pack_chan() calls that might break again quickly.
video_stream_information.hfov = 90; // made up | ||
std::strcpy(video_stream_information.name, "Visual Spectrum"); | ||
std::strcpy(video_stream_information.uri, _videoURI.c_str()); | ||
|
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.
Note, there is a new encoding field, which ideally you should set to VIDEO_STREAM_ENCODING_H264. If you don't it won't matter because the default value 0 means "don't know" and the recipient should detect. This is to reduce effort on recipient as cameras start to encode in H265.
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.
You're probably right, didn't even check what should be set in the extension 😇
I added it in 357396f
This will probably make CI fail again because the extension does not yet exist on PX4 main until PX4/PX4-Autopilot#23490 is merged...
FYI @julianoes This is touching the new camera ids. |
FYI: you can always just set extensions to 0 if you don't want to do the work to use them yet. |
…ncpy with destination size, set H264 encoding
I don't understand if and why it's necessary but found a way to do it with the struct encode method.
Problem
Can't update MAVLink in PX4 anymore because of
mavlink/mavlink#2121
mavlink/mavlink#2127
which are not breaking changes but because of the way they are invoked here end up breaking the build
which makes CI in PX4/PX4-Autopilot#23490 fail.
Solution
Like proposed by @dagar this time I fix it with the struct call instead of the direct pack_chan() calls. So it should hold longer.
Please check if I did any mistake with these string, component ID and MAVLink channel things. What was
MAVLINK_COMM_1
used for?