camera_trigger:Support more than 8 channles

This commit is contained in:
David Sidrane
2021-06-10 11:31:27 -07:00
committed by Lorenz Meier
parent 615e1f3e29
commit e0fab172a4
7 changed files with 100 additions and 34 deletions

View File

@@ -377,21 +377,30 @@ else
if param greater -s TRIG_MODE 0
then
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
if param compare TRIG_PINS 56
if param compare TRIG_PINS_EX 0
then
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
if param compare TRIG_PINS 78
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
if param compare TRIG_PINS 56
then
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
# clear pins 5 and 6
set FMU_MODE pwm4
set AUX_MODE pwm4
else
set FMU_MODE none
set AUX_MODE none
if param compare TRIG_PINS 78
then
# clear pins 7 and 8
set FMU_MODE pwm6
set AUX_MODE pwm6
else
set FMU_MODE none
set AUX_MODE none
fi
fi
else
if param compare TRIG_PINS_EX 12288
then
set FMU_MODE pwm12
set AUX_MODE pwm12
fi
fi