-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
px4fmu split safety button into new module #10119
Conversation
b3b7fbb
to
dfbe0cc
Compare
dfbe0cc
to
0babf5a
Compare
@bkueng Could you help to get this in? Thanks! |
0babf5a
to
66b357a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This good as an extract of the code from the FMU. Consider possibly Fix tabbing
Long term there should be board_read_saftey_switch() state or a macro that returns logic true when down.
As it is and since there is a led blinker the poling it fine but longterm
The switch code could be like TAP power button and use interrupts. Then the HP work can then just blink the lights by schedule the changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good, but there are several details that should to be improved.
66b357a
to
c61f927
Compare
147f357
to
cfd20b9
Compare
1668315
to
a8375c8
Compare
@dagar I'm fighting for all your PRs 😄. |
ef973ce
to
f2fa6d2
Compare
3d7a98c
to
bf8b5dc
Compare
bf8b5dc
to
8df584d
Compare
What is required to bring this in in terms of review / testing? |
Verified fmu-v4 behavior (with and without CBRK_IO_SAFETY set) matches master. I'll check fmu-v5 with and without an IO next. |
Tested pixhawk 4 and 4 mini. This mostly preserves the behavior in master, but gets the logic out of the pwm output module (px4fmu). The difference is that we still get safety button functionality independent of fmu running or mixers loaded. @davids5 and I briefly discussed handling the button with gpio_setevent, but we can pursue that later. |
TODO:
- completely replace these IOCTLs with in_esc_calibration_mode