mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
Merge branch 'refactoredBeeperCode_181_1' of
git://github.com/ethomas997/cleanflight into ethomas997-refactoredBeeperCode_181_1 Conflicts: src/main/flight/failsafe.c src/main/io/beeper.c src/main/mw.c
This commit is contained in:
commit
519586a5ce
15 changed files with 487 additions and 194 deletions
|
@ -21,6 +21,7 @@
|
|||
#include "common/axis.h"
|
||||
|
||||
#include "rx/rx.h"
|
||||
#include "io/beeper.h"
|
||||
#include "io/escservo.h"
|
||||
#include "io/rc_controls.h"
|
||||
#include "config/runtime_config.h"
|
||||
|
@ -161,6 +162,8 @@ void failsafeUpdateState(void)
|
|||
break;
|
||||
|
||||
case FAILSAFE_RX_LOSS_DETECTED:
|
||||
beeper(BEEPER_TX_LOST_ARMED);
|
||||
|
||||
if (failsafeShouldForceLanding(armed)) {
|
||||
// Stabilize, and set Throttle to specified level
|
||||
failsafeActivate();
|
||||
|
@ -185,9 +188,12 @@ void failsafeUpdateState(void)
|
|||
|
||||
case FAILSAFE_LANDED:
|
||||
|
||||
beeper(BEEPER_TX_LOST);
|
||||
|
||||
if (!armed) {
|
||||
break;
|
||||
}
|
||||
|
||||
// This will prevent the automatic rearm if failsafe shuts it down and prevents
|
||||
// to restart accidently by just reconnect to the tx - you will have to switch off first to rearm
|
||||
ENABLE_ARMING_FLAG(PREVENT_ARMING);
|
||||
|
@ -200,7 +206,6 @@ void failsafeUpdateState(void)
|
|||
break;
|
||||
}
|
||||
} while (reprocessState);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue