Skip to content
Snippets Groups Projects
Commit 5ebd0116 authored by Beat Küng's avatar Beat Küng Committed by Daniel Agar
Browse files

rc.interface: allow setting a custom MIXER_FILE

parent e6b9806e
No related branches found
No related tags found
No related merge requests found
......@@ -128,17 +128,20 @@ then
set MIXER_AUX ${MIXER}
fi
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix ]
if [ "$MIXER_FILE" == none ]
then
# Use the mixer file from the SD-card if it exists.
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix
else
# Try out the old convention, for backward compatibility.
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.mix ]
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix ]
then
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.mix
# Use the mixer file from the SD-card if it exists.
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.main.mix
else
set MIXER_FILE /etc/mixers/${MIXER}.main.mix
# Try out the old convention, for backward compatibility.
if [ -f ${SDCARD_MIXERS_PATH}/${MIXER}.mix ]
then
set MIXER_FILE ${SDCARD_MIXERS_PATH}/${MIXER}.mix
else
set MIXER_FILE /etc/mixers/${MIXER}.main.mix
fi
fi
fi
......@@ -168,7 +171,6 @@ then
tone_alarm ${TUNE_ERR}
fi
unset MIXER_FILE
else
if [ $MIXER != skip ]
then
......
......@@ -65,6 +65,7 @@ set MAVLINK_COMPANION_DEVICE /dev/ttyS2
set MAV_TYPE none
set MIXER none
set MIXER_AUX none
set MIXER_FILE none
set MK_MODE none
set MKBLCTRL_ARG ""
set OUTPUT_MODE none
......@@ -546,6 +547,7 @@ unset MAVLINK_COMPANION_DEVICE
unset MAV_TYPE
unset MIXER
unset MIXER_AUX
unset MIXER_FILE
unset MK_MODE
unset MKBLCTRL_ARG
unset OUTPUT_DEV
......
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