-
Notifications
You must be signed in to change notification settings - Fork 17.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
Add support for using Safety switch pins on IOMCU to control ProfiLEDs via bit banging #27732
Conversation
60c98c3
to
a350c11
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.
I think this is ok. bitbanging in the main iomcu loop makes me a bit nervous because we are so short on time. dshot on F100 would probably need some careful testing.
a350c11
to
0b57814
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.
we can't lose the BRD_SAFETY_DFLT feature, needed by many users
@@ -157,7 +157,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = { | |||
// @Param: SAFETY_DEFLT | |||
// @DisplayName: Sets default state of the safety switch | |||
// @Description: This controls the default state of the safety switch at startup. When set to 1 the safety switch will start in the safe state (flashing) at boot. When set to zero the safety switch will start in the unsafe state (solid) at startup. Note that if a safety switch is fitted the user can still control the safety state after startup using the switch. The safety state can also be controlled in software using a MAVLink message. | |||
// @Values: 0:Disabled,1:Enabled | |||
// @Values: 0:Disabled,1:Enabled,3:Use Safety pin to control ProfiLED |
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.
we still need BRD_SAFETY_DEFLT, most vehicles these days have safety state controlled via mavlink in software, not via a button
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.
Fixed by creating a separate parameter that enabled IO Profiled control. Also tested if Safety switch control continue to operate as before through mission planner.
6f1b301
to
a7e061f
Compare
@@ -370,6 +370,16 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = { | |||
// @User: Advanced | |||
AP_GROUPINFO("IO_DSHOT", 28, AP_BoardConfig, state.io_dshot, 0), | |||
#endif | |||
|
|||
#if HAL_WITH_IO_MCU | |||
// @Param: IO_PROFILED |
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.
BRD_OPTIONS makes more sense I think
72cf9b0
to
6e5d578
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.
we've discussed, and think this should be a iomcu_CubePilot build, and not make any fw change on other variants
also needs some dshot testing by @andyp1per
c521c2c
to
b0a0813
Compare
b564035
to
5e70111
Compare
for the ccache failure, I think we need to change it to be two other H7 boards we test, maybe Pixhawk6X and ZeroOneX6 ? |
hmm, the ccache test (see test_ccache.yml) uses Durandal-bdshot and Pixhawk6X, which should be unaffected by this PR, which implies this PR is changing something it shouldn't |
5e70111
to
5019686
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.
Pixhawk6X is also diverging from Durandal somehow, causing ccache to test fail. That needs to be explained as this shouldn't really affect either board.
Ping @bugobliterator - those plane trips have to be good for something? :-) |
1dc3e88
to
f84402f
Compare
f84402f
to
a7df8f2
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.
Testing seemed fine
|
i'd say that using the safety pin like this offends my sensibilities a bit, but holding my nose I will merge |
Before:
After