mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 03:13:44 +08:00
fix(commander): Allow arming via RC in autonomous modes
There's a check to disallow arming in modes that are not suite for takeoff. The allowed autonmous ones are: Mission - desired Loiter - does not make sense but needs to be kept for **** MAVLink MAVSDK workflow of first arming then switching mode Offboard - acceptable advanced case even for RC Takeoff - desired VTOL Takeoff - desired
This commit is contained in:
@@ -654,16 +654,6 @@ transition_result_t Commander::arm(arm_disarm_reason_t calling_reason, bool run_
|
||||
return TRANSITION_DENIED;
|
||||
}
|
||||
}
|
||||
|
||||
} else if (calling_reason == arm_disarm_reason_t::stick_gesture
|
||||
|| calling_reason == arm_disarm_reason_t::rc_switch
|
||||
|| calling_reason == arm_disarm_reason_t::rc_button) {
|
||||
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Arming denied: switch to manual mode first\t");
|
||||
events::send(events::ID("commander_arm_denied_not_manual"), {events::Log::Critical, events::LogInternal::Info},
|
||||
"Arming denied: switch to manual mode first");
|
||||
tune_negative(true);
|
||||
return TRANSITION_DENIED;
|
||||
}
|
||||
|
||||
_health_and_arming_checks.update(false, true);
|
||||
|
||||
Reference in New Issue
Block a user