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

drivers/pwm_out: limit scheduling to primary actuator controls groups if used #15381

Merged
merged 2 commits into from
Jul 23, 2020

Conversation

dagar
Copy link
Member

@dagar dagar commented Jul 20, 2020

When a passthrough or gimbal mixer is loaded in addition to the primary mixer the output module will be schedule to run on both controller updates (new actuator_controls_0 publications) as well as new RC data (actuator_controls_3). This can be problematic for things like OneShot ESCs that don't seem to like very tight back to back updates.

This limits scheduling of the output module (pwm_out) to primarily run on updates to the primary actuator control groups (0 & 1) if in use. Additionally there's a backup should groups 0 & 1 stop publishing for some reason.

…ntrol callbacks

 - optionally only register callbacks for primary control groups (if used)
@dagar dagar added the bug label Jul 20, 2020
@dagar dagar requested a review from bkueng July 20, 2020 15:24
@dagar
Copy link
Member Author

dagar commented Jul 20, 2020

@bkueng do you see the need for anything in dshot?

In the future once the px4io is lobotomized we can look at doing this a bit more intelligently with tighter mixer integration.

@dagar dagar linked an issue Jul 20, 2020 that may be closed by this pull request
@dagar
Copy link
Member Author

dagar commented Jul 20, 2020

Later I'd also like to make mixer configuration more accessible from parameters and stop doing things like loading these AUX mixers by default.

 - add backup schedule at minimum PWM rate
 - fixes #15043
Copy link
Member

@bkueng bkueng left a comment

Choose a reason for hiding this comment

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

We could apply that in general.

@dagar dagar merged commit aa7735c into master Jul 23, 2020
@dagar dagar deleted the pr-pwm_out_scheduling branch July 23, 2020 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OneShot broken on master
2 participants