mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
prearmCheck: vtol cleanup
Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
@@ -127,20 +127,23 @@ bool PreFlightCheck::preArmCheck(orb_advert_t *mavlink_log_pub, const vehicle_st
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status.is_vtol && status.in_transition_mode) {
|
if (status.is_vtol) {
|
||||||
|
|
||||||
|
if (status.in_transition_mode) {
|
||||||
if (prearm_ok) {
|
if (prearm_ok) {
|
||||||
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is in transition state");
|
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is in transition state");
|
||||||
prearm_ok = false;
|
prearm_ok = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!status_flags.circuit_breaker_vtol_fw_arming_check && status.is_vtol
|
if (!status_flags.circuit_breaker_vtol_fw_arming_check
|
||||||
&& status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
&& status.vehicle_type != vehicle_status_s::VEHICLE_TYPE_ROTARY_WING) {
|
||||||
if (prearm_ok) {
|
if (prearm_ok) {
|
||||||
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is not in multicopter mode");
|
mavlink_log_critical(mavlink_log_pub, "Arming denied! Vehicle is not in multicopter mode");
|
||||||
prearm_ok = false;
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user