ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_CANManager: use 32 bit timeout

Open tpwrules opened this issue 1 year ago • 2 comments

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

tpwrules avatar Oct 14 '24 03:10 tpwrules

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

tpwrules avatar Oct 14 '24 18:10 tpwrules

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.

tpwrules avatar Oct 15 '24 01:10 tpwrules