-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
[pxh shell] param show results don't match the actual values of INT32 params set over MAVLink #19274
Comments
Try it with a float, it's probably the encoding of the integer. http://mavlink.io/en/messages/common.html#PARAM_SET You need to put the actual byte representation of the integer into the value field, like if it were a union. PX4-Autopilot/src/modules/mavlink/mavlink_parameters.cpp Lines 130 to 131 in 35af604
|
Thanks for the quick feedback @dagar.
Both
I believe the encoding is already handled by pymavlink's |
I'm saying try setting an actual float parameter with a float value to validate if the rest is otherwise working.
I don't know, we'd have to dig into pymavlink source (it's a completely separate project). Some mavlink specific details here, but things evolved differently over the years due to ambiguity. http://mavlink.io/en/services/parameter.html#px4 |
I see. I've confirmed that it works without any issue with the float parameters. As you said, it seems like the issue could be on the pymavlink side. I'll talk to them. Thanks! |
FYI @hamishwillee |
I still have the same issue. Some years later. Does anyone have any feedback on this? Setting parameters from pymavlink (int32) still doesn't work properly. For the record, I found a workaround making the conversion manually before calling the pymavlink interface. For example (unsing import struct), but well, I guess it would be nicer if the conversion was made by the pymavlink module :):
|
Describe the bug
Hi.
When I set the value of an INT32 parameter over MAVLink, and then request the param list (also over MAVLink), it shows the value I've set. However, on the pxh shell, weird values are shown when I do
param show SOME_PARAM
.To Reproduce
[Terminal 1]
make px4_sitl_rtps gazebo -j4
[Terminal 2] download and run the PoC:
Back on [Terminal 1] check parameters
Expected behavior
pxh shell should show the values properly, i.e., COM_OBL_RC_ACT: 5, COM_OBL_ACT: 2. Not sure whether this simply is an representation error on the shell, or those weird values are actually assigned to those parameters.
Log Files and Screenshots
Flight review - Download > Parameters also shows the incorrect values:
Drone (please complete the following information):
px4_sitl_rtps
a2645418
Thank you!
The text was updated successfully, but these errors were encountered: