Merge pull request #5239 from etracer65/reorder_arming_disabled_flags
Reordered arming disabled flags to give runaway takeoff a higher priority
This commit is contained in:
commit
dbdeb7b445
|
@ -282,7 +282,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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue