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_ESC_Telem: fix other timeout race #29028

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

robertlong13
Copy link
Collaborator

Prerequisite PR: #28999

The timeout for non-RPM telemetry is vulnerable to a similar race to the RPM one above. This PR makes the timeout logic consistent between the two, adding a validity flag to track the timeout instead of explicitly subtracting timestamps (one of which is volatile).

I broke this PR into a separate dependent PR in case this is considered too risky of a change. I have an alternative PR ready, mirroring how Pete is binding AP_Servo_Telem in the soon-to-be-merged #28857. That PR would be guaranteed not to change any behavior outside of Lua, however, I think this PR is vastly a better approach.

The timeout for non-RPM telemetry is vulnerable to a similar race as the
RPM. This change makes the timeout logic consistent between the two.
@robertlong13 robertlong13 force-pushed the pr/fix-esc-telem-race branch from c81cb69 to fd0c10c Compare February 4, 2025 00:01
@robertlong13 robertlong13 marked this pull request as ready for review February 4, 2025 00:01
@robertlong13 robertlong13 requested a review from IamPete1 February 4, 2025 00:01
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.

LGTM

@robertlong13
Copy link
Collaborator Author

Also, this PR was flight tested together with the already-merged #28999 with that 15-minute flight on Volanti.

@tridge tridge merged commit dd54f02 into ArduPilot:master Feb 5, 2025
100 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