mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Only update the servo output values when we are armed.
This commit is contained in:
parent
4ea8a64b39
commit
4ab490bd50
@ -220,12 +220,6 @@ mixer_tick(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Update the servo outputs.
|
||||
*/
|
||||
for (unsigned i = 0; i < IO_SERVO_COUNT; i++)
|
||||
up_pwm_servo_set(i, r_page_servos[i]);
|
||||
|
||||
/*
|
||||
* Decide whether the servos should be armed right now.
|
||||
*
|
||||
@ -243,6 +237,12 @@ mixer_tick(void)
|
||||
up_pwm_servo_arm(true);
|
||||
mixer_servos_armed = true;
|
||||
|
||||
/*
|
||||
* Update the servo outputs.
|
||||
*/
|
||||
for (unsigned i = 0; i < IO_SERVO_COUNT; i++)
|
||||
up_pwm_servo_set(i, r_page_servos[i]);
|
||||
|
||||
} else if (!should_arm && mixer_servos_armed) {
|
||||
/* armed but need to disarm */
|
||||
up_pwm_servo_arm(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user