1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Fix arming disabled flags count

Changed to being based on the required last entry `ARMING_DISABLED_ARM_SWITCH` in the flags enumeration so that future changes to the flags won't require updating the count.
This commit is contained in:
Bruce Luckcuck 2019-02-16 18:38:05 -05:00
parent fefa2a83e4
commit b96ed557a9

View file

@ -20,6 +20,8 @@
#pragma once
#include "common/utils.h"
// FIXME some of these are flight modes, some of these are general status indicators
typedef enum {
ARMED = (1 << 0),
@ -60,7 +62,7 @@ typedef enum {
ARMING_DISABLED_ARM_SWITCH = (1 << 19), // Needs to be the last element, since it's always activated if one of the others is active when arming
} armingDisableFlags_e;
#define ARMING_DISABLE_FLAGS_COUNT 21
#define ARMING_DISABLE_FLAGS_COUNT (LOG2(ARMING_DISABLED_ARM_SWITCH) + 1)
extern const char *armingDisableFlagNames[ARMING_DISABLE_FLAGS_COUNT];