ROMFS: add option for startup tune volume

Otherwise the CBRK_BUZZER param does not work as it should.
This commit is contained in:
Julian Oes 2021-10-04 09:11:00 +02:00 committed by Daniel Agar
parent a50f7af3b1
commit 0fbb03dee1
2 changed files with 6 additions and 3 deletions

View File

@ -201,4 +201,5 @@ param set-default SENS_FLOW_ROT 4
mixer load /dev/tap_esc /etc/mixers/quad_x.main.mix
# ignore the SD card errors and use normal startup sound, and make it less loud
set STARTUP_TUNE "1 -s 20"
set STARTUP_TUNE "1"
set STARTUP_TUNE_VOLUME "-s 20"

View File

@ -49,6 +49,7 @@ set SDCARD_EXT_PATH /fs/microsd/ext_autostart
set SDCARD_FORMAT no
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
set STARTUP_TUNE 1
set STARTUP_TUNE_VOLUME ""
set USE_IO no
set VEHICLE_TYPE none
@ -481,9 +482,9 @@ else
# Play the startup tune (if not disabled or there is an error)
#
param compare CBRK_BUZZER 782090
if [ $? != 0 -o $STARTUP_TUNE != 1 ]
if [ "$?" != "0" -o "$STARTUP_TUNE" != "1" ]
then
tune_control play -t $STARTUP_TUNE
tune_control play -t $STARTUP_TUNE $STARTUP_TUNE_VOLUME
fi
#
@ -602,6 +603,7 @@ unset SDCARD_EXT_PATH
unset SDCARD_FORMAT
unset SDCARD_MIXERS_PATH
unset STARTUP_TUNE
unset STARTUP_TUNE_VOLUME
unset USE_IO
unset VEHICLE_TYPE