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_RPM: Demystifying RPM sensors #27306

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

MattKear
Copy link
Contributor

Lots of users struggle with setting up interrupt-based RPM sensors. (see here for a number of users asking for help: https://discuss.ardupilot.org/t/rpm-sensor-wiki-knowledge-share/45091/83).

In an attempt to demystify RPM sensors, this PR improves the logging:

  • Move to instance based logging.
  • Always log the rpm reading regardless of quality.
  • Log the calculated quality value.
  • Log the bool so that we can clearly see when AP reports the sensor as healthy.

It is my hope that adding this information will help users to figure out what is going wrong.

Example from Testing:

Tested IRL on Heli.
Thankfully I had a dodgy RPM sensor for testing 😬
So now, by always logging raw RPM I can see that something is not right in the measurement and I can see that the corresponding quality is measure is on the floor.
image

Here is an example of the 2nd instance working as well:
image

Copy link
Member

@IamPete1 IamPete1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, we have needed this for ages.

libraries/AP_RPM/AP_RPM.cpp Outdated Show resolved Hide resolved
libraries/AP_RPM/AP_RPM.cpp Outdated Show resolved Hide resolved
libraries/AP_RPM/AP_RPM.cpp Outdated Show resolved Hide resolved
@MattKear MattKear force-pushed the pr_rpm_logging branch 2 times, most recently from 6594c10 to 9590e55 Compare July 2, 2024 19:12
@MattKear
Copy link
Contributor Author

MattKear commented Jul 2, 2024

This has now been flight tested on heli:
More dodgy RPM sensors 😆
image
image

@peterbarker peterbarker merged commit 2025712 into ArduPilot:master Jul 10, 2024
92 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants