-
Notifications
You must be signed in to change notification settings - Fork 678
Open
Description
As far as I understand, Message::set_string
is a tool to fill string fields in messages. I tried using it to fill vendor_name
and model_name
in CAMERA_INFORMATION
, and it looks like it's supposed to be done like this:
mavlink::common::msg::CAMERA_INFORMATION resp_msg{};
mavlink::set_string(resp_msg.vendor_name, std::string("Vendor Name"));
mavlink::set_string(resp_msg.model_name, std::string("Model Name"));
However, it does not work, because vendor_name
and model_name
in CAMERA_INFORMATION
are both of type std::array<unsigned char, 32>&
, while set_string
needs its first argument to be std::array<char, _N> &a
(i.e. unsigned char
vs. char
).
Shouldn't set_string
accept std::array<unsigned char, _N>
as well?
Metadata
Metadata
Assignees
Labels
No labels