NuttX shell scripts: replace operator == with =

- NuttX supports both versions
- POSIX shell only supports '='
This commit is contained in:
Beat Küng
2018-09-27 11:11:12 +02:00
committed by Lorenz Meier
parent 4c90d2c025
commit 37338e442f
75 changed files with 146 additions and 147 deletions
+1 -2
View File
@@ -172,12 +172,11 @@ set_target_properties(romfs PROPERTIES LINKER_LANGUAGE C)
find_program(SHELLCHECK_PATH shellcheck)
if(SHELLCHECK_PATH)
# TODO: fix SC2039, SC2086, SC2166
# TODO: fix SC2086, SC2166
add_custom_target(shellcheck
COMMAND ${SHELLCHECK_PATH} --shell=sh
--exclude=SC2121 # SC2121: To assign a variable, use just 'var=value'
--exclude=SC2086 # SC2086: Double quote to prevent globbing and word splitting.
--exclude=SC2039 # SC2039: In POSIX sh, == in place of = is undefined.
--exclude=SC2166 # SC2166: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
--exclude=SC2154 # SC2154: <var> is referenced but not assigned (NuttX uses different asssignment)
init.d/*
@@ -17,7 +17,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.1
+1 -1
View File
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
# TODO tune roll/pitch separately
param set MC_ROLL_P 7.0
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 4
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 6
param set BAT_V_EMPTY 3.5
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 3
@@ -19,7 +19,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_PITCH_P 4.0
param set MC_PITCHRATE_P 0.24
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DIS5 950
param set PWM_RATE 400
@@ -15,7 +15,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.0
param set MC_ROLLRATE_P 0.12
+1 -1
View File
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.19
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_MAX 2000
param set PWM_RATE 400
@@ -21,7 +21,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_MAX 2000
param set PWM_RATE 400
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DIS5 950
@@ -18,7 +18,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.15
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_THR_CRUISE 65.0
param set FW_PR_P 0.08
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 22.0
param set FW_AIRSPD_MIN 14.0
+1 -1
View File
@@ -12,7 +12,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DISARMED 1000
param set PWM_AUX_MAX 2000
+1 -1
View File
@@ -19,7 +19,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set CBRK_AIRSPD_CHK 162128
+1 -1
View File
@@ -19,7 +19,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_CAPACITY 23000
param set BAT_N_CELLS 4
+1 -1
View File
@@ -16,7 +16,7 @@
sh /etc/init.d/rc.mc_defaults
set MIXER coax
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.17
+1 -1
View File
@@ -23,7 +23,7 @@ set MIXER blade130
#set PWM_OUT 1234
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set ATT_BIAS_MAX 0.0
@@ -21,7 +21,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_RATE 50
param set PWM_RATE 50
+1 -1
View File
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MIN 10
param set FW_AIRSPD_TRIM 15
+1 -1
View File
@@ -23,7 +23,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MIN 10
param set FW_AIRSPD_TRIM 15
+1 -1
View File
@@ -25,7 +25,7 @@
set VEHICLE_TYPE mc
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set NAV_ACC_RAD 2.0
+1 -1
View File
@@ -18,7 +18,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 15
param set FW_AIRSPD_MIN 10
+1 -1
View File
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MIN 13
param set FW_AIRSPD_TRIM 15
+1 -1
View File
@@ -18,7 +18,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MIN 15
param set FW_AIRSPD_TRIM 20
+1 -1
View File
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set BAT_N_CELLS 2
param set FW_AIRSPD_MAX 15
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 30
param set FW_AIRSPD_MIN 13
+1 -1
View File
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MIN 15
param set FW_AIRSPD_TRIM 20
@@ -20,7 +20,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
####################################
@@ -10,7 +10,7 @@
sh /etc/init.d/rc.fw_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set FW_AIRSPD_MAX 25
param set FW_AIRSPD_MIN 12.5
+1 -1
View File
@@ -22,7 +22,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_RATE 50
fi
+1 -1
View File
@@ -12,7 +12,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.08
+1 -1
View File
@@ -15,7 +15,7 @@ sh /etc/init.d/4002_quad_x_mount
# see http://www.zhiyun-tech.com/uploadfile/datedown/instruction/Tiny2_English_instructionV1.03.pdf
# under Gimbal Connection Instruction
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set PWM_AUX_DISARMED 1520
param set PWM_AUX_MIN 1020
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set ATT_BIAS_MAX 0.0
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.15
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.16
+1 -1
View File
@@ -20,7 +20,7 @@ sh /etc/init.d/rc.mc_defaults
#
# Load default params for this platform
#
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
# Set all params here, then disable autoconfig
param set MC_ROLL_P 6.5
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.18
+1 -1
View File
@@ -17,7 +17,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 7.0
param set MC_ROLLRATE_P 0.1
+1 -1
View File
@@ -16,7 +16,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
# tuning
param set MC_PITCHRATE_P 0.11
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.14
+1 -1
View File
@@ -17,7 +17,7 @@
sh /etc/init.d/rc.mc_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 6.5
param set MC_ROLLRATE_P 0.14
+1 -1
View File
@@ -10,7 +10,7 @@
sh /etc/init.d/4001_quad_x
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set MC_ROLL_P 8.0
param set MC_ROLLRATE_P 0.08
+1 -1
View File
@@ -26,7 +26,7 @@ set MAV_TYPE 2
set PWM_OUT 1234
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set ATT_BIAS_MAX 0.0

Some files were not shown because too many files have changed in this diff Show More