mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
enable silent compare of parameter (#12850)
Remove false errors after comparing parameters that doesn't exists. as described in #12832
This commit is contained in:
committed by
Julian Oes
parent
05446c0875
commit
02e861b16e
@@ -17,9 +17,9 @@ 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 MNT_MODE_IN -1
|
||||
if ! param compare -s MNT_MODE_IN -1
|
||||
then
|
||||
if param compare MNT_MODE_OUT 0
|
||||
if param compare -s MNT_MODE_OUT 0
|
||||
then
|
||||
set MIXER_AUX mount
|
||||
fi
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
# NOTE: Script variables are declared/initialized/unset in the rcS script.
|
||||
#
|
||||
|
||||
if param greater UAVCAN_ENABLE 1
|
||||
if param greater -s UAVCAN_ENABLE 1
|
||||
then
|
||||
# Reduce logger buffer to free up some RAM for UAVCAN servers.
|
||||
set LOGGER_BUF 6
|
||||
|
||||
@@ -47,13 +47,13 @@ then
|
||||
fi
|
||||
fi
|
||||
|
||||
if param compare SENS_EN_BATT 1
|
||||
if param compare -s SENS_EN_BATT 1
|
||||
then
|
||||
batt_smbus start -X
|
||||
fi
|
||||
|
||||
# Sensors on the PWM interface bank
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
if param compare -s SENS_EN_LL40LS 1
|
||||
then
|
||||
if pwm_input start
|
||||
then
|
||||
@@ -62,49 +62,49 @@ then
|
||||
fi
|
||||
|
||||
# Lidar-Lite on I2C
|
||||
if param compare SENS_EN_LL40LS 2
|
||||
if param compare -s SENS_EN_LL40LS 2
|
||||
then
|
||||
ll40ls start i2c -a
|
||||
fi
|
||||
|
||||
# mappydot lidar sensor
|
||||
if param compare SENS_EN_MPDT 1
|
||||
if param compare -s SENS_EN_MPDT 1
|
||||
then
|
||||
mappydot start -a
|
||||
fi
|
||||
|
||||
# mb12xx sonar sensor
|
||||
if param greater SENS_EN_MB12XX 0
|
||||
if param greater -s SENS_EN_MB12XX 0
|
||||
then
|
||||
mb12xx start -a
|
||||
fi
|
||||
|
||||
# pga460 sonar sensor
|
||||
if param greater SENS_EN_PGA460 0
|
||||
if param greater -s SENS_EN_PGA460 0
|
||||
then
|
||||
pga460 start
|
||||
fi
|
||||
|
||||
# Lightware i2c lidar sensor
|
||||
if param greater SENS_EN_SF1XX 0
|
||||
if param greater -s SENS_EN_SF1XX 0
|
||||
then
|
||||
sf1xx start -a
|
||||
fi
|
||||
|
||||
# Heater driver for temperature regulated IMUs.
|
||||
if param compare SENS_EN_THERMAL 1
|
||||
if param compare -s SENS_EN_THERMAL 1
|
||||
then
|
||||
heater start
|
||||
fi
|
||||
|
||||
# Teraranger one tof sensor
|
||||
if param greater SENS_EN_TRANGER 0
|
||||
if param greater -s SENS_EN_TRANGER 0
|
||||
then
|
||||
teraranger start -a
|
||||
fi
|
||||
|
||||
# Possible pmw3901 optical flow sensor
|
||||
if param greater SENS_EN_PMW3901 0
|
||||
if param greater -s SENS_EN_PMW3901 0
|
||||
then
|
||||
pmw3901 start
|
||||
fi
|
||||
|
||||
@@ -299,7 +299,7 @@ else
|
||||
#
|
||||
# Set USE_IO flag.
|
||||
#
|
||||
if param compare SYS_USE_IO 1
|
||||
if param compare -s SYS_USE_IO 1
|
||||
then
|
||||
set USE_IO yes
|
||||
fi
|
||||
@@ -347,7 +347,7 @@ else
|
||||
fi
|
||||
|
||||
# Sensors on the PWM interface bank.
|
||||
if param compare SENS_EN_LL40LS 1
|
||||
if param compare -s SENS_EN_LL40LS 1
|
||||
then
|
||||
# Clear pins 5 and 6.
|
||||
set FMU_MODE pwm4
|
||||
@@ -374,7 +374,7 @@ else
|
||||
#
|
||||
# Check if UAVCAN is enabled, default to it for ESCs.
|
||||
#
|
||||
if param greater UAVCAN_ENABLE 0
|
||||
if param greater -s UAVCAN_ENABLE 0
|
||||
then
|
||||
# Start core UAVCAN module.
|
||||
if uavcan start
|
||||
@@ -426,7 +426,7 @@ else
|
||||
sh /etc/init.d/rc.vehicle_setup
|
||||
|
||||
# Camera capture driver
|
||||
if param greater CAM_CAP_FBACK 0
|
||||
if param greater -s CAM_CAP_FBACK 0
|
||||
then
|
||||
if camera_capture start
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user