ROMFS: silently compare optional parameters

- not all build configurations have these parameters/modules
This commit is contained in:
Daniel Agar 2020-11-11 01:11:18 -05:00 committed by Beat Küng
parent 7ba73b46ca
commit 9767a73619
5 changed files with 14 additions and 14 deletions

View File

@ -72,7 +72,7 @@ rgbled start -X -q
rgbled_ncp5623c start -X -q
rgbled_pwm start
if param greater LIGHT_EN_BLINKM 0
if param greater -s LIGHT_EN_BLINKM 0
then
if blinkm start -X
then

View File

@ -225,7 +225,7 @@ commander start
navigator start
if ! param compare -s MNT_MODE_IN -1
if param greater -s MNT_MODE_IN -1
then
vmount start
fi

View File

@ -18,7 +18,7 @@ set OUTPUT_DEV none
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
# mixer to mount (override the airframe-specific MIXER_AUX setting).
#
if ! param compare -s MNT_MODE_IN -1
if param greater -s MNT_MODE_IN -1
then
if param compare -s MNT_MODE_OUT 0
then
@ -43,13 +43,13 @@ then
if [ $IO_PRESENT = yes ]
then
set OUTPUT_MODE io
if param greater DSHOT_CONFIG 0
if param greater -s DSHOT_CONFIG 0
then
set OUTPUT_CMD dshot
fi
fi
else
if param greater DSHOT_CONFIG 0
if param greater -s DSHOT_CONFIG 0
then
set OUTPUT_MODE dshot
set OUTPUT_CMD dshot

View File

@ -7,17 +7,17 @@
set TEMP_COMP_START ""
if param compare TC_A_ENABLE 1
if param compare -s TC_A_ENABLE 1
then
set TEMP_COMP_START "true"
fi
if param compare TC_B_ENABLE 1
if param compare -s TC_B_ENABLE 1
then
set TEMP_COMP_START "true"
fi
if param compare TC_G_ENABLE 1
if param compare -s TC_G_ENABLE 1
then
set TEMP_COMP_START "true"
fi

View File

@ -244,7 +244,7 @@ else
rgbled start -X -q
rgbled_ncp5623c start -X -q
if param greater LIGHT_EN_BLINKM 0
if param greater -s LIGHT_EN_BLINKM 0
then
if blinkm start -X
then
@ -410,7 +410,7 @@ else
set AUX_MODE pwm4
fi
if param greater TRIG_MODE 0
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
@ -509,24 +509,24 @@ else
#
# Start vmount to control mounts such as gimbals, disabled by default.
#
if ! param compare MNT_MODE_IN -1
if param greater -s MNT_MODE_IN -1
then
vmount start
fi
# Check for flow sensor
if param compare SENS_EN_PX4FLOW 1
if param compare -s SENS_EN_PX4FLOW 1
then
px4flow start -X
fi
# Blacksheep telemetry
if param greater TEL_BST_EN 0
if param compare -s TEL_BST_EN 1
then
bst start -X
fi
if param compare IMU_GYRO_FFT_EN 1
if param compare -s IMU_GYRO_FFT_EN 1
then
gyro_fft start
fi