mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 01:12:31 +00:00
ROMFS: silently compare optional parameters
- not all build configurations have these parameters/modules
This commit is contained in:
@@ -72,7 +72,7 @@ rgbled start -X -q
|
|||||||
rgbled_ncp5623c start -X -q
|
rgbled_ncp5623c start -X -q
|
||||||
rgbled_pwm start
|
rgbled_pwm start
|
||||||
|
|
||||||
if param greater LIGHT_EN_BLINKM 0
|
if param greater -s LIGHT_EN_BLINKM 0
|
||||||
then
|
then
|
||||||
if blinkm start -X
|
if blinkm start -X
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -225,7 +225,7 @@ commander start
|
|||||||
navigator start
|
navigator start
|
||||||
|
|
||||||
|
|
||||||
if ! param compare -s MNT_MODE_IN -1
|
if param greater -s MNT_MODE_IN -1
|
||||||
then
|
then
|
||||||
vmount start
|
vmount start
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ set OUTPUT_DEV none
|
|||||||
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
|
# If mount (gimbal) control is enabled and output mode is AUX, set the aux
|
||||||
# mixer to mount (override the airframe-specific MIXER_AUX setting).
|
# 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
|
then
|
||||||
if param compare -s MNT_MODE_OUT 0
|
if param compare -s MNT_MODE_OUT 0
|
||||||
then
|
then
|
||||||
@@ -43,13 +43,13 @@ then
|
|||||||
if [ $IO_PRESENT = yes ]
|
if [ $IO_PRESENT = yes ]
|
||||||
then
|
then
|
||||||
set OUTPUT_MODE io
|
set OUTPUT_MODE io
|
||||||
if param greater DSHOT_CONFIG 0
|
if param greater -s DSHOT_CONFIG 0
|
||||||
then
|
then
|
||||||
set OUTPUT_CMD dshot
|
set OUTPUT_CMD dshot
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if param greater DSHOT_CONFIG 0
|
if param greater -s DSHOT_CONFIG 0
|
||||||
then
|
then
|
||||||
set OUTPUT_MODE dshot
|
set OUTPUT_MODE dshot
|
||||||
set OUTPUT_CMD dshot
|
set OUTPUT_CMD dshot
|
||||||
|
|||||||
@@ -7,17 +7,17 @@
|
|||||||
|
|
||||||
set TEMP_COMP_START ""
|
set TEMP_COMP_START ""
|
||||||
|
|
||||||
if param compare TC_A_ENABLE 1
|
if param compare -s TC_A_ENABLE 1
|
||||||
then
|
then
|
||||||
set TEMP_COMP_START "true"
|
set TEMP_COMP_START "true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if param compare TC_B_ENABLE 1
|
if param compare -s TC_B_ENABLE 1
|
||||||
then
|
then
|
||||||
set TEMP_COMP_START "true"
|
set TEMP_COMP_START "true"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if param compare TC_G_ENABLE 1
|
if param compare -s TC_G_ENABLE 1
|
||||||
then
|
then
|
||||||
set TEMP_COMP_START "true"
|
set TEMP_COMP_START "true"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ else
|
|||||||
rgbled start -X -q
|
rgbled start -X -q
|
||||||
rgbled_ncp5623c start -X -q
|
rgbled_ncp5623c start -X -q
|
||||||
|
|
||||||
if param greater LIGHT_EN_BLINKM 0
|
if param greater -s LIGHT_EN_BLINKM 0
|
||||||
then
|
then
|
||||||
if blinkm start -X
|
if blinkm start -X
|
||||||
then
|
then
|
||||||
@@ -410,7 +410,7 @@ else
|
|||||||
set AUX_MODE pwm4
|
set AUX_MODE pwm4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if param greater TRIG_MODE 0
|
if param greater -s TRIG_MODE 0
|
||||||
then
|
then
|
||||||
# We ONLY support trigger on pins 5+6 or 7+8 when simultanously using AUX for actuator output.
|
# 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 56
|
||||||
@@ -509,24 +509,24 @@ else
|
|||||||
#
|
#
|
||||||
# Start vmount to control mounts such as gimbals, disabled by default.
|
# 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
|
then
|
||||||
vmount start
|
vmount start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for flow sensor
|
# Check for flow sensor
|
||||||
if param compare SENS_EN_PX4FLOW 1
|
if param compare -s SENS_EN_PX4FLOW 1
|
||||||
then
|
then
|
||||||
px4flow start -X
|
px4flow start -X
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Blacksheep telemetry
|
# Blacksheep telemetry
|
||||||
if param greater TEL_BST_EN 0
|
if param compare -s TEL_BST_EN 1
|
||||||
then
|
then
|
||||||
bst start -X
|
bst start -X
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if param compare IMU_GYRO_FFT_EN 1
|
if param compare -s IMU_GYRO_FFT_EN 1
|
||||||
then
|
then
|
||||||
gyro_fft start
|
gyro_fft start
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user