Skip to content
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

commander: add force arm CLI option (commander arm -f) #12715

Merged
merged 4 commits into from
Aug 19, 2019

Conversation

bkueng
Copy link
Member

@bkueng bkueng commented Aug 16, 2019

This allows to bypass preflight and prearm checks on the shell via commander arm -f.

During development there are regular cases where I just want to arm the
board/vehicle no matter what, and the preflight checks are guaranteed to
fail (e.g. sensors uncalibrated, inconsistent, powered via USB, etc.).
Allowing an easy and quick way to arm (assuming you know what you are
doing) helps to speed up development considerably and is less frustrating.

See individual commit messages for further details.

…reArmChecks

Reason: if you don't want preflight checks, you don't want prearm checks
either (these are the circuit breakers, like usb connected check).

The other changes are cleanup and rework of operations.

In most cases, arming_state_transition is called with fRunPreArmChecks set
to true, so no change in behavior.

The cases with fRunPreArmChecks=false are:
- unit tests
- in_arming_grace_period=true (quick arming after disarm)
- VEHICLE_CMD_PREFLIGHT_CALIBRATION (does not transition to armed)
@julianoes julianoes self-requested a review August 16, 2019 08:49
bkueng added 2 commits August 16, 2019 11:26
This allows to bypass preflight and prearm checks.
During development there are regular cases where I just want to arm the
board/vehicle no matter what, and the preflight checks are guaranteed to
fail (e.g. sensors uncalibrated, inconsistent, powered via USB, etc.).
Allowing an easy and quick way to arm (assuming you know what you are
doing) helps to speed up development considerably and is less frustrating.
- the last check expects pre_arm to run so we need to enable the
  preflight checks. This is closer to the real system.
- as a result we need to enable HIL for other tests so that the sensors
  are not checked.
@bkueng bkueng force-pushed the commander_force_arm branch from 733c9e8 to 4f30103 Compare August 16, 2019 09:27
@jlecoeur
Copy link
Contributor

@bkueng good idea.

How about the same option on the mavlink interface?
In https://mavlink.io/en/messages/common.html#MAV_CMD_COMPONENT_ARM_DISARM that would look like:
param 3: enforce preflight checks.
0: only arm if preflight checks pass
26247: enforce arming even if preflight checks do not pass

@bkueng bkueng force-pushed the commander_force_arm branch from 802ba74 to 663adbd Compare August 19, 2019 07:50
@bkueng
Copy link
Member Author

bkueng commented Aug 19, 2019

How about the same option on the mavlink interface?

Yes we can do that, but I think the bigger question is around the UI: regular users should not do this, and probably not even see the option to allow them to force-arm.

@bkueng bkueng merged commit a7eed52 into master Aug 19, 2019
@bkueng bkueng deleted the commander_force_arm branch August 19, 2019 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants