User Tools

Site Tools


config.h

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
config.h [2016/07/02 19:17]
sirdomsen [Flight control settings]
config.h [2017/11/09 22:08] (current)
sirdomsen
Line 2: Line 2:
  
 The "silverware" quadcopter software has a number of settings that can be changed by the user. The settings are placed in file **config.h**. After changing the settings, the project should be compiled again (build) and flashed to the quadcopter. Note that compiling the code also saves the changes to files automatically. The "silverware" quadcopter software has a number of settings that can be changed by the user. The settings are placed in file **config.h**. After changing the settings, the project should be compiled again (build) and flashed to the quadcopter. Note that compiling the code also saves the changes to files automatically.
 +
 +Other files can contain some settings too, notably the **pid.c** - for acro mode pids , **angle_pid.c** , for level mode pids, and **hardware.h** - depending on the particular code, hardware specific information.
  
 The settings are broken down into a few categories: The settings are broken down into a few categories:
  
   * Settings that affect flight control, such as rate , expo, and switch assignment   * Settings that affect flight control, such as rate , expo, and switch assignment
-  * Settings that control features +  * Settings enable features 
-  * settings that control quadcopter hardware, such as motor type and frequency+  * settings depending on quadcopter hardware, such as motor type and frequency
  
 This info is for the H8 mini code, some settings may differ slightly in some builds. This info is for the H8 mini code, some settings may differ slightly in some builds.
Line 17: Line 19:
 === Rate === === Rate ===
  
-The rate is changed by the following lines in control.h file. The unit is degrees / second, and is for low rates. So on low rates (stock tx) the quad will perform a 180 degree turn in 1 second at maximum control deflection.+The rate is changed by the following lines in config.h file. The unit is degrees / second, and (on some firmwares) is for low rates. So on low rates (stock tx) the quad will perform a 180 degree turn in 1 second at maximum control deflection.
  
 <code> <code>
Line 33: Line 35:
 #define HIRATEMULTI 2.0f #define HIRATEMULTI 2.0f
 #define HIRATEMULTIYAW 2.0f #define HIRATEMULTIYAW 2.0f
 +</code>
 +
 +**Note**: On some firmwares the **high**  rates are defined, and the multiplier is for lower rates instead.
 +
 +<code>
 +// rate in deg/sec
 +// for acro mode
 +#define MAX_RATE 360.0
 +#define MAX_RATEYAW 360.0
 +
 +#define LOW_RATES_MULTI 0.5f
 </code> </code>
  
Line 45: Line 58:
 <code> <code>
 // level / acro mode switch // level / acro mode switch
-// CH_AUX1 = gestures + 
-// 0 - flip +// CH_FLIP - 0 - flip 
-// 1 - expert +// CH_EXPERT - 1 - expert 
-// 2 - headfree +// CH_HEADFREE - 2 - headfree 
-// 3 - headingreturn +// CH_RTH - 3 - headingreturn 
-// 4 - AUX1 ( gestures <<v and>>v) +// CH_AUX1 - 4 - AUX1 ( gestures <<v and>>v) 
-// 5 - AUX2+ ( none +// CH_AUX2 - 5 - AUX2+ ( up - up - up 
-// 6 - Pitch trims +// CH_AUX3 - gravity channel ( on if inverted , updated at zero throttle) 
-// 7 - Roll trims +// CH_PIT_TRIM - 6 - Pitch trims 
-// 8 - Throttle trims +// CH_RLL_TRIM - 7 - Roll trims 
-// 9 - Yaw trims +// CH_THR_TRIM - 8 - Throttle trims 
-// 10 - on always +// CH_YAW_TRIM - 9 - Yaw trims 
-// 11 - off always +// CH_INV 10 - Inverted mode 
-// CH_ON , CH_OFF , CH_FLIP , CH_EXPERT +// CH_VID 7 - 
-// CH_HEADFREE , CH_RTH , CH_AUX1 , CH_AUX2 , CH_AUX3 , CH_AUX4 +// CH_PIC 8 - 
-// CH_PIT_TRIM, CH_RLL_TRIM+// CH_ON - 10 - on always 
 +// CH_OFF - 11 - off always 
 +// 
 +// devo can use DEVO_CHAN_5 - DEVO_CHAN_10 
 #define LEVELMODE CH_AUX1 #define LEVELMODE CH_AUX1
 </code> </code>
 +
 +Virtual channels: Not all channels are sent from the transmitter, some channels are based in the software, mainly the gesture controlled channels CH_AUX1 and CH_AUX2. A special virtual channel CH_AUX3 is used on the H101 for automatic inverted mode at take-off. This channel is on when the quad is inverted, and is updated at zero throttle.
  
 **Stock tx** **Stock tx**
Line 68: Line 87:
 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 "#define USE_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 "#define USE_STOCK_TX"
  
-//Do not enable "**#define USE_STOCK_TX**" if you want to use a devo or tx module!//+//Do not enable "**#define USE_STOCK_TX**" if you want to use a devo or tx module and the trims are set as a function!//
  
 **Devo tx** **Devo tx**
Line 88: Line 107:
     CHANNEL10,    // Return To Home     CHANNEL10,    // Return To Home
     CHANNEL11,    // Calibrate     CHANNEL11,    // Calibrate
 +    CHANNEL12,    // Throttle cut (BWHOOP)
 </code> </code>
  
-<font inherit/inherit;;#FF0000;;inherit>Th**e quad firmware supports "Flip", "headless" and "return home"**</font>+Silverware also supports to set simply a channel number as numbered in DeviationTX:<font 14px/inherit;;inherit;;inherit>DEVO_CHAN_5 - DEVO_CHAN_11 for use with deviaton tx or with nrf_multipro module ( and others ).</font>
  
 +<font 14px/inherit;;inherit;;inherit>**The Acro only versions of H8mini and H101**</font>** support a smaller set of channels ( legacy versions, no longer updated )**.
  
 ==== Software features ==== ==== Software features ====
Line 111: Line 132:
 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.
  
-Example: Suppose the quadcopter is at a 45 degrees angle. Because of the angle, only half the thrust will contribute to maintaining thrust. The other half will provide lateral acceleration. With "auto throttle" on, the software will increase throttle to compensate. As a result, the quad will maintain altitude better while maneuvering.+Example: Suppose the quadcopter is at a 45 degrees angle. Because of the angle, only half the thrust will contribute to maintaining height. The other half will provide lateral acceleration. With "auto throttle" on, the software will increase throttle to compensate. As a result, the quad will maintain altitude better while maneuvering.
  
 <code> <code>
Line 187: Line 208:
 </code> </code>
  
-=== to be continued ===+===   ===
  
  
config.h.1467479833.txt.gz · Last modified: 2016/07/02 19:17 by sirdomsen