1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 14:25:20 +03:00

Add in prearm option for safer arming.

When prearm is used, it must be enabled before arming.  Before you can arm again, the prearm switch needs to get toggled. (+3 squashed commit)
This commit is contained in:
Bryce Johnson 2017-07-30 14:22:26 -05:00
parent 5b31ca2916
commit f8bd089e47
4 changed files with 29 additions and 10 deletions

View file

@ -77,6 +77,7 @@ static const box_t boxes[CHECKBOX_ITEM_COUNT] = {
{ BOXCAMERA2, "CAMERA CONTROL 2", 33},
{ BOXCAMERA3, "CAMERA CONTROL 3", 34 },
{ BOXDSHOTREVERSE, "DSHOT REVERSE MOTORS", 35 },
{ BOXPREARM, "PREARM", 36 },
};
// mask of enabled IDs, calculated on startup based on enabled features. boxId_e is used as bit index
@ -147,7 +148,7 @@ void initActiveBoxIds(void)
// macro to enable boxId (BoxidMaskEnable). Reference to ena is hidden, local use only
#define BME(boxId) do { bitArraySet(&ena, boxId); } while (0)
BME(BOXARM);
BME(BOXPREARM);
if (!feature(FEATURE_AIRMODE)) {
BME(BOXAIRMODE);
}