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

AP_Periph: clarify RNGFNDx_MIN/MAX parameters need to be set within the Periph device and the AP flight code #6008

Open
rmackay9 opened this issue May 21, 2024 · 1 comment

Comments

@rmackay9
Copy link
Contributor

Somewhere on the wiki (I'm not quite sure where) we specify how to setup the AP_Periph rangefinders and specify that the RNGFNDx_ORIENT should be "0" on the AP_Periph side. This is fine but we should also clarify that the RNGFNDx_MIN_CM and RNGFNDx_MAX_CM need to be set on both the AP_Periph side and within within the Autopilot flight code parameters.

The parameters should be consistent as well and while it's sad users need to set the MIN/MAX in both places, it is necessary because they're used for different things.

  • the AP_Periph side MIN/MAX parameters are used to set the state of the rangefinder (e.g. range too low, range too high, range OK). The AP_Flight code side consumes the state from the dronecan rangefinder message
  • the AP Flight code MIN/MAX parameters are used for various other purposes. One example is within the arming checks. If a user sets RTL_ALT_TYPE = 1 (Terrain) we check that RNGFNDx_MAX_CM (within the flight code parameters) is less than RTL_ALT.
@Hwurzburg
Copy link
Contributor

"Somewhere on the wiki (I'm not quite sure where) we specify how to setup the AP_Periph rangefinders " not that I can find...perhaps a note in the https://github.com/ArduPilot/ardupilot/blob/master/Tools/AP_Periph/README.md? for anything a bit strange like this rangefinder stuff?we dont have a lot of detail in the dev section other than params and general stuff....more info could be added but just a note on thos would be out of place and context without more extensive info on AP peripherals internal param setups for other devices also

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

No branches or pull requests

2 participants