1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

Merge branch 'betaflight' of https://github.com/borisbstyle/betaflight into betaflight

This commit is contained in:
borisbstyle 2016-03-21 00:41:36 +01:00
commit 7e4c64056d
3 changed files with 5 additions and 2 deletions

View file

@ -21,7 +21,8 @@
typedef enum {
OK_TO_ARM = (1 << 0),
PREVENT_ARMING = (1 << 1),
ARMED = (1 << 2)
ARMED = (1 << 2),
WAS_EVER_ARMED = (1 << 3)
} armingFlag_e;
extern uint8_t armingFlags;

View file

@ -172,7 +172,8 @@ void failsafeUpdateState(void)
bool failsafeSwitchIsOn = IS_RC_MODE_ACTIVE(BOXFAILSAFE);
beeperMode_e beeperMode = BEEPER_SILENCE;
if (!receivingRxData) {
// Beep RX lost only if we are not seeing data and we have been armed earlier
if (!receivingRxData && ARMING_FLAG(WAS_EVER_ARMED)) {
beeperMode = BEEPER_RX_LOST;
}

View file

@ -366,6 +366,7 @@ void mwArm(void)
}
if (!ARMING_FLAG(PREVENT_ARMING)) {
ENABLE_ARMING_FLAG(ARMED);
ENABLE_ARMING_FLAG(WAS_EVER_ARMED);
headFreeModeHold = DECIDEGREES_TO_DEGREES(attitude.values.yaw);
#ifdef BLACKBOX