diff --git a/ROMFS/px4fmu_common/init.d/rcS b/ROMFS/px4fmu_common/init.d/rcS index c2dcb072e5..254ce49cc1 100644 --- a/ROMFS/px4fmu_common/init.d/rcS +++ b/ROMFS/px4fmu_common/init.d/rcS @@ -54,6 +54,7 @@ set PWM_OUT none set PWM_RATE p:PWM_RATE set RC_INPUT_ARGS "" set SDCARD_MIXERS_PATH /fs/microsd/etc/mixers +set STARTUP_TUNE 1 set USE_IO no set VEHICLE_TYPE none @@ -94,25 +95,22 @@ then if hardfault_log check then # Error tune. - tune_control play -t 2 + set STARTUP_TUNE 2 if hardfault_log commit then hardfault_log reset fi - else - # Play the startup tune. - tune_control play -t 1 fi else # tune SD_INIT - tune_control play -t 16 + set STARTUP_TUNE 16 if mkfatfs /dev/mmcsd0 then if mount -t vfat /dev/mmcsd0 /fs/microsd then echo "INFO [init] card formatted" else - tune_control play -t 17 + set STARTUP_TUNE 17 echo "ERROR [init] format failed" set LOG_FILE /dev/null fi @@ -121,17 +119,6 @@ else fi fi -# AEROCORE2 shouldn't have an sd card and CF2 may optionally have an sd card. -if ! ver hwcmp BITCRAZE_CRAZYFLIE GUMSTIX_AEROCORE2 -then - # Run no SD alarm. - if [ $LOG_FILE = /dev/null ] - then - # tune Make FS MBAGP - tune_control play -t 2 - fi -fi - # # Look for an init script on the microSD card. # Disable autostart if the script found. @@ -175,6 +162,15 @@ else fi fi + # + # Play the startup tune (if not disabled or there is an error) + # + param compare CBRK_BUZZER 782090 + if [ $? != 0 -o $STARTUP_TUNE != 1 ] + then + tune_control play -t $STARTUP_TUNE + fi + # # Optional board defaults: rc.board_defaults # @@ -550,6 +546,7 @@ unset PWM_OUT unset PWM_RATE unset RC_INPUT_ARGS unset SDCARD_MIXERS_PATH +unset STARTUP_TUNE unset USE_IO unset VEHICLE_TYPE diff --git a/src/lib/circuit_breaker/circuit_breaker_params.c b/src/lib/circuit_breaker/circuit_breaker_params.c index 0d7708cb92..88e84c2302 100644 --- a/src/lib/circuit_breaker/circuit_breaker_params.c +++ b/src/lib/circuit_breaker/circuit_breaker_params.c @@ -154,7 +154,8 @@ PARAM_DEFINE_INT32(CBRK_GPSFAIL, 0); * * Setting this parameter to 782097 will disable the buzzer audio notification. * - * WARNING: ENABLING THIS CIRCUIT BREAKER IS AT OWN RISK + * Setting this parameter to 782090 will disable the startup tune, while keeping + * all others enabled. * * @reboot_required true * @min 0