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: always limit rangefinder update rate to given max rate #26994

Merged
merged 1 commit into from
May 8, 2024

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented May 6, 2024

This fixes a bug introduced in #26607. The last_rangefinder_update_ms was only set if when a reading was sent. That resulted in calling rangefinder update at the periph loop rate if the sensor is unhealthy or had no new reading. In my case I was testing a serial "request and response" rangefinder and this bug meant we just flooded the uart with requests.

Copy link
Contributor

@MattKear MattKear left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this. This is my bad. I had not thought of the consequence on the UART when I did this.

@tridge tridge merged commit bcf0733 into ArduPilot:master May 8, 2024
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants