Browse Source

AP_HAL_PX4: fix UAVCAN armed state to depend on safety switch

master
Francisco Ferreira 8 years ago committed by Francisco Ferreira
parent
commit
7dca7933fa
  1. 3
      libraries/AP_HAL_PX4/RCOutput.cpp

3
libraries/AP_HAL_PX4/RCOutput.cpp

@ -499,8 +499,7 @@ void PX4RCOutput::_send_outputs(void)
ap_uc->rco_write(_period[i], i); ap_uc->rco_write(_period[i], i);
} }
bool armed = hal.util->get_soft_armed(); if (hal.util->safety_switch_state() != AP_HAL::Util::SAFETY_DISARMED) {
if (armed) {
ap_uc->rco_arm_actuators(true); ap_uc->rco_arm_actuators(true);
} else { } else {
ap_uc->rco_arm_actuators(false); ap_uc->rco_arm_actuators(false);

Loading…
Cancel
Save