This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
docs:config.h [2017/10/31 07:16] silverxxx |
docs:config.h [2017/10/31 11:50] (current) silverxxx |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Config.h settings ==== | + | ====== Config.h settings |
- | Settings found in config.h are used for customizing quadcopter flight settings and a number of software settings. | + | Settings found in config.h are used for customizing |
- | ==== Flight control settings | + | ==== Rate ==== |
- | + | ||
- | This settings comprise of rate control, high and low, expo, if needed to be performed by quad itself ( for stock tx) and switch config, mainly for level mode switching. | + | |
- | + | ||
- | === Rate === | + | |
The rate is changed by the following lines in config.h file. The unit is degrees / second. The number is the rotation rate at max stick deflection, for example 360 would perform a full turn in 1 second. | The rate is changed by the following lines in config.h file. The unit is degrees / second. The number is the rotation rate at max stick deflection, for example 360 would perform a full turn in 1 second. | ||
Line 24: | Line 20: | ||
</ | </ | ||
- | === Switches (auxiliary channels) === | + | ==== Expo ==== |
+ | |||
+ | Normally, expo would be set in the transmitter, | ||
+ | |||
+ | < | ||
+ | //#define DISABLE_EXPO | ||
+ | |||
+ | #define EXPO_XY 0.3 | ||
+ | #define EXPO_YAW 0.3 | ||
+ | </ | ||
+ | |||
+ | Range is 0.0 - 1.0, where zero is linear. Higher numbers are less sensitive near center, values 0.6 - 0.8 are commonly used ( 60% - 80% ) | ||
+ | |||
+ | ==== Switches (auxiliary channels) | ||
Switches/ | Switches/ | ||
Line 35: | Line 44: | ||
// level / acro mode switch | // level / acro mode switch | ||
- | // CH_FLIP | + | // CH_FLIP - flip |
- | // CH_EXPERT | + | // CH_EXPERT - expert |
- | // CH_HEADFREE | + | // CH_HEADFREE - headfree |
- | // CH_RTH | + | // CH_RTH - headingreturn |
- | // CH_AUX1 | + | // CH_AUX1 - AUX1 ( gestures <<v and>> |
- | // CH_PIT_TRIM | + | // CH_PIT_TRIM - Pitch trims ***1** |
- | // CH_RLL_TRIM | + | // CH_RLL_TRIM - Roll trims ***1** |
- | // CH_THR_TRIM | + | // CH_THR_TRIM - Throttle trims ***1** |
- | // CH_YAW_TRIM | + | // CH_YAW_TRIM - Yaw trims ***1** |
- | // CH_INV | + | // CH_INV - Inverted mode |
- | // CH_VID | + | // CH_VID |
- | // CH_PIC | + | // CH_PIC |
- | // CH_ON - 10 - on always | + | // CH_ON - on always |
- | // CH_OFF | + | // CH_OFF - off always |
- | // | + | |
// devo can use DEVO_CHAN_5 - DEVO_CHAN_10 | // devo can use DEVO_CHAN_5 - DEVO_CHAN_10 | ||
#define RATES CH_EXPERT | #define RATES CH_EXPERT | ||
- | |||
#define LEVELMODE CH_AUX1 | #define LEVELMODE CH_AUX1 | ||
- | |||
#define STARTFLIP CH_OFF | #define STARTFLIP CH_OFF | ||
+ | #define LEDS_ON CH_FLIP | ||
- | # | + | // ***1** |
</ | </ | ||
Line 64: | Line 72: | ||
Available channels depend on the //radio protocol// selected, the ones described are for Bayang protocol ( recomended ) | Available channels depend on the //radio protocol// selected, the ones described are for Bayang protocol ( recomended ) | ||
- | + | === Stock tx === | |
- | **Stock tx** | + | |
The trim buttons do not do anything in the stock tx. To use the trims for controlling a function, set the function channel to the trim (such as CH_PIT_TRIM - pitch trims) and enable "# | The trim buttons do not do anything in the stock tx. To use the trims for controlling a function, set the function channel to the trim (such as CH_PIT_TRIM - pitch trims) and enable "# | ||
//Do not enable " | //Do not enable " | ||
- | + | === Devo tx === | |
- | **Devo tx** | + | |
Silverware supports setting a channel number as found in DeviationTX:< | Silverware supports setting a channel number as found in DeviationTX:< | ||
Line 81: | Line 87: | ||
For the multimodule, | For the multimodule, | ||
- | ==== Other settings | + | ==== Auto throttle feature |
- | + | ||
- | **Auto throttle feature:** | + | |
The auto throttle will keep a constant upwards thrust as the quad leans in one direction. Used in level mode, usually. | The auto throttle will keep a constant upwards thrust as the quad leans in one direction. Used in level mode, usually. | ||
Line 93: | Line 97: | ||
</ | </ | ||
- | **Lower throttle feature** | + | ==== Lower throttle feature |
- | With this option enabled, the quadcopter will lower the throttle in order to maintain better control near full throttle. Without it (default) the quadcopter will usually lean slightly in one direction at full throttle, as there may not be enough control ability. (the motors can't increase over maximum). | + | With this option enabled, the quadcopter will lower the throttle in order to maintain better control near full throttle. Without it (default) the quadcopter will usually lean slightly in one direction at full throttle, as there may not be enough control ability. ( at least one motor is producing |
- | Usually, other firmwares have this option | + | Usually, other firmwares have this option |
- | An opposite option, increase thrust, is of use when throttle is near zero, and will improve control in such situations. | + | An opposite option, increase thrust, is of use when throttle is near zero, and will improve control in such situations. The increase throttle option should be used with care while tuning quadcopters, |
- | The "type 3" mix is more useful with brushless builds, it's instant acting, but it also has the largest throttle loss. | + | The "type 3" mix is more useful with brushless builds, it's instant acting, but it also has the largest throttle loss (or increase ). |
< | < | ||
Line 111: | Line 115: | ||
</ | </ | ||
- | \\ | + | ==== Throttle transient compensation |
- | **Throttle transient compensation | + | |
The TTCF feature improves throttle response of the quadcopter. The curve has been measured for 6mm motors, and it may not work the same with other motors. The factor can be adjusted also by adding the line to config.h. With this feature on, the quadcopter will react faster to throttle changes. | The TTCF feature improves throttle response of the quadcopter. The curve has been measured for 6mm motors, and it may not work the same with other motors. The factor can be adjusted also by adding the line to config.h. With this feature on, the quadcopter will react faster to throttle changes. | ||
Line 125: | Line 128: | ||
</ | </ | ||
- | **Gyro lpf filter (software)** | + | ==== Gyro lpf filter (software) |
The software lpf filter is a custom gyro filter, additional to the hardware filter which is present in the gyro device. The hardware filter is set around 43Hz by default, but for additional vibration removal, a software filter can be added. | The software lpf filter is a custom gyro filter, additional to the hardware filter which is present in the gyro device. The hardware filter is set around 43Hz by default, but for additional vibration removal, a software filter can be added. | ||
Line 148: | Line 151: | ||
</ | </ | ||
- | **Gyro lpf filter (hardware)** | + | ==== Gyro lpf filter (hardware) |
The hardware gyro lpf filter is part of the gyro integrated circuit. It's setting changes the frequency of the internal filter. The internal filter also has a latency which may affect pid P and D terms. A lower latency may be better, however vibration will limit the usefulness of higher gyro frequencies. The " | The hardware gyro lpf filter is part of the gyro integrated circuit. It's setting changes the frequency of the internal filter. The internal filter also has a latency which may affect pid P and D terms. A lower latency may be better, however vibration will limit the usefulness of higher gyro frequencies. The " | ||
Line 161: | Line 164: | ||
</ | </ | ||
- | **Motor filter feature** | + | ==== Motor filter feature |
There are 2 motor filtering options, a hanning 3 tap filter which reduces very high frequencies only, and a 1st order low pass filter that uses a coefficient as a setting. The motor filter has effects on pid tuning similar to those of the gyro low pass filters. | There are 2 motor filtering options, a hanning 3 tap filter which reduces very high frequencies only, and a 1st order low pass filter that uses a coefficient as a setting. The motor filter has effects on pid tuning similar to those of the gyro low pass filters. | ||
Line 190: | Line 193: | ||
#define BOLDCLASH_716MM_24K | #define BOLDCLASH_716MM_24K | ||
</ | </ | ||
+ | |||
+ | ==== Other settings ==== | ||
+ | |||
+ | There are a number of other settings in config.h, as well as in some other files. They are less common, and not described in this document. Additionally, | ||