Skip to content

AP_Arming: arm_check: always check for estop - #32705

Merged
peterbarker merged 1 commit into
ArduPilot:masterfrom
IamPete1:estop-arm-check
Apr 14, 2026
Merged

AP_Arming: arm_check: always check for estop#32705
peterbarker merged 1 commit into
ArduPilot:masterfrom
IamPete1:estop-arm-check

Conversation

@IamPete1

@IamPete1 IamPete1 commented Apr 7, 2026

Copy link
Copy Markdown
Member

If someone setups the arm - emergency stop aux function and you arm another way its very easy to get confused as to why the motors don't work.

In the pre-arm checks we don't check for estop if the arm-estop function is assigned because it would always fail.

// vehicle is emergency-stopped; if this *appears* to have been done via switch then we do not fail prearms:
const RC_Channel *chan = rc().find_channel_for_option(RC_Channel::AUX_FUNC::ARM_EMERGENCY_STOP);
if (chan != nullptr) {
// an RC channel is configured for arm_emergency_stop option, so estop maybe activated via this switch
if (chan->get_aux_switch_pos() == RC_Channel::AuxSwitchPos::LOW) {
// switch is configured and is in estop position, so likely the reason we are estopped, so no prearm failure
return true; // no prearm failure
}
}

In the arm check itself that aux function will no longer be in the e-stop position if it has been used to trigger the arming attempt. If your trying to arm some other way you will see the message.

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Tested in SITL that the arm - emergency stop aux function still works as expected but now we get the arm check if arming using another method.

@peterbarker peterbarker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@peterbarker
peterbarker merged commit 1a0e24a into ArduPilot:master Apr 14, 2026
111 of 113 checks passed
@IamPete1

Copy link
Copy Markdown
Member Author

On the call we realized a nastier problem which this also fixes. If you have arm / estop setup and arm another way you end up with the vehicle armed but with estop on. If you then remember your estop switch and flick it the vehicle comes to life suddenly at whatever throttle position you happened to be at.

@Georacer Georacer moved this from Pending to 4.7.0-beta4 in 4.7 Backports Apr 28, 2026
@Georacer Georacer mentioned this pull request Apr 30, 2026
9 tasks
@Georacer

Copy link
Copy Markdown
Contributor

This has been included in 4.7.0-beta4. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 4.7.0-beta4

Development

Successfully merging this pull request may close these issues.

6 participants