fix(rcS): FMU output pins not working when serial passthrough is not compiled for a board (#27682)

#27605 gated the dshot/pwm_out start on `param compare -s PASSTHRU_EN 0`.
PASSTHRU_EN is registered only when the serialpassthrough driver is
compiled in, which is not the case on most boards (e.g. fmu-v5x). There
param_find() fails, `param compare` returns "no match", the else branch
runs, and the FMU outputs never start: the PWM_AUX group disappears from
the Actuators screen and motors wired to those pins won't arm. SITL uses a
separate init.d-posix rcS and is unaffected, so CI did not catch it.

Use the start-unless-explicitly-enabled idiom already used elsewhere in
rcS (`param greater -s`): only skip the outputs when PASSTHRU_EN is
explicitly > 0. A missing or zero parameter starts the outputs as before.
This commit is contained in:
Gennaro Guidone
2026-06-17 16:37:50 +02:00
committed by GitHub
parent 1b322ff74a
commit 143b518528

View File

@@ -539,12 +539,14 @@ else
else
commander start
if param compare -s PASSTHRU_EN 0
if param greater -s PASSTHRU_EN 0
then
# serial passthrough requested: leave the ESC lines free and
# reset so the next boot starts the outputs normally
param set PASSTHRU_EN 0
else
dshot start
pwm_out start
else
param set PASSTHRU_EN 0
fi
fi