Skip to content
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

pymavlink: read/set params improvements #217

Open
ES-Alexander opened this issue Sep 7, 2021 · 1 comment
Open

pymavlink: read/set params improvements #217

ES-Alexander opened this issue Sep 7, 2021 · 1 comment

Comments

@ES-Alexander
Copy link
Contributor

Existing docs could be updated to make use of master.param_fetch_*, and master.param_set_send or pymavlink.mavparm.MAVParmDict.mavset.

Would also be good to format the output values as floats, since not all parameters are integers (as brought up here). Likely worth changing to .format syntax (or f-strings, but since they require Python >= 3.6 they aren't compatible with the current companion, so would only work on the surface computer or a companion with a more recent Python version)

@ES-Alexander
Copy link
Contributor Author

ES-Alexander commented Nov 2, 2021

Current example has a few other issues that should be fixed:

  • is incorrect about persistence of param_set_send - says it's temporary but it's not
  • needlessly requests param after setting, despite having already received a PARAM_VALUE response
  • mentions but doesn't show how to handle if no PARAM_VALUE response is returned within a timeout period
  • This approach may be a reasonable reference, although it's written for Python >= 3.8
  • should also cover how to make use of param_type (mavutil.mavlink.enums['MAV_PARAM_TYPE'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant