From 0fbb03dee17505d845abfaacc2ed047cf4979fa1 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Mon, 4 Oct 2021 09:11:00 +0200 Subject: [PATCH] ROMFS: add option for startup tune volume Otherwise the CBRK_BUZZER param does not work as it should. --- ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu | 3 ++- ROMFS/px4fmu_common/init.d/rcS | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu b/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu index 95692923e4..70f9c0d5f9 100644 --- a/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu +++ b/ROMFS/px4fmu_common/init.d/airframes/4061_atl_mantis_edu @@ -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" diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index 20e09150b9..5e59707773 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -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