Browse Source

Document and fix '${varname}' usage

sbg
David Sidrane 8 years ago committed by Lorenz Meier
parent
commit
dd2fe5d42f
  1. 24
      ROMFS/px4fmu_common/init.d/rc.interface

24
ROMFS/px4fmu_common/init.d/rc.interface

@ -2,6 +2,12 @@
# #
# Script to configure control interface # Script to configure control interface
# #
#
# NOTE: environment variable references:
# If the dollar sign ('$') is followed by a left bracket ('{') then the
# variable name is terminated with the right bracket character ('}').
# Otherwise, the variable name goes to the end of the argument.
#
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
@ -17,17 +23,17 @@ then
fi fi
# Use the mixer file from the SD-card if it exists # Use the mixer file from the SD-card if it exists
if [ -f $SDCARD_MIXERS_PATH/$MIXER.main.mix ] if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix ]
then then
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.main.mix set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix
# Try out the old convention, for backward compatibility # Try out the old convention, for backward compatibility
else else
if [ -f $SDCARD_MIXERS_PATH/$MIXER.mix ] if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.mix ]
then then
set MIXER_FILE $SDCARD_MIXERS_PATH/$MIXER.mix set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.mix
else else
set MIXER_FILE /etc/mixers/$MIXER.main.mix set MIXER_FILE /etc/mixers/${MIXER}.main.mix
fi fi
fi fi
@ -133,14 +139,14 @@ then
set MIXER_AUX_FILE none set MIXER_AUX_FILE none
set OUTPUT_AUX_DEV /dev/pwm_output1 set OUTPUT_AUX_DEV /dev/pwm_output1
if [ -f $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix ] if [ -f ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix ]
then then
set MIXER_AUX_FILE $SDCARD_MIXERS_PATH/$MIXER_AUX.aux.mix set MIXER_AUX_FILE ${SDCARD_MIXERS_PATH}/${MIXER_AUX}.aux.mix
else else
if [ -f /etc/mixers/$MIXER_AUX.aux.mix ] if [ -f /etc/mixers/${MIXER_AUX}.aux.mix ]
then then
set MIXER_AUX_FILE /etc/mixers/$MIXER_AUX.aux.mix set MIXER_AUX_FILE /etc/mixers/${MIXER_AUX}.aux.mix
fi fi
fi fi

Loading…
Cancel
Save