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_CANManager: use 32 bit timeout #28399

Merged
merged 3 commits into from
Nov 16, 2024

Conversation

tpwrules
Copy link
Contributor

Saves a handful of bytes. 71 minutes ought to be enough for anybody!

@tpwrules
Copy link
Contributor Author

Tested that DroneCAN peripherals and scripting CAN sensors still work properly on CubeOrange.

@tpwrules
Copy link
Contributor Author

A note about safety: this doesn't change any of the arithmetic, just changes the types so that specifying a timeout of longer than 71 minutes is not possible. Nowhere that I could find calculates timeouts, they are always hardcoded, so this is safe.

I did update a variable name to make clear that it's actually a 64 bit deadline instead of a timeout, but not the arithmetic.

Saves a few bytes. 71 minutes ought to be enough for anybody!
Saves a handful of bytes. 71 minutes ought to be enough for anybody!
Saves a handful of bytes. 71 minutes ought to be enough for anybody!
@tridge tridge merged commit 7ca558f into ArduPilot:master Nov 16, 2024
99 checks passed
@tpwrules tpwrules deleted the pr/can-32bit-timeout branch November 17, 2024 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

5 participants