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

changes to support lua DroneCAN messaging #74

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tridge
Copy link
Member

@tridge tridge commented Feb 17, 2025

This makes 3 changes to support handling DroneCAN messages in lua scripting in ArduPilot

  • allow more than one HandlerList object per message type
  • fixed an issue with destructor ordering by using an unlink() method
  • added a get_semaphore() static method

this allows for the creation of new HandlerList handlers at runtime
we need to remove the child classes (Subscriber and Client) from the
HandlerList linked list before we remove them from their own static
linked list, otherwise we temporarily have an object where the
handle_message function points at a pure virtual, which if we call it
will result in a crash
allows for correct mutex ordering in lua scripting
and allow child class access to the HandlerList mutex
@tridge tridge force-pushed the pr-canard-list-sem branch from 414753b to 1715920 Compare February 17, 2025 05:13
@tpwrules
Copy link

tpwrules commented Feb 17, 2025

Can we move the ordering and semaphore fixes out to their own PR? They grew a little more complicated than initially imagined. I'm also not sure if they're responsible for CI failing. They are also more worth backporting in ardupilot.

@tpwrules
Copy link

I found some other issues with the constructor ordering, fixed them, and broke it out into #76 .

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