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_DroneCAN: properly convert timeout to deadline for aux frames #28308

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Oct 4, 2024

The timeout specified for auxiliary driver frames was passed to the driver where a deadline was expected. The transmission was then started after its "deadline", thereby causing it to be canceled and the data lost if the frame could not be sent immediately.

Fix by converting the timeout to a deadline before passing to the driver. The conversion is done in the Canard interface code as it already does other conversions from timeouts to deadlines.

Tested that my setup used to get timeouts registered in @SYS/can0_stats.txt and doesn't anymore.

The timeout specified for auxiliary driver frames was passed to the
driver where a deadline was expected. The transmission was then started
after its "deadline", thereby causing it to be canceled and the data
lost if the frame could not be sent immediately.

Fix by converting the timeout to a deadline before passing to the
driver. The conversion is done in the Canard interface code as it
already does other conversions from timeouts to deadlines.
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.

1 participant