mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 03:53:33 +08:00
pre arm check: VTOL: do not allow arming if not in multicopter mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
committed by
Lorenz Meier
parent
1237402fa4
commit
f4df3fb5f2
@@ -134,6 +134,13 @@ bool PreFlightCheck::preArmCheck(orb_advert_t *mavlink_log_pub, const vehicle_st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status.is_vtol && status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
||||||
|
if (prearm_ok) {
|
||||||
|
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is not in multicopter mode");
|
||||||
|
prearm_ok = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Arm Requirements: authorization
|
// Arm Requirements: authorization
|
||||||
// check last, and only if everything else has passed
|
// check last, and only if everything else has passed
|
||||||
if (arm_requirements.arm_authorization && prearm_ok) {
|
if (arm_requirements.arm_authorization && prearm_ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user