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

IO and FMU PWM had different states of prearming during initial ramp up #15364

Open
MaEtUgR opened this issue Jul 17, 2020 · 2 comments
Open
Assignees

Comments

@MaEtUgR
Copy link
Member

MaEtUgR commented Jul 17, 2020

Describe the bug
When I mixed the exact same outputs to IO and FMU on a Pixhawk 4 and looked at the logged outputs they differed during the PWM ramp after arming. The IO skipped the PWM ramp and directly went to idle because it was prearmed during the ramp since prearm overrides any ramp: https://github.com/PX4/Firmware/blob/master/src/lib/output_limit/output_limit.cpp#L119-L121 The FMU did everything correctly as expected and was not prearmed during the ramp.

FMU prearm flag condition:
https://github.com/PX4/Firmware/blob/master/src/lib/mixer_module/mixer_module.hpp#L186-L189
IO prearm flag condition:
https://github.com/PX4/Firmware/blob/master/src/modules/px4iofirmware/mixer.cpp#L213-L220
They are not exactly the same and I didn't understand what exactly the difference.

I would have fixed it already if I'd understand the conditions and where the data originates for the IO.

JFYI @cmic0

@taileron
Copy link
Contributor

Possibly also the cause for #15155 in the tiltrotor with activated IO switches mot 3 off as it should be in FW. In Acro mode it also switches off but there is another bug that mistakenly mixes MC pitch in FW to mot 1 and 2.

Without IO, FMU behaves completely wrong and just lets Mot 3 continue to run in all flight modes (that also happens with only FMU FCs e.g. PixRacer).

@stale
Copy link

stale bot commented Dec 25, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

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

No branches or pull requests

3 participants