-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
DroneCAN: added FlexDebug support #28450
Conversation
7cc5dc6
to
49132f4
Compare
8119425
to
82e3b7a
Compare
const uint8_t bus = get_uint8_t(L, 1); | ||
const uint8_t node_id = get_uint8_t(L, 2); | ||
const uint16_t msg_id = get_uint16_t(L, 3); | ||
uint32_t tstamp_us = get_uint32(L, 4, 0, UINT32_MAX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uint32_t tstamp_us = get_uint32(L, 4, 0, UINT32_MAX); | |
uint32_t tstamp_us = coerce_to_uint32_t(L, 4); |
Don't need the range check.
allows lua to retrieve vendor specific data from CAN nodes
82e3b7a
to
3eaa07b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tested it with an AM32 ESC and it does what it says on the tin. We can keep the binding as it is now, with the understanding that we may change it in the future.
Happy the option bit has been added as a safety/abuse prevention.
Not thrilled with the lack of locking/atomics, but that is a general concern I have with ArduPilot and I think it's correct in an ideal world as it is. Flash cost is about 1K on CubeOrange which seems reasonable enough.
This allows lua scripts to receive FlexDebug DroneCAN messages, allowing for flexible arbitrary debug data from peripheral nodes
This was developed for debugging AM32 ESCs, but any vendor can reserve ranges of IDs