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

prearm with linux #14705

Open
navioglider opened this issue Apr 19, 2020 · 5 comments
Open

prearm with linux #14705

navioglider opened this issue Apr 19, 2020 · 5 comments

Comments

@navioglider
Copy link

bug description
setting COM_PREARM_MODE="Always" does not seem to do anything when running linux (same behaviour as if "Disabled"). From this comment in the code it seems like you already know about the issue:
https://github.com/PX4/Firmware/blob/7c533e5a535e48b460dda1a4f148b830155f3e06/src/drivers/linux_pwm_out/linux_pwm_out.cpp#L360-L362
(although it has been like that for a looong time)
reactivating line 362 seems to me to make prearm work again and not break anything. did the bug get fixed at some point?

drone
raspberry pi 4b + navio2

@dagar
Copy link
Member

dagar commented Apr 19, 2020

@navioglider this isn't a direct answer to your question, but linux_pwm_out was never on par with the "normal" output modules (eg pwm_out) we use on common boards like the pixhawk. My plan for the navio2 was to implement the same low level PWM functions we use on NuttX, then use the regular pwm_out module and purge linux_pwm_out.

Here's an old branch I had started (https://github.com/dagar/PX4-Firmware/commits/pr-linux_pwm_out_cleanup). Look for boards/emlid/navio2/pwm/pwm_servo.cpp.

In terms of overall PX4 platform unification (Linux & NuttX) the output module and init scripts are the largest remaining items (for Navio2 at least). If we can migrate linux_pwm_out -> pwm_out, and the init system to what's in ROMFS/ we'll be in a much better position to maintain Linux board support going forward.

FYI @SalimTerryLi

@dagar
Copy link
Member

dagar commented Apr 19, 2020

@SalimTerryLi
Copy link
Contributor

That is. Thanks for mentioning that. The first thing that come to my mind is whether can I deploy PCA9685 in this way or not. I will try to figure out that. But I cannot provide any useful info that would benefit this issue, as I have no Navio2 HAT to do any test.

Onboard PWM channels should be managed in this way, for sure.

@dagar
Copy link
Member

dagar commented Apr 19, 2020

Related: #14707

@stale
Copy link

stale bot commented Jul 18, 2020

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

@stale stale bot added the stale label Jul 18, 2020
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