Skip to content
Snippets Groups Projects
Commit 37338e44 authored by Beat Küng's avatar Beat Küng Committed by Lorenz Meier
Browse files

NuttX shell scripts: replace operator == with =

- NuttX supports both versions
- POSIX shell only supports '='
parent 4c90d2c0
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 21 deletions
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -19,7 +19,7 @@
sh /etc/init.d/rc.vtol_defaults
if [ $AUTOCNF == yes ]
if [ $AUTOCNF = yes ]
then
param set CBRK_AIRSPD_CHK 162128
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment