-
Notifications
You must be signed in to change notification settings - Fork 79
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
PARAM_VALUE_DATA #77
Comments
Hi @wucke13, |
@patrickelectric Thank you for the fast response, though that does not answer my question fully. E.g., if I want to write 13 aka 0xd to a variable which is uint, not float, what do I write to said |
Can you explain which parameter are you talking about ? Take in mind that you are right now talking about the mavlink specification and not the mavlink rust library, since the specification says that the parameter is a float 32 value. |
I don't really see the point in speaking about one parameter in particular, but here you go. ARMING_CHECK seems to be a bitmask. How is this represented in rust-mavlink? |
The information is encoded as a bitmask, but the true value of ARMING_CHECK is an int that is casted to float. |
Ok, thank you for the detailed explanation! Then only one question is left on my side: what meaning does |
it's only important for the GCS, the flight controller will probably ignore this field. |
Yes it does! Thank you! |
@patrickelectric
What I understand from reading it is, that the correct way per mavlink spec would be to cast (in the sense of CPP's Doing this is indeed incompatible with the mavlink spec (even though Ardupilot does it like that). The correct way would be similar of what in CPP is referred to as a The current mavlink-rs API does not reflect this. And AFAIK in safe Rust it is not even possible to directly store some arbitrary bytes in the memory region which makes up a What I do not understand so far is how values with more than 4 bytes are to be represented in MAVLink. |
How are the different types in MavParamType encoded in PARAM_VALUE_DATA?
Especially, how is a UINT64 put to the
PARAM_VALUE_DATA.param_value
field, which is only f32?The text was updated successfully, but these errors were encountered: