mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ROMFS: silently compare optional parameters
- not all build configurations have these parameters/modules
This commit is contained in:
parent
7ba73b46ca
commit
9767a73619
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user