AP_HAL_PX4: fix UAVCAN armed state to depend on safety switch

This commit is contained in:
Francisco Ferreira 2017-04-24 01:48:06 +01:00 committed by Francisco Ferreira
parent e7bd64b7d6
commit 7dca7933fa
1 changed files with 1 additions and 2 deletions

View File

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