Browse Source

commander: add missing manual modes

We prevent arming when in a "manual" mode with throttle high. However,
POSCTL and ALTCTL were missing.
sbg
Julian Oes 5 years ago
parent
commit
283a57054a
  1. 4
      src/modules/commander/Commander.cpp

4
src/modules/commander/Commander.cpp

@ -839,7 +839,9 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_
// Refuse to arm if in manual with non-zero throttle // Refuse to arm if in manual with non-zero throttle
if (cmd_arms if (cmd_arms
&& (status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_MANUAL && (status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_POSCTL
|| status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_ALTCTL
|| status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_MANUAL
|| status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_ACRO || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_ACRO
|| status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_STAB || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_STAB
|| status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_RATTITUDE) || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_RATTITUDE)

Loading…
Cancel
Save