forked from Archive/PX4-Autopilot
IO firmware: Ensure that in case of lockdown only the lockdown code writes servo outputs
This commit is contained in:
parent
738d3cb123
commit
168f955e0c
|
@ -235,7 +235,8 @@ mixer_tick(void)
|
|||
}
|
||||
|
||||
|
||||
} else if (source != MIX_NONE && (r_status_flags & PX4IO_P_STATUS_FLAGS_MIXER_OK)) {
|
||||
} else if (source != MIX_NONE && (r_status_flags & PX4IO_P_STATUS_FLAGS_MIXER_OK)
|
||||
&& !(r_setup_arming & PX4IO_P_SETUP_ARMING_LOCKDOWN)) {
|
||||
|
||||
float outputs[PX4IO_SERVO_COUNT];
|
||||
unsigned mixed;
|
||||
|
@ -286,7 +287,8 @@ mixer_tick(void)
|
|||
isr_debug(5, "> PWM disabled");
|
||||
}
|
||||
|
||||
if (mixer_servos_armed && (should_arm || should_arm_nothrottle)) {
|
||||
if (mixer_servos_armed && (should_arm || should_arm_nothrottle)
|
||||
&& !(r_setup_arming & PX4IO_P_SETUP_ARMING_LOCKDOWN)) {
|
||||
/* update the servo outputs. */
|
||||
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
||||
up_pwm_servo_set(i, r_page_servos[i]);
|
||||
|
@ -306,6 +308,8 @@ mixer_tick(void)
|
|||
/* set the disarmed servo outputs. */
|
||||
for (unsigned i = 0; i < PX4IO_SERVO_COUNT; i++) {
|
||||
up_pwm_servo_set(i, r_page_servo_disarmed[i]);
|
||||
/* copy values into reporting register */
|
||||
r_page_servos[i] = r_page_servo_disarmed[i];
|
||||
}
|
||||
|
||||
/* set S.BUS1 or S.BUS2 outputs */
|
||||
|
|
Loading…
Reference in New Issue