px4iofirmware: simplify lockdown logic

This commit is contained in:
Matthias Grob
2024-03-21 20:08:54 +01:00
committed by Daniel Agar
parent 7f0ec2305c
commit b714b5461b
+3 -4
View File
@@ -219,10 +219,9 @@ mixer_tick()
isr_debug(5, "> PWM disabled");
}
const bool armed_output = (should_arm || should_arm_nothrottle || (source == MIX_FAILSAFE))
&& !(r_setup_arming & PX4IO_P_SETUP_ARMING_LOCKDOWN);
const bool disarmed_output = !armed_output
&& (should_always_enable_pwm || (r_setup_arming & PX4IO_P_SETUP_ARMING_LOCKDOWN));
const bool armed_output = should_arm || should_arm_nothrottle || (source == MIX_FAILSAFE);
const bool disarmed_output = (!armed_output && should_always_enable_pwm)
|| (r_setup_arming & PX4IO_P_SETUP_ARMING_LOCKDOWN);
if (mixer_servos_armed && (armed_output || disarmed_output)) {
if (disarmed_output) {