Merge pull request #11834 from ctzsnooze/GPS_Refactor_plus_120hz
[betaflight.git] / docs / Controls.md
blob6956ada34c35ad23665e6b841610594ef7c17779
1 # Controls
3 ## Arming
5 When armed, the aircraft is ready to fly and the motors will spin when throttle is applied.  The motors will
6 spin at a slow speed when armed (this feature may be disabled by setting MOTOR_STOP, but for safety reasons,
7 that is not recommended).
9 By default, arming and disarming is done using stick positions.  (NOTE: this feature is disabled when using a
10 switch to arm.)
12 Some conditions will disable arming. In this case the Warning LED on the board will flash a certain number of times, indicating what the condition is:
14 | Reason for disabled Arming               | LED Flashes |
15 |------------------------------------------|-------------|
16 | CLI is active in the configurator        | 2           |
17 | Failsafe mode is active                  | 3           |
18 | The aircraft has landed in failsafe mode | 3           |
19 | Maximum arming angle is exceeded         | 4           |
20 | Calibration is active                    | 5           |
21 | The system is overloaded                 | 6           |
23 ## Stick Positions
25 The three stick positions are:
27 |Position        | Approx. Channel Input|
28 |----------------|----------------------|
29 |LOW             | 1000                 |
30 |CENTER          | 1500                 |
31 |HIGH            | 2000                 |
33 The stick positions are combined to activate different functions:
35 | Function                      | Throttle | Yaw     | Pitch  | Roll   |
36 | ----------------------------- | -------- | ------- | ------ | ------ |
37 | ARM                           | LOW      | HIGH    | CENTER | CENTER |
38 | DISARM                        | LOW      | LOW     | CENTER | CENTER |
39 | Profile 1                     | LOW      | LOW     | CENTER | LOW    |
40 | Profile 2                     | LOW      | LOW     | HIGH   | CENTER |
41 | Profile 3                     | LOW      | LOW     | CENTER | HIGH   |
42 | Calibrate Gyro                | LOW      | LOW     | LOW    | CENTER |
43 | Calibrate Acc                 | HIGH     | LOW     | LOW    | CENTER |
44 | Calibrate Mag/Compass         | HIGH     | HIGH    | LOW    | CENTER |
45 | Inflight calibration controls | LOW      | LOW     | HIGH   | HIGH   |
46 | Trim Acc Left                 | HIGH     | CENTER  | CENTER | LOW    |
47 | Trim Acc Right                | HIGH     | CENTER  | CENTER | HIGH   |
48 | Trim Acc Forwards             | HIGH     | CENTER  | HIGH   | CENTER |
49 | Trim Acc Backwards            | HIGH     | CENTER  | LOW    | CENTER |
50 | Disable LCD Page Cycling      | LOW      | CENTER  | HIGH   | LOW    |
51 | Enable LCD Page Cycling       | LOW      | CENTER  | HIGH   | HIGH   |
52 | Save setting                  | LOW      | LOW     | LOW    | HIGH   |
54 ![Stick Positions](assets/images/StickPositions.png)
56 ### History
58 Intial stick commands, came from MultiWII but the original code no-longer has direct links.
60 The original documents as listed below can be found here https://code.google.com/archive/p/multiwii/source/default/source 
62 * `svn/branches/Hamburger/MultiWii-StickConfiguration-23_v0-5772156649.pdf`
63 * `multiwii/branches/Hamburger/MultiWii-StickConfiguration-23_v0-5772156649.odp`
65 ## Yaw control
67 While arming/disarming with sticks, your yaw stick will be moving to extreme values. In order to prevent your craft
68 from trying to yaw during arming/disarming while on the ground, your yaw input will not cause the craft to yaw when the
69 throttle is LOW (i.e. below the `min_check` setting).
71 For tricopters, you may want to retain the ability to yaw while on the ground, so that you can verify that your tail
72 servo is working correctly before takeoff. You can do this by setting `tri_unarmed_servo` to `ON` on the CLI (this is the
73 default). If you are having issues with your tail rotor contacting the ground during arm/disarm, you can set this to
74 `0` instead. Check this table to decide which setting will suit you:
76 <table>
77     <tr>
78         <th colspan="5">Is yaw control of the tricopter allowed?</th>
79     </tr>
80     <tr>
81         <th></th><th colspan="2">Disarmed</th><th colspan="2">Armed</th>
82     </tr>
83     <tr>
84         <th></th><th>Throttle low</th><th>Throttle normal</th><th>Throttle low</th><th>Throttle normal</th>
85     </tr>
86     <tr>
87         <td rowspan="2">tri_unarmed_servo = OFF</td><td>No</td><td>No</td><td>No</td><td>Yes</td>
88     </tr>
89     <tr>
90         <td>No</td><td>No</td><td>No</td><td>Yes</td>
91     </tr>
92     <tr>
93         <td rowspan="2">tri_unarmed_servo = ON</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td>
94     </tr>
95     <tr>
96         <td>Yes</td><td>Yes</td><td>Yes</td><td>Yes</td>
97     </tr>
98 </table>
101 ## Throttle settings and their interaction
103 `min_command` -
104 With motor stop enabled this is the command sent to the esc's when the throttle is below min_check or disarmed. With motor stop disabled, this is the command sent only when the copter is disarmed. This must be set well below motors spinning for safety. 
106 `min_check` - 
107 With switch arming mode is in use, lowering your throttle below min_check will result in motors spinning at min_throttle. When using the default stick arming, lowering your throttle below min_check will result in motors spinning at min_throttle and yaw being disabled so that you may arm/disarm. With motor stop enabled, lowering your throttle below min_check will also result in motors off and the esc's being sent min_command. Min_check must be set to a level that is 100% reliably met by the throttle throw. A setting too low may result in a dangerous condition where the copter can’t be disarmed. It is ok to set this below min_throttle because the FC will automaticly scale the output to the esc's
109 `min_throttle` -
110 Typically set to just above reliable spin up of all motors. Sometimes this is set slightly higher for prop stall prevention during advanced maneuvers or sometimes considerably higher to produce a desired result. When armed with motor stop off, your motors will spin at this command so keep that in mind from a safety stand point.  
112 `max_check` -
113 Throttle positions above this level will send max_command to the esc's. 
115 `max_throttle` -
116 This is the max command to the esc's from the flight controller. 
118 In depth videos explaining these terms are available from Joshua Bardwell here:
120 https://www.youtube.com/watch?v=WFU3VewGbbA
122 https://www.youtube.com/watch?v=YNRl0OTKRGA
125 ## Deadband
127 If yaw, roll or pitch sticks do not reliably return to centre or the radio has a lot of jitter around the centrepoint, deadband can be applied. The whole deadband value is applied *either side* of the center point rather than half the value above and half the value below. The deadband value will have an effect on stick endpoint values as the axis value will be reduced by the amount of deadband applied. 
129 `deadband` -
130 Applied to roll, pitch.
132 `yaw_deadband`
133 Only applied to yaw.