Skip to content

Conversation

magicrub
Copy link
Contributor

AP_Periph: fix notify vehicle_state bit-length bug

The CAN notify message value is a uint64 value which the main vehicle_state variable is so thats correct but the accessors for it is uint32. Whoops! While I was tripped up on that I also thought the last_vehicle_state was a backup to check for change but it was a ms timer and so the uint32 was correct so I renamed it to last_vehicle_state_ms for clarity.

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

This LGTM as far as it goes.

But isn't this a problem?

libraries/AP_Scripting/generator/description/bindings.desc:767:singleton AP_Periph_FW method get_vehicle_state uint32_t

@magicrub
Copy link
Contributor Author

This LGTM as far as it goes.

But isn't this a problem?

libraries/AP_Scripting/generator/description/bindings.desc:767:singleton AP_Periph_FW method get_vehicle_state uint32_t

Whoops, not sure how I missed that one. Fixed!

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

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

LGTM

@peterbarker peterbarker merged commit 08b209d into ArduPilot:master Sep 29, 2025
107 checks passed
@magicrub magicrub deleted the pr/periph_vehicle_state_units branch September 29, 2025 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants