mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
ROMFS: add option for startup tune volume
Otherwise the CBRK_BUZZER param does not work as it should.
This commit is contained in:
@@ -201,4 +201,5 @@ param set-default SENS_FLOW_ROT 4
|
|||||||
mixer load /dev/tap_esc /etc/mixers/quad_x.main.mix
|
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
|
# 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"
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ set SDCARD_EXT_PATH /fs/microsd/ext_autostart
|
|||||||
set SDCARD_FORMAT no
|
set SDCARD_FORMAT no
|
||||||
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers
|
||||||
set STARTUP_TUNE 1
|
set STARTUP_TUNE 1
|
||||||
|
set STARTUP_TUNE_VOLUME ""
|
||||||
set USE_IO no
|
set USE_IO no
|
||||||
set VEHICLE_TYPE none
|
set VEHICLE_TYPE none
|
||||||
|
|
||||||
@@ -481,9 +482,9 @@ else
|
|||||||
# Play the startup tune (if not disabled or there is an error)
|
# Play the startup tune (if not disabled or there is an error)
|
||||||
#
|
#
|
||||||
param compare CBRK_BUZZER 782090
|
param compare CBRK_BUZZER 782090
|
||||||
if [ $? != 0 -o $STARTUP_TUNE != 1 ]
|
if [ "$?" != "0" -o "$STARTUP_TUNE" != "1" ]
|
||||||
then
|
then
|
||||||
tune_control play -t $STARTUP_TUNE
|
tune_control play -t $STARTUP_TUNE $STARTUP_TUNE_VOLUME
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -602,6 +603,7 @@ unset SDCARD_EXT_PATH
|
|||||||
unset SDCARD_FORMAT
|
unset SDCARD_FORMAT
|
||||||
unset SDCARD_MIXERS_PATH
|
unset SDCARD_MIXERS_PATH
|
||||||
unset STARTUP_TUNE
|
unset STARTUP_TUNE
|
||||||
|
unset STARTUP_TUNE_VOLUME
|
||||||
unset USE_IO
|
unset USE_IO
|
||||||
unset VEHICLE_TYPE
|
unset VEHICLE_TYPE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user