Skip to content

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

Merged
merged 1 commit into from
May 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ArduSub/AP_Arming_Sub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"must have disarm method"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could make this shorter, something like, "set RCx_OPTION = yy (Disarm)"

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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;
}

Expand Down
Loading