-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Sub:add aux func disarm/estop to pre-arm check for disarm function #29979
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,6 +38,13 @@ bool AP_Arming_Sub::has_disarm_function() const { | |
} | ||
} | ||
} | ||
// check if an AUX function that disarms or estops is setup | ||
if (rc().find_channel_for_option(RC_Channel::AUX_FUNC::MOTOR_ESTOP) || | ||
rc().find_channel_for_option(RC_Channel::AUX_FUNC::DISARM) || | ||
rc().find_channel_for_option(RC_Channel::AUX_FUNC::ARMDISARM) || | ||
rc().find_channel_for_option(RC_Channel::AUX_FUNC::ARM_EMERGENCY_STOP)) { | ||
return true; | ||
} | ||
return false; | ||
} | ||
|
||
|
@@ -48,7 +55,7 @@ bool AP_Arming_Sub::pre_arm_checks(bool display_failure) | |
} | ||
// don't allow arming unless there is a disarm button configured | ||
if (!has_disarm_function()) { | ||
check_failed(display_failure, "Must assign a disarm or arm_toggle button"); | ||
check_failed(display_failure, "Must assign a disarm or arm_toggle button or disarm aux function"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we could make this shorter, something like, "set RCx_OPTION = yy (Disarm)" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. that is not the correct message.....it could be "Needs a disarm switch or button setup"...I will make another PR if you are really fussed... |
||
return false; | ||
} | ||
|
||
|
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.
"must have disarm method"?