Config.h

From MultiWii
Revision as of 05:42, 7 June 2012 by Kos (Talk | contribs) (Created page with "This file hold the configuration of the fligth controler ''explain what is in this file and what is in eeprom'' ''explain what is #define and // directive '' ==Global Sett...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This file hold the configuration of the fligth controler

explain what is in this file and what is in eeprom

explain what is #define and // directive

Global Setting

list settings

IMU settings

sensors orientation

you can change orientation of individual sensor

Changing sensors orientation is done with C #define directive, here the default orientation to start with :

//default board orientation
#if !defined(ACC_ORIENTATION) 
  #define ACC_ORIENTATION(X, Y, Z)  {accADC[ROLL]  = X; accADC[PITCH]  = Y; accADC[YAW]  = Z;}
#endif
#if !defined(GYRO_ORIENTATION) 
  #define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = X; gyroADC[PITCH] = Y; gyroADC[YAW] = Z;}
#endif
#if !defined(MAG_ORIENTATION) 
  #define MAG_ORIENTATION(X, Y, Z)  {magADC[ROLL]  = X; magADC[PITCH]  = Y; magADC[YAW]  = Z;}
#endif

Magnetic sensors orientation

  • X MAG:
    • ROLL RIGHT = positive
    • ROLL LEFT = negative
  • Y MAG
    • PITCH FORWARD = positive
    • PITCH backward = negative
  • Z MAG
    • should be positive
    • not move a lot if the multi remains flat.