mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 06:23:33 +08:00
Ensured that the mixer output obeys the FMU and IO armed state
This commit is contained in:
@@ -231,8 +231,9 @@ mixer_tick(void)
|
|||||||
* XXX correct behaviour for failsafe may require an additional case
|
* XXX correct behaviour for failsafe may require an additional case
|
||||||
* here.
|
* here.
|
||||||
*/
|
*/
|
||||||
bool should_arm = ((r_status_flags & PX4IO_P_STATUS_FLAGS_ARMED) &&
|
bool should_arm = (/* FMU is armed */ (r_setup_arming & PX4IO_P_SETUP_ARMING_ARM_OK) &&
|
||||||
(r_status_flags & (PX4IO_P_STATUS_FLAGS_RAW_PWM | PX4IO_P_STATUS_FLAGS_MIXER_OK)));
|
/* IO is armed */ (r_status_flags & PX4IO_P_STATUS_FLAGS_ARMED) &&
|
||||||
|
/* there is valid input */ (r_status_flags & (PX4IO_P_STATUS_FLAGS_RAW_PWM | PX4IO_P_STATUS_FLAGS_MIXER_OK)));
|
||||||
|
|
||||||
if (should_arm && !mixer_servos_armed) {
|
if (should_arm && !mixer_servos_armed) {
|
||||||
/* need to arm, but not armed */
|
/* need to arm, but not armed */
|
||||||
|
|||||||
Reference in New Issue
Block a user