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

[1.14] Default motor PWM configuration #21800

Merged
merged 10 commits into from Jul 10, 2023
Merged

Conversation

MaEtUgR
Copy link
Member

@MaEtUgR MaEtUgR commented Jul 4, 2023

Solved Problem

Release port of #21513

Test coverage

  • The port to 1.14 is clean but I rely on testing of the original pr.

MaEtUgR added 10 commits July 4, 2023 17:15
This allows to consistently define:
Motor stopped - disarmed PWM
Motor idling - minimum PWM
Motor at full thrust - maximum PWM

Any allocation can then distinctly decide if
a motor should be running or not depending
on the context and also explicitly command that.
This allows PWM and all other output methods to configure
stopped, idling and full thrust points and use them consistently.
The fact that a fixed wing motor can be stopped when zero thrust
is demanded is explicit and could in principle even be disabled.
The mechanism is the same as for a standard VTOL stopping the
multicopter motors in the fixed wing flight phase.
@MaEtUgR MaEtUgR self-assigned this Jul 4, 2023
@MaEtUgR MaEtUgR changed the base branch from main to release/1.14 July 4, 2023 15:25
@MaEtUgR MaEtUgR changed the title Default motor PWM configuration [1.14] Default motor PWM configuration Jul 4, 2023
@MaEtUgR
Copy link
Member Author

MaEtUgR commented Jul 10, 2023

I merged the exact same pr on main (#21513) and hence I move on with this backport to 1.14 as well.

@MaEtUgR MaEtUgR merged commit 1806a7c into release/1.14 Jul 10, 2023
2 of 3 checks passed
@MaEtUgR MaEtUgR deleted the maetugr/multicopter-pwm-1.14 branch July 10, 2023 17:00
@slgrobotics
Copy link
Contributor

slgrobotics commented Jul 10, 2023

@MaEtUgR - I was having a problem with my pca9685 module connected to Raspberry Pi not producing 50Hz servo PWM.

The reason is that _targetFreq is initialized to -1.0f (src/drivers/pca9685_pwm_out/main.cpp:94) -and is never set to anything else.
For my purposes I just fixed it by initializing to 50.0f - and that works fine.

While I'd like this fix to be merged into main (I can submit a PR), I would rather first ask for your opinion.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants