mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 11:59:17 +08:00
Commander: Allow arming in MANUAL, STAB, ACRO, ALTCTL
This commit is contained in:
@@ -2284,9 +2284,11 @@ int commander_thread_main(int argc, char *argv[])
|
|||||||
* the system can be armed in auto if armed via the GCS.
|
* the system can be armed in auto if armed via the GCS.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ((status.main_state != vehicle_status_s::MAIN_STATE_MANUAL) &&
|
if ((status.main_state != vehicle_status_s::MAIN_STATE_MANUAL)
|
||||||
(status.main_state != vehicle_status_s::MAIN_STATE_STAB)) {
|
&& (status.main_state != vehicle_status_s::MAIN_STATE_ACRO)
|
||||||
print_reject_arm("NOT ARMING: Switch to MANUAL mode first.");
|
&& (status.main_state != vehicle_status_s::MAIN_STATE_STAB)
|
||||||
|
&& (status.main_state != vehicle_status_s::MAIN_STATE_ALTCTL)) {
|
||||||
|
print_reject_arm("NOT ARMING: Switch to a manual mode first.");
|
||||||
|
|
||||||
} else if (!status.condition_home_position_valid &&
|
} else if (!status.condition_home_position_valid &&
|
||||||
geofence_action == geofence_result_s::GF_ACTION_RTL) {
|
geofence_action == geofence_result_s::GF_ACTION_RTL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user