Remove duplicated logic in autotune overshot detection and blackblox
[betaflight.git] / docs / Failsafe.md
blob2f930b269a34896da81e3163ab16b04ac3b7916d
1 # Failsafe
3 There are two types of failsafe:
5 1. receiver based failsafe
6 2. flight controller based failsafe
8 Receiver based failsafe is where you, from your transmitter and receiver, configure channels to output desired signals if your receiver detects signal loss.
9 The idea is that you set throttle and other controls so the aircraft descends in a controlled manner.  See your receiver's documentation for this method.
11 Flight controller based failsafe is where the flight controller attempts to detect signal loss from your receiver.
13 It is possible to use both types at the same time which may be desirable.  Flight controller failsafe can even help if your receiver signal wires come loose, get damaged or your receiver malfunctions in a way the receiver itself cannot detect.
15 ## Flight controller failsafe system 
17 The failsafe system is not activated until 5 seconds after the flight controller boots up.  This is to prevent failsafe from activating in the case of TX/RX gear with long bind procedures before they send out valid data.
19 After the failsafe has forced a landing, the flight controller cannot be armed and has to be reset.
21 The failsafe system attempts to detect when your receiver loses signal.  It then attempts to prevent your aircraft from flying away uncontrollably.
23 The failsafe is activated when:
25 Either:
27 a) no valid channel data from the RX is received via Serial RX.
29 b) the first 4 Parallel PWM/PPM channels do not have valid signals.
31 And when:
33 c) the failsafe guard time specified by `failsafe_delay` has elapsed. 
35 ## Configuration
37 When configuring the flight controller failsafe, use the following steps:
39 1.  Configure your receiver to do one of the following:
41 a)  Upon signal loss, send no signal/pulses over the channels
43 b)  Send an invalid signal over the channels (for example, send values lower than 'failsafe_min_usec')
45 See your receiver's documentation for direction on how to accomplish one of these.
47 2.  Set 'failsafe_off_delay' to an appropriate value based on how high you fly
49 3.  Set 'failsafe_throttle' to a value that allows the aircraft to descend at approximately one meter per second.
52 These are the basic steps for flight controller failsafe configuration, see Failsafe Settings below for additional settings that may be changed.
54 ##Failsafe Settings
56 Failsafe delays are configured in 0.1 second steps.
58 1 step = 0.1sec
60 1 second = 10 steps
62 ### `failsafe_delay`
64 Guard time for failsafe activation after signal lost.  This is the amount of time the flight controller waits to see if it begins receiving a valid signal again before activating failsafe.
66 ### `failsafe_off_delay`
68 Delay after failsafe activates before motors finally turn off.  This is the amount of time 'failsafe_throttle' is active.  If you fly at higher altitudes you may need more time to descend safely.
70 ### `failsafe_throttle`
72 Throttle level used for landing.  Specify a value that causes the aircraft to descend at about 1M/sec.
74 Use standard RX usec values.  See RX documentation.
76 ### `failsafe_min_usec`
78 The shortest PWM/PPM pulse considered valid.
80 Only valid when using Parallel PWM or PPM receivers.
82 ### `failsafe_max_usec`
84 The longest PWM/PPM pulse considered valid.
86 Only valid when using Parallel PWM or PPM receivers.
88 This setting helps detect when your RX stops sending any data when the RX looses signal.
90 With a Graupner GR-24 configured for PWM output with failsafe on channels 1-4 set to OFF in the receiver settings
91 then this setting, at its default value, will allow failsafe to be activated.