mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
Port of refactored beeper code 181_1
This the "Port of refactored beeper code #669" modification applied to version 1.8.1 (4/4/2015) of the code.
This commit is contained in:
parent
988ae2d503
commit
f02d7403af
15 changed files with 476 additions and 191 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"
|
||||
|
@ -133,11 +134,15 @@ void failsafeUpdateState(void)
|
|||
rcData[i] = rxConfig->midrc; // after specified guard time after RC signal is lost (in 0.1sec)
|
||||
}
|
||||
rcData[THROTTLE] = failsafeConfig->failsafe_throttle;
|
||||
// beep SOS tones (armed and TX signal lost; autolanding/autodisarm)
|
||||
beeper(BEEPER_TX_LOST_ARMED);
|
||||
failsafeState.events++;
|
||||
}
|
||||
|
||||
if (failsafeShouldHaveCausedLandingByNow() || !ARMING_FLAG(ARMED)) {
|
||||
mwDisarm();
|
||||
// beep to indicate TX signal lost (repeat until TX is okay)
|
||||
beeper(BEEPER_TX_LOST);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue