mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +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:
parent
a50f7af3b1
commit
0fbb03dee1
@ -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"
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user