diff --git a/src/main/fc/fc_core.c b/src/main/fc/fc_core.c index bdda1d925..022187e2b 100644 --- a/src/main/fc/fc_core.c +++ b/src/main/fc/fc_core.c @@ -280,7 +280,10 @@ void disarm(void) } #endif BEEP_OFF; - beeper(BEEPER_DISARMING); // emit disarm tone + // if ARMING_DISABLED_RUNAWAY_TAKEOFF is set then we want to play it's beep pattern instead + if (!(getArmingDisableFlags() & ARMING_DISABLED_RUNAWAY_TAKEOFF)) { + beeper(BEEPER_DISARMING); // emit disarm tone + } } } diff --git a/src/main/fc/runtime_config.c b/src/main/fc/runtime_config.c index 8e3f61bda..2c7987712 100644 --- a/src/main/fc/runtime_config.c +++ b/src/main/fc/runtime_config.c @@ -31,8 +31,8 @@ static uint32_t enabledSensors = 0; const char *armingDisableFlagNames[]= { "NOGYRO", "FAILSAFE", "RXLOSS", "BADRX", "BOXFAILSAFE", - "THROTTLE", "ANGLE", "BOOTGRACE", "NOPREARM", "LOAD", - "CALIB", "CLI", "CMS", "OSD", "BST", "MSP", "RUNAWAY", "ARMSWITCH" + "RUNAWAY", "THROTTLE", "ANGLE", "BOOTGRACE", "NOPREARM", "LOAD", + "CALIB", "CLI", "CMS", "OSD", "BST", "MSP", "ARMSWITCH" }; static armingDisableFlags_e armingDisableFlags = 0; diff --git a/src/main/fc/runtime_config.h b/src/main/fc/runtime_config.h index 5025e953b..1e81424f6 100644 --- a/src/main/fc/runtime_config.h +++ b/src/main/fc/runtime_config.h @@ -40,18 +40,18 @@ typedef enum { ARMING_DISABLED_RX_FAILSAFE = (1 << 2), ARMING_DISABLED_BAD_RX_RECOVERY = (1 << 3), ARMING_DISABLED_BOXFAILSAFE = (1 << 4), - ARMING_DISABLED_THROTTLE = (1 << 5), - ARMING_DISABLED_ANGLE = (1 << 6), - ARMING_DISABLED_BOOT_GRACE_TIME = (1 << 7), - ARMING_DISABLED_NOPREARM = (1 << 8), - ARMING_DISABLED_LOAD = (1 << 9), - ARMING_DISABLED_CALIBRATING = (1 << 10), - ARMING_DISABLED_CLI = (1 << 11), - ARMING_DISABLED_CMS_MENU = (1 << 12), - ARMING_DISABLED_OSD_MENU = (1 << 13), - ARMING_DISABLED_BST = (1 << 14), - ARMING_DISABLED_MSP = (1 << 15), - ARMING_DISABLED_RUNAWAY_TAKEOFF = (1 << 16), + ARMING_DISABLED_RUNAWAY_TAKEOFF = (1 << 5), + ARMING_DISABLED_THROTTLE = (1 << 6), + ARMING_DISABLED_ANGLE = (1 << 7), + ARMING_DISABLED_BOOT_GRACE_TIME = (1 << 8), + ARMING_DISABLED_NOPREARM = (1 << 9), + ARMING_DISABLED_LOAD = (1 << 10), + ARMING_DISABLED_CALIBRATING = (1 << 11), + ARMING_DISABLED_CLI = (1 << 12), + ARMING_DISABLED_CMS_MENU = (1 << 13), + ARMING_DISABLED_OSD_MENU = (1 << 14), + ARMING_DISABLED_BST = (1 << 15), + ARMING_DISABLED_MSP = (1 << 16), ARMING_DISABLED_ARM_SWITCH = (1 << 17), // Needs to be the last element, since it's always activated if one of the others is active when arming } armingDisableFlags_e;