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:
Silvan Fuhrer 2020-01-17 19:45:03 +01:00 committed by Lorenz Meier
parent 1237402fa4
commit f4df3fb5f2

View File

@ -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
// check last, and only if everything else has passed
if (arm_requirements.arm_authorization && prearm_ok) {