New Target VIVAF4AIO
[betaflight.git] / docs / Modes.md
blob3c576b145f42967af0679d40a46247c51191e29e
1 # Modes
3 There are various modes that can be toggled on or off.  Modes can be enabled/disabled by stick positions, auxillary receiver channels and other events such as failsafe detection.
5 | ID | Short Name               | Function                                                             |
6 | -- | ------------------------ | ------------------------------------------------------------------------------------ |
7 | 0  | ARM                      | Enables motors and flight stabilisation                                              |
8 | 1  | ANGLE                    | Legacy auto-level flight mode                                                        |
9 | 2  | HORIZON                  | Auto-level flight mode                                                               |
10 | 4  | ANTI GRAVITY             | Prevents dips and rolls on fast throttle changes                                     |
11 | 5  | MAG                      | Heading lock                                                                         |
12 | 6  | HEADFREE                 | Head Free - When enabled yaw has no effect on pitch/roll inputs                      |
13 | 7  | HEADADJ                  | Heading Adjust - Sets a new yaw origin for HEADFREE mode                             |
14 | 8  | CAMSTAB                  | Camera Stabilisation                                                                 |
15 | 12 | PASSTHRU                 | Pass roll, yaw, and pitch directly from rx to servos in airplane mix                 |
16 | 13 | BEEPERON                 | Enable beeping - useful for locating a crashed aircraft                              |
17 | 15 | LEDLOW                   | Switch off LED\_STRIP output                                                         |
18 | 17 | CALIB                    | Start in-flight calibration                                                          |
19 | 19 | OSD                      | Enable/Disable On-Screen-Display (OSD)                                               |
20 | 20 | TELEMETRY                | Enable telemetry via switch                                                          |
21 | 23 | SERVO1                   | Servo 1                                                                              |
22 | 24 | SERVO2                   | Servo 2                                                                              |
23 | 25 | SERVO3                   | Servo 3                                                                              |
24 | 26 | BLACKBOX                 | Enable BlackBox logging                                                              |
25 | 27 | FAILSAFE                 | Enter failsafe stage 2 manually                                                      |
26 | 28 | AIRMODE                  | Alternative mixer and additional PID logic for more stable copter                    |
27 | 29 | 3D                       | Enable 3D mode                                                                       |
28 | 30 | FPV ANGLE MIX            | Apply yaw rotation relative to a FPV camera mounted at a preset angle                |
29 | 31 | BLACKBOX ERASE           | Erase the contents of the onboard flash log chip (takes > 30 s)                      |
30 | 32 | CAMERA CONTROL 1         | Control function 1 of the onboard camera (if supported)                              |
31 | 33 | CAMERA CONTROL 2         | Control function 2 of the onboard camera (if supported)                              |
32 | 34 | CAMERA CONTROL 3         | Control function 3 of the onboard camera (if supported)                              |
33 | 35 | FLIP OVER AFTER CRASH    | Reverse the motors to flip over an upside down craft after a crash (DShot required)  |
34 | 36 | BOXPREARM                | When arming, wait for this switch to be activated before actually arming             |
35 | 37 | BEEP GPS SATELLITE COUNT | Use a number of beeps to indicate the number of GPS satellites found                 |
36 | 39 | VTX PIT MODE             | Switch the VTX into pit mode (low output power, if supported)                        |
37 | 40 | USER1                    | User defined switch 1. Intended to be used to control an arbitrary output with PINIO |
38 | 41 | USER2                    | User defined switch 2. Intended to be used to control an arbitrary output with PINIO |
39 | 42 | USER3                    | User defined switch 3. Intended to be used to control an arbitrary output with PINIO |
40 | 43 | USER4                    | User defined switch 4. Intended to be used to control an arbitrary output with PINIO |
41 | 44 | PID AUDIO                | Enable output of PID controller state as audio                                       |
42 | 45 | PARALYZE                 | Permanently disable a crashed craft until it is power cycled                         |
43 | 46 | GPS RESCUE               | Enable 'GPS Rescue' to return the craft to the location where it was last armed      |
44 | 47 | ACRO TRAINER             | Enable 'acro trainer' angle limiting in acro mode                                    |
46 ## Auto-leveled flight
48 The default flight mode does not stabilize the multicopter around the roll and the pitch axes. That is, the multicopter does not level on its own if you center the pitch and roll sticks on the radio. Rather, they work just like the yaw axis: the rate of rotation of each axis is controlled directly by the related stick on the radio, and by leaving them centered the flight controller will just try to keep the multicopter in whatever orientation it's in. This default mode is called "Rate" mode, also sometime called "Acro" (from "acrobatic") or "Manual" mode, and is active whenever no auto-leveled mode is enabled.
50 If your flight controller is equipped with a 3 axis accelerometer (very likely), then you can enable one of the two available auto leveled flight modes.
52 ## Mode details
54 ### Angle
56 In this auto-leveled mode the roll and pitch channels control the angle between the relevant axis and the vertical, achieving leveled flight just by leaving the sticks centered.
58 ### Horizon
60 This hybrid mode works exactly like the previous ANGLE mode with centered roll and pitch sticks (thus enabling auto-leveled flight), then gradually behaves more and more like the default RATE mode as the sticks are moved away from the center position.
62 ### Headfree
64 In this mode, the "head" of the multicopter is always pointing to the same direction as when the feature was activated. This means that when the multicopter rotates around the Z axis (yaw), the controls will always respond according the same "head" direction.
66 With this mode it is easier to control the multicopter, even fly it with the physical head towards you since the controls always respond the same. This is a friendly mode to new users of multicopters and can prevent losing the control when you don't know the head direction. 
68 ### Airmode
70 In the standard mixer / mode, when the roll, pitch and yaw gets calculated and saturates a motor, all motors
71 will be reduced equally. When motor goes below minimum it gets clipped off.
72 Say you had your throttle just above minimum and tried to pull a quick roll - since two motors can't go
73 any lower, you essentially get half the power (half of your PID gain).
74 If your inputs would asked for more than 100% difference between the high and low motors, the low motors
75 would get clipped, breaking the symmetry of the motor balance by unevenly reducing the gain.
76 Airmode will enable full PID correction during zero throttle and give you ability for nice zero throttle
77 gliding and actobatics. But also the cornering / turns will be much tighter now as there is always maximum
78 possible correction performed. Airmode can also be enabled to work at all times by always putting it on the
79 same switch like your arm switch or you can enable/disable it in air. Additional things and benefits: Airmode
80 will additionally fully enable Iterm at zero throttle. Note that there is still some protection on the ground
81 when throttle zeroed (below min\check) and roll/pitch sticks centered. This is a basic protection to limit
82 motors spooling up on the ground. Also the Iterm will be reset above 70% of stick input in acro mode to prevent
83 quick Iterm windups during finishes of rolls and flips, which will provide much cleaner and more natural stops
84 of flips and rolls what again opens the ability to have higher I gains for some.
85 Note that AIRMODE will also overrule motor stop function! It will basically also act as an idle up switch.
88 ## Auxiliary Configuration
90 Spare auxillary receiver channels can be used to enable/disable modes.  Some modes can only be enabled this way.
92 Configure your transmitter so that switches or dials (potentiometers) send channel data on channels 5 and upwards (the first 4 channels are usually occupied by the throttle, aileron, rudder, and elevator channels).
94 _e.g. You can configure a 3 position switch to send 1000 when the switch is low, 1500 when the switch is in the middle and 2000 when the switch is high._
96 Configure your tx/rx channel limits to use values between 1000 and 2000.  The range used by mode ranges is fixed to 900 to 2100.
98 When a channel is within a specifed range the corresponding mode is enabled.
100 Use the GUI configuration tool to allow easy configuration when channel.
102 ### CLI 
104 There is a CLI command, `aux` that allows auxillary configuration.  It takes 5 arguments as follows:
106 * AUD range slot number (0 - 39)
107 * mode id (see mode list above)
108 * AUX channel index (AUX1 = 0, AUX2 = 1,... etc)
109 * low position, from 900 to 2100. Should be a multiple of 25.
110 * high position, from 900 to 2100. Should be a multiple of 25.
112 If the low and high position are the same then the values are ignored.
114 e.g.
116 Configure AUX range slot 0 to enable ARM when AUX1 is withing 1700 and 2100.
119 aux 0 0 0 1700 2100
122 You can display the AUX configuration by using the `aux` command with no arguments.