Comparing sensitive data, confidential files or internal emails?

Most legal and privacy policies prohibit uploading sensitive data online. Diffchecker Desktop ensures your confidential information never leaves your computer. Work offline and compare documents securely.

Untitled diff

Created Diff never expires
26 removals
413 lines
25 additions
415 lines
/*************************************************************************************************/
/*************************************************************************************************/
/**** CONFIGURABLE PARAMETERS ****/
/**** CONFIGURABLE PARAMETERS ****/
/*************************************************************************************************/
/*************************************************************************************************/


/* this file consists of several sections
/* this file consists of several sections
* to create a working combination you must at least make your choices in section 1.
* to create a working combination you must at least make your choices in section 1.
* 1 - BASIC SETUP - you must select an option in every block.
* 1 - BASIC SETUP - you must select an option in every block.
* this assumes you have 4 channels connected to your arduino promini/nano/mega board with standard ESCs and servos.
* this assumes you have 4 channels connected to your arduino promini/nano/mega board with standard ESCs and servos.
* 2 - COPTER TYPE SPECIFIC OPTIONS - you likely want to check for options for your copter type
* 2 - COPTER TYPE SPECIFIC OPTIONS - you likely want to check for options for your copter type
* 3 - ALTERNATE CPUs & BOARDS - if you have
* 3 - ALTERNATE CPUs & BOARDS - if you have
* 4 - ALTERNATE SETUP - select alternate RX (SBUS, PPM, etc.), alternate ESC-range, etc. here
* 4 - ALTERNATE SETUP - select alternate RX (SBUS, PPM, etc.), alternate ESC-range, etc. here
* 5 - OPTIONAL FEATURES - enable nice to have features here (LCD, telemetry, battery monitor etc.)
* 5 - OPTIONAL FEATURES - enable nice to have features here (LCD, telemetry, battery monitor etc.)
* 6 - TUNING & DEVELOPER - if you know what you are doing; you have been warned
* 6 - TUNING & DEVELOPER - if you know what you are doing; you have been warned
*/
*/


/*************************************************************************************************/
/*************************************************************************************************/
/***************** ***************/
/***************** ***************/
/**************** SECTION 1 - BASIC SETUP *******/
/**************** SECTION 1 - BASIC SETUP *******/
/***************** ***************/
/***************** ***************/
/*************************************************************************************************/
/*************************************************************************************************/


/************************** The type of multicopter ****************************/
/************************** The type of multicopter ****************************/
//#define GIMBAL
//#define GIMBAL
//#define BI
//#define BI
//#define TRI
//#define TRI
//#define QUADP
//#define QUADP
//#define QUADX
//#define QUADX
//#define Y4
//#define Y4
//#define Y6
//#define Y6
//#define HEX6
//#define HEX6
//#define HEX6X
//#define HEX6X
//#define OCTOX8
//#define OCTOX8
//#define OCTOFLATP
//#define OCTOFLATP
//#define OCTOFLATX
//#define OCTOFLATX
//#define FLYING_WING
//#define FLYING_WING
//#define VTAIL4
//#define VTAIL4
//#define AIRPLANE // Howto setup =>>>http://fotoflygarn.blogspot.com/2012/03/how-to-setup-multiwii-airplane-same.html
#define AIRPLANE // Howto setup =>>>http://fotoflygarn.blogspot.com/2012/03/how-to-setup-multiwii-airplane-same.html
//*******************************************************
//*******************************************************
// Heli is beta test ......!
// Heli is beta test ......!
// Howto setup =>>> http://fotoflygarn.blogspot.se/2012/04/multiwii-helicopter.html
// Howto setup =>>> http://fotoflygarn.blogspot.se/2012/04/multiwii-helicopter.html
//#define HELI_120_CCPM // PatrikE Experimental
//#define HELI_120_CCPM // PatrikE Experimental
//#define HELI_90_DEG // PatrikE Experimental
//#define HELI_90_DEG // PatrikE Experimental
//*******************************************************
//*******************************************************




/**************************** Motor minthrottle *******************************/
/**************************** Motor minthrottle *******************************/
/* Set the minimum throttle command sent to the ESC (Electronic Speed Controller)
/* Set the minimum throttle command sent to the ESC (Electronic Speed Controller)
This is the minimum value that allow motors to run at a idle speed */
This is the minimum value that allow motors to run at a idle speed */
//#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A
//#define MINTHROTTLE 1300 // for Turnigy Plush ESCs 10A
//#define MINTHROTTLE 1120 // for Super Simple ESCs 10A
//#define MINTHROTTLE 1120 // for Super Simple ESCs 10A
//#define MINTHROTTLE 1220
//#define MINTHROTTLE 1220
#define MINTHROTTLE 1150
#define MINTHROTTLE 1100


/********************************** I2C speed ************************************/
/********************************** I2C speed ************************************/
#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
//#define I2C_SPEED 100000L //100kHz normal mode, this value must be used for a genuine WMP
//#define I2C_SPEED 400000L //400kHz fast mode, it works only with some WMP clones and with most current boards
#define I2C_SPEED 400000L //400kHz fast mode, it works only with some WMP clones and with most current boards


/*************************** Internal i2c Pullups ********************************/
/*************************** Internal i2c Pullups ********************************/
//enable internal I2C pull ups (in most cases it is better to use external pullups)
//enable internal I2C pull ups (in most cases it is better to use external pullups)
//#define INTERNAL_I2C_PULLUPS
//#define INTERNAL_I2C_PULLUPS


/**************************************************************************************/
/**************************************************************************************/
/***************** boards and sensor definitions ******************/
/***************** boards and sensor definitions ******************/
/**************************************************************************************/
/**************************************************************************************/


/*************************** Combined IMU Boards ********************************/
/*************************** Combined IMU Boards ********************************/
/* if you use a specific sensor board:
/* if you use a specific sensor board:
please submit any correction to this list.
please submit any correction to this list.
Note from Alex: I only own some boards
Note from Alex: I only own some boards
for other boards, I'm not sure, the info was gathered via rc forums, be cautious */
for other boards, I'm not sure, the info was gathered via rc forums, be cautious */
//#define FFIMUv1 // first 9DOF+baro board from Jussi, with HMC5843 <- confirmed by Alex
//#define FFIMUv1 // first 9DOF+baro board from Jussi, with HMC5843 <- confirmed by Alex
//#define FFIMUv2 // second version of 9DOF+baro board from Jussi, with HMC5883 <- confirmed by Alex
//#define FFIMUv2 // second version of 9DOF+baro board from Jussi, with HMC5883 <- confirmed by Alex
//#define FREEIMUv1 // v0.1 & v0.2 & v0.3 version of 9DOF board from Fabio
//#define FREEIMUv1 // v0.1 & v0.2 & v0.3 version of 9DOF board from Fabio
//#define FREEIMUv03 // FreeIMU v0.3 and v0.3.1
//#define FREEIMUv03 // FreeIMU v0.3 and v0.3.1
//#define FREEIMUv035 // FreeIMU v0.3.5 no baro
//#define FREEIMUv035 // FreeIMU v0.3.5 no baro
//#define FREEIMUv035_MS // FreeIMU v0.3.5_MS <- confirmed by Alex
//#define FREEIMUv035_MS // FreeIMU v0.3.5_MS <- confirmed by Alex
//#define FREEIMUv035_BMP // FreeIMU v0.3.5_BMP
//#define FREEIMUv035_BMP // FreeIMU v0.3.5_BMP
//#define FREEIMUv04 // FreeIMU v0.4 with MPU6050, HMC5883L, MS561101BA <- confirmed by Alex
//#define FREEIMUv04 // FreeIMU v0.4 with MPU6050, HMC5883L, MS561101BA <- confirmed by Alex
//#define FREEIMUv043 // same as FREEIMUv04 with final MPU6050 (with the right ACC scale)
//#define FREEIMUv043 // same as FREEIMUv04 with final MPU6050 (with the right ACC scale)
//#define NANOWII // the smallest multiwii FC based on MPU6050 + pro micro based proc <- confirmed by Alex
//#define NANOWII // the smallest multiwii FC based on MPU6050 + pro micro based proc <- confirmed by Alex
//#define PIPO // 9DOF board from erazz
//#define PIPO // 9DOF board from erazz
//#define QUADRINO // full FC board 9DOF+baro board from witespy with BMP085 baro <- confirmed by Alex
//#define QUADRINO // full FC board 9DOF+baro board from witespy with BMP085 baro <- confirmed by Alex
//#define QUADRINO_ZOOM // full FC board 9DOF+baro board from witespy second edition
//#define QUADRINO_ZOOM // full FC board 9DOF+baro board from witespy second edition
//#define QUADRINO_ZOOM_MS// full FC board 9DOF+baro board from witespy second edition <- confirmed by Alex
//#define QUADRINO_ZOOM_MS// full FC board 9DOF+baro board from witespy second edition <- confirmed by Alex
//#define ALLINONE // full FC board or standalone 9DOF+baro board from CSG_EU
//#define ALLINONE // full FC board or standalone 9DOF+baro board from CSG_EU
//#define AEROQUADSHIELDv2
//#define AEROQUADSHIELDv2
//#define ATAVRSBIN1 // Atmel 9DOF (Contribution by EOSBandi). requires 3.3V power.
//#define ATAVRSBIN1 // Atmel 9DOF (Contribution by EOSBandi). requires 3.3V power.
//#define SIRIUS // Sirius Navigator IMU <- confirmed by Alex
//#define SIRIUS // Sirius Navigator IMU <- confirmed by Alex
//#define SIRIUS600 // Sirius Navigator IMU using the WMP for the gyro
//#define SIRIUS600 // Sirius Navigator IMU using the WMP for the gyro
//#define MINIWII // Jussi's MiniWii Flight Controller <- confirmed by Alex
//#define MINIWII // Jussi's MiniWii Flight Controller <- confirmed by Alex
//#define CITRUSv2_1 // CITRUS from qcrc.ca
//#define CITRUSv2_1 // CITRUS from qcrc.ca
//#define CHERRY6DOFv1_0
//#define CHERRY6DOFv1_0
//#define DROTEK_10DOF // Drotek 10DOF with ITG3200, BMA180, HMC5883, BMP085, w or w/o LLC
//#define DROTEK_10DOF // Drotek 10DOF with ITG3200, BMA180, HMC5883, BMP085, w or w/o LLC
//#define DROTEK_10DOF_MS // Drotek 10DOF with ITG3200, BMA180, HMC5883, MS5611, LLC
//#define DROTEK_10DOF_MS // Drotek 10DOF with ITG3200, BMA180, HMC5883, MS5611, LLC
//#define DROTEK_6DOFv2 // Drotek 6DOF v2
//#define DROTEK_6DOFv2 // Drotek 6DOF v2
//#define DROTEK_6DOF_MPU // Drotek 6DOF with MPU6050
//#define DROTEK_6DOF_MPU // Drotek 6DOF with MPU6050
//#define DROTEK_10DOF_MPU//
//#define DROTEK_10DOF_MPU//
//#define MONGOOSE1_0 // mongoose 1.0 http://store.ckdevices.com/
//#define MONGOOSE1_0 // mongoose 1.0 http://store.ckdevices.com/
//#define CRIUS_LITE // Crius MultiWii Lite
#define CRIUS_LITE // Crius MultiWii Lite
//#define CRIUS_SE // Crius MultiWii SE
//#define CRIUS_SE // Crius MultiWii SE
//#define OPENLRSv2MULTI // OpenLRS v2 Multi Rc Receiver board including ITG3205 and ADXL345
//#define OPENLRSv2MULTI // OpenLRS v2 Multi Rc Receiver board including ITG3205 and ADXL345
//#define BOARD_PROTO_1 // with MPU6050 + HMC5883L + MS baro
//#define BOARD_PROTO_1 // with MPU6050 + HMC5883L + MS baro
//#define BOARD_PROTO_2 // with MPU6050 + slave MAG3110 + MS baro
//#define BOARD_PROTO_2 // with MPU6050 + slave MAG3110 + MS baro
//#define GY_80 // Chinese 10 DOF with L3G4200D ADXL345 HMC5883L BMP085, LLC
//#define GY_80 // Chinese 10 DOF with L3G4200D ADXL345 HMC5883L BMP085, LLC
//#define GY_85 // Chinese 9 DOF with ITG3205 ADXL345 HMC5883L LLC
//#define GY_85 // Chinese 9 DOF with ITG3205 ADXL345 HMC5883L LLC
//#define GY_86 // Chinese 10 DOF with MPU6050 HMC5883L MS5611, LLC
//#define GY_86 // Chinese 10 DOF with MPU6050 HMC5883L MS5611, LLC
//#define INNOVWORKS_10DOF // with ITG3200, BMA180, HMC5883, BMP085 available here http://www.diymulticopter.com
//#define INNOVWORKS_10DOF // with ITG3200, BMA180, HMC5883, BMP085 available here http://www.diymulticopter.com
//#define INNOVWORKS_6DOF // with ITG3200, BMA180 available here http://www.diymulticopter.com
//#define INNOVWORKS_6DOF // with ITG3200, BMA180 available here http://www.diymulticopter.com
//#define IOI_Mini_Multiwii// www.bambucopter.com
//#define IOI_Mini_Multiwii// www.bambucopter.com
//#define Bobs_6DOF_V1 // BobsQuads 6DOF V1 with ITG3200 & BMA180
//#define Bobs_6DOF_V1 // BobsQuads 6DOF V1 with ITG3200 & BMA180
//#define Bobs_9DOF_V1 // BobsQuads 9DOF V1 with ITG3200, BMA180 & HMC5883L
//#define Bobs_9DOF_V1 // BobsQuads 9DOF V1 with ITG3200, BMA180 & HMC5883L
//#define Bobs_10DOF_BMP_V1 // BobsQuads 10DOF V1 with ITG3200, BMA180, HMC5883L & BMP180 - BMP180 is software compatible with BMP085
//#define Bobs_10DOF_BMP_V1 // BobsQuads 10DOF V1 with ITG3200, BMA180, HMC5883L & BMP180 - BMP180 is software compatible with BMP085
//#define FLYDUINO_MPU
//#define FLYDUINO_MPU
/*************************** independent sensors ********************************/
/*************************** independent sensors ********************************/
//leave it commented if you already checked a specific board above
//leave it commented if you already checked a specific board above
/* I2C gyroscope */
/* I2C gyroscope */
//#define WMP
//#define WMP
//#define ITG3200
//#define ITG3200
//#define L3G4200D
//#define L3G4200D
//#define MPU6050 //combo + ACC
//#define MPU6050 //combo + ACC


/* I2C accelerometer */
/* I2C accelerometer */
//#define NUNCHUCK // if you want to use the nunckuk connected to a WMP
//#define NUNCHUCK // if you want to use the nunckuk connected to a WMP
//#define MMA745
//#define MMA745
//#define ADXL345
//#define ADXL345
//#define BMA020
//#define BMA020
//#define BMA180
//#define BMA180
//#define NUNCHACK // if you want to use the nunckuk as a standalone I2C ACC without WMP
//#define NUNCHACK // if you want to use the nunckuk as a standalone I2C ACC without WMP
//#define LIS3LV02
//#define LIS3LV02
//#define LSM303DLx_ACC
//#define LSM303DLx_ACC


/* I2C barometer */
/* I2C barometer */
//#define BMP085
//#define BMP085
//#define MS561101BA
//#define MS561101BA


/* I2C magnetometer */
/* I2C magnetometer */
//#define HMC5843
//#define HMC5843
//#define HMC5883
//#define HMC5883
//#define AK8975
//#define AK8975
//#define MAG3110
//#define MAG3110


// use the Devantech SRF i2c sensors, SRF08, SRF02
// use the Devantech SRF i2c sensors, SRF08, SRF02
// (for now, there is no difference in the SRF0x code, but we may want to differentiate in the future.)
// (for now, there is no difference in the SRF0x code, but we may want to differentiate in the future.)
//#define SRF02
//#define SRF02
//#define SRF08
//#define SRF08
//#define SRF10
//#define SRF10
//#define SRF23
//#define SRF23




/* ADC accelerometer */ // for 5DOF from sparkfun, uses analog PIN A1/A2/A3
/* ADC accelerometer */ // for 5DOF from sparkfun, uses analog PIN A1/A2/A3
//#define ADCACC
//#define ADCACC


//if you want to change to orientation of individual sensor
//if you want to change to orientation of individual sensor
//#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}
//#define ACC_ORIENTATION(X, Y, Z) {accADC[ROLL] = Y; accADC[PITCH] = -X; accADC[YAW] = Z;}
//#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
//#define GYRO_ORIENTATION(X, Y, Z) {gyroADC[ROLL] = -Y; gyroADC[PITCH] = X; gyroADC[YAW] = Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}
//#define MAG_ORIENTATION(X, Y, Z) {magADC[ROLL] = X; magADC[PITCH] = Y; magADC[YAW] = Z;}


/*************************************************************************************************/
/*************************************************************************************************/
/***************** ***************/
/***************** ***************/
/**************** SECTION 2 - COPTER TYPE SPECIFIC OPTIONS *******/
/**************** SECTION 2 - COPTER TYPE SPECIFIC OPTIONS *******/
/***************** ***************/
/***************** ***************/
/*************************************************************************************************/
/*************************************************************************************************/


/******************************** TRI *********************************/
/******************************** TRI *********************************/
#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
#define YAW_DIRECTION 1 // if you want to reverse the yaw correction direction
//#define YAW_DIRECTION -1
//#define YAW_DIRECTION -1
/* you can change the tricopter servo travel here */
/* you can change the tricopter servo travel here */
#define TRI_YAW_CONSTRAINT_MIN 1020
#define TRI_YAW_CONSTRAINT_MIN 1020
#define TRI_YAW_CONSTRAINT_MAX 2000
#define TRI_YAW_CONSTRAINT_MAX 2000
#define TRI_YAW_MIDDLE 1500 // tail servo center pos. - use this for initial trim; later trim midpoint via LCD
#define TRI_YAW_MIDDLE 1500 // tail servo center pos. - use this for initial trim; later trim midpoint via LCD




/******************************** ARM/DISARM *********************************/
/******************************** ARM/DISARM *********************************/
/* optionally disable stick combinations to arm/disarm the motors.
/* optionally disable stick combinations to arm/disarm the motors.
* In most cases one of the two options to arm/disarm via TX stick is sufficient */
* In most cases one of the two options to arm/disarm via TX stick is sufficient */
#define ALLOW_ARM_DISARM_VIA_TX_YAW
#define ALLOW_ARM_DISARM_VIA_TX_YAW
#define ALLOW_ARM_DISARM_VIA_TX_ROLL
//#define ALLOW_ARM_DISARM_VIA_TX_ROLL




/*********************** Cam Stabilisation ***********************/
/*********************** Cam Stabilisation & Tilt/Pan ***********************/
/* The following lines apply only for a pitch/roll tilt stabilization system
/* The following lines apply only for a pitch/roll tilt stabilization system
Uncomment the first line to activate it */
Uncomment the first line to activate it */
//#define SERVO_MIX_TILT // Simple CameraGimbal By Bledy http://youtu.be/zKGr6iR54vM
//#define SERVO_MIX_TILT // Simple CameraGimbal By Bledy http://youtu.be/zKGr6iR54vM
//#define SERVO_TILT
#define SERVO_TILT
#define AUXPITCH AUX3 // Selectable channels:= ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4
#define AUXROLL AUX4 // Selectable channels:= ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4
#define TILT_PITCH_MIN 1020 //servo travel min, don't set it below 1020
#define TILT_PITCH_MIN 1020 //servo travel min, don't set it below 1020
#define TILT_PITCH_MAX 2000 //servo travel max, max value=2000
#define TILT_PITCH_MAX 2000 //servo travel max, max value=2000
#define TILT_PITCH_MIDDLE 1500 //servo neutral value
#define TILT_PITCH_MIDDLE 1500 //servo neutral value
#define TILT_PITCH_PROP 10 //servo proportional (tied to angle) ; can be negative to invert movement
#define TILT_PITCH_PROP 10 //servo proportional (tied to angle) ; can be negative to invert movement
#define TILT_ROLL_MIN 1020
#define TILT_ROLL_MIN 1020
#define TILT_ROLL_MAX 2000
#define TILT_ROLL_MAX 2000
#define TILT_ROLL_MIDDLE 1500
#define TILT_ROLL_MIDDLE 1500
#define TILT_ROLL_PROP 10
#define TILT_ROLL_PROP 10



/* experimental
/* experimental
camera trigger function : activated via Rc Options in the GUI, servo output=A2 on promini */
camera trigger function : activated via Rc Options in the GUI, servo output=A2 on promini */
//#define CAMTRIG
//#define CAMTRIG
#define CAM_SERVO_HIGH 2000 // the position of HIGH state servo
#define CAM_SERVO_HIGH 2000 // the position of HIGH state servo
#define CAM_SERVO_LOW 1020 // the position of LOW state servo
#define CAM_SERVO_LOW 1020 // the position of LOW state servo
#define CAM_TIME_HIGH 1000 // the duration of HIGH state servo expressed in ms
#define CAM_TIME_HIGH 1000 // the duration of HIGH state servo expressed in ms
#define CAM_TIME_LOW 1000 // the duration of LOW state servo expressed in ms
#define CAM_TIME_LOW 1000 // the duration of LOW state servo expressed in ms


/*********************** Flying Wing ***********************/
/*********************** Flying Wing ***********************/
/* you can change change servo orientation and servo min/max values here */
/* you can change change servo orientation and servo min/max values here */
/* valid for all flight modes, even passThrough mode */
/* valid for all flight modes, even passThrough mode */
/* need to setup servo directions here; no need to swap servos amongst channels at rx */
/* need to setup servo directions here; no need to swap servos amongst channels at rx */
#define PITCH_DIRECTION_L 1 // left servo - pitch orientation
#define PITCH_DIRECTION_L 1 // left servo - pitch orientation
#define PITCH_DIRECTION_R -1 // right servo - pitch orientation (opposite sign to PITCH_DIRECTION_L, if servos are mounted in mirrored orientation)
#define PITCH_DIRECTION_R -1 // right servo - pitch orientation (opposite sign to PITCH_DIRECTION_L, if servos are mounted in mirrored orientation)
#define ROLL_DIRECTION_L 1 // left servo - roll orientation
#define ROLL_DIRECTION_L 1 // left servo - roll orientation
#define ROLL_DIRECTION_R 1 // right servo - roll orientation (same sign as ROLL_DIRECTION_L, if servos are mounted in mirrored orientation)
#define ROLL_DIRECTION_R 1 // right servo - roll orientation (same sign as ROLL_DIRECTION_L, if servos are mounted in mirrored orientation)
#define WING_LEFT_MID 1500 // left servo center pos. - use this for initial trim; later trim midpoint via LCD
#define WING_LEFT_MID 1500 // left servo center pos. - use this for initial trim; later trim midpoint via LCD
#define WING_RIGHT_MID 1500 // right servo center pos. - use this for initial trim; later trim midpoint via LCD
#define WING_RIGHT_MID 1500 // right servo center pos. - use this for initial trim; later trim midpoint via LCD
#define WING_LEFT_MIN 1020 // limit servo travel range must be inside [1020;2000]
#define WING_LEFT_MIN 1020 // limit servo travel range must be inside [1020;2000]
#define WING_LEFT_MAX 2000 // limit servo travel range must be inside [1020;2000]
#define WING_LEFT_MAX 2000 // limit servo travel range must be inside [1020;2000]
#define WING_RIGHT_MIN 1020 // limit servo travel range must be inside [1020;2000]
#define WING_RIGHT_MIN 1020 // limit servo travel range must be inside [1020;2000]
#define WING_RIGHT_MAX 2000 // limit servo travel range must be inside [1020;2000]
#define WING_RIGHT_MAX 2000 // limit servo travel range must be inside [1020;2000]


//******************************* !!!! Airplane Settings !!!! *********************************//
//******************************* !!!! Airplane Settings !!!! *********************************//
// Howto setup =>>> http://fotoflygarn.blogspot.com/2012/03/how-to-setup-multiwii-airplane-same.html
// Howto setup =>>> http://fotoflygarn.blogspot.com/2012/03/how-to-setup-multiwii-airplane-same.html


#define SERVO_RATES {100, 100, 100, 100, 100, 100, 100, 100} // Rates in 0-100%
#define SERVO_RATES {100, 100, 100, 100, 100, 100, 100, 100} // Rates in 0-100%
#define SERVO_DIRECTION { -1, 1, 1, -1, 1, 1, 1, 1 } // Invert servos by setting -1
#define SERVO_DIRECTION { -1, 1, 1, -1, -1, 1, 1, 1 } // Invert servos by setting -1

//#define FLAP_CHANNEL AUX4 // Define the Channel to controll Flaps with.If used.
#define FLAP_EP { 1500, 1650 } // Endpooints for flaps on a 2 way switch else set {1020,2000} and program in radio.
#define FLAP_INVERT { 1, -1 } // Change direction om flaps { Wing1, Wing2 }


#define FLAPERON_CHANNEL AUX1 // Define the Channel to controll Flaperons with.If used.
// Selectable channels:= ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4
#define FLAP_EP { 1500, 1800 } // Endpooints for flaps on a 2 way switch else set {1020,2000} and program in radio.
#define FLAP_INVERT { -1, 1} // Change direction om flaps { Wing1, Wing2}
#define LF_CHANNEL AUX1 // Define the Channel to controll Landing Flaps with. If used.
// Selectable channels:= ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4 -- Uses servo[2] / A2. Must not be used together with #CAMTRIG!!!
#define LF_EP { 1500, 1900 } // Endpooints for flaps on a 2 way switch else set {1020,2000} and program in radio.
#define LF_INVERT -1 // Change direction of Landing Flaps -1/1
//*************************** !!!! Common for Heli & Airplane !!!! ****************************//
//*************************** !!!! Common for Heli & Airplane !!!! ****************************//


//#define D12_POWER // Use D12 on PROMINI to power sensors. Will disable servo[4] on D12
//#define D12_POWER // Use D12 on PROMINI to power sensors. Will disable servo[4] on D12
#define SERVO_OFFSET { 0, 0, 0, 0, 0, 0, 0, 0 } // Adjust Servo MID Offset & Swash angles
#define SERVO_OFFSET { 0, 0, 0, 0, 0, 0, 0, 0 } // Adjust Servo MID Offset & Swash angles
// Selectable channels:= ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4


//****************************** !!!! Hellicopter Settings !!!! *******************************//
//****************************** !!!! Hellicopter Settings !!!! *******************************//
// Channel to control CollectivePitch
// Channel to control CollectivePitch
#define COLLECTIVE_PITCH THROTTLE
#define COLLECTIVE_PITCH THROTTLE
// Set Maximum available movement for the servos. Depending on modell.
// Set Maximum available movement for the servos. Depending on modell.
#define SERVO_ENDPOINT_HIGH {2000,2000,2000,2000,2000,2000,2000,2000};
#define SERVO_ENDPOINT_HIGH {2000,2000,2000,2000,2000,2000,2000,2000};
#define SERVO_ENDPOINT_LOW {1020,1020,1020,1020,1020,1020,1020,1020};
#define SERVO_ENDPOINT_LOW {1020,1020,1020,1020,1020,1020,1020,1020};


// Limit the range of Collective Pitch. 100% is Full Range each way and position for Zero Pitch
// Limit the range of Collective Pitch. 100% is Full Range each way and position for Zero Pitch
#define COLLECTIVE_RANGE { 80, 1500, 80 }// {Min%, ZeroPitch, Max%}.
#define COLLECTIVE_RANGE { 80, 1500, 80 }// {Min%, ZeroPitch, Max%}.
#define YAW_CENTER 1500 // Use servo[5] SERVO_ENDPOINT_HIGH/LOW for the endpoits.
#define YAW_CENTER 1500 // Use servo[5] SERVO_ENDPOINT_HIGH/LOW for the endpoits.
#define YAWMOTOR 0 // If a motor is useed as YAW Set to 1 else set to 0.
#define YAWMOTOR 0 // If a motor is useed as YAW Set to 1 else set to 0.


// Servo mixing for heli 120 Use 1/10 fractions (ex.5 = 5/10 = 1/2)
// Servo mixing for heli 120 Use 1/10 fractions (ex.5 = 5/10 = 1/2)
// {Coll,Nick,Roll}
// {Coll,Nick,Roll}
#define SERVO_NICK { +10, -10, -0 }
#define SERVO_NICK { +10, -10, -0 }
#define SERVO_LEFT { +10, +5, +10 }
#define SERVO_LEFT { +10, +5, +10 }
#define SERVO_RIGHT { +10, +5, -10 }
#define SERVO_RIGHT { +10, +5, -10 }


// Servo mixing for heli 90
// Servo mixing for heli 90
// {Coll,Nick,Roll}
// {Coll,Nick,Roll}
#define SERVO_DIRECTIONS { +1, -1, -1 } // -1 will invert servo
#define SERVO_DIRECTIONS { +1, -1, -1 } // -1 will invert servo
// Limit Maximum controll for Roll & Nick in 0-100%
// Limit Maximum controll for Roll & Nick in 0-100%
#define CONTROLL_RANGE { 100, 100 } // { ROLL,PITCH }
#define CONTROLL_RANGE { 100, 100 } // { ROLL,PITCH }




/*************************************************************************************************/
/*************************************************************************************************/
/***************** ***************/
/***************** ***************/
/**************** SECTION 3 - ALTERNATE CPUs & BOARDS *******/
/**************** SECTION 3 - ALTERNATE CPUs & BOARDS *******/
/***************** ***************/
/***************** ***************/
/*************************************************************************************************/
/*************************************************************************************************/


/**************************************************************************************/
/**************************************************************************************/
/******** Promini Specifig Settings ********************/
/******** Promini Specifig Settings ********************/
/**************************************************************************************/
/**************************************************************************************/


/************************** Hexa Motor 5 & 6 Pins *******************************/
/************************** Hexa Motor 5 & 6 Pins *******************************/
/* PIN A0 and A1 instead of PIN D5 & D6 for 6 motors config and promini config
/* PIN A0 and A1 instead of PIN D5 & D6 for 6 motors config and promini config
This mod allow the use of a standard receiver on a pro mini
This mod allow the use of a standard receiver on a pro mini
(no need to use a PPM sum receiver)
(no need to use a PPM sum receiver)
*/
*/
//#define A0_A1_PIN_HEX
//#define A0_A1_PIN_HEX


/********************************* Aux 2 Pin ***********************************/
/********************************* Aux 2 Pin ***********************************/
/* possibility to use PIN8 or PIN12 as the AUX2 RC input
/* possibility to use PIN8 or PIN12 as the AUX2 RC input
it deactivates in this case the POWER PIN (pin 12) or the BUZZER PIN (pin 8)
it deactivates in this case the POWER PIN (pin 12) or the BUZZER PIN (pin 8)
*/
*/
//#define RCAUXPIN8
//#define RCAUXPIN8
//#define RCAUXPIN12
//#define RCAUXPIN12


/**************************************************************************************/
/**************************************************************************************/
/***************** Teensy 2.0 Support(BETA) ******************/
/***************** Teensy 2.0 Support(BETA) ******************/
/**************************************************************************************/
/**************************************************************************************/
// uncomment this if you use a teensy 2.0 with teensyduino
// uncomment this if you use a teensy 2.0 with teensyduino
// it needs to run at 16MHz
// it needs to run at 16MHz
//#define TEENSY20
//#define TEENSY20


/**************************************************************************************/
/**************************************************************************************/
/******** Settings for ProMicro, Leonardo and other Atmega32u4 Boards ***********/
/******** Settings for ProMicro, Leonardo and other Atmega32u4 Boards ***********/
/**************************************************************************************/
/**************************************************************************************/


/********************************* pin Layout **********************************/
/********************************* pin Layout **********************************/
// activate this for a better pinlayout if all pins can be used => not possible on ProMicro!
// activate this for a better pinlayout if all pins can be used => not possible on ProMicro!
//#define A32U4ALLPINS
//#define A32U4ALLPINS


/********************************** PWM Setup **********************************/
/********************************** PWM Setup **********************************/
// activate all 6 hardware PWM outputs Motor 5 = D11 and 6 = D13. => not possible on ProMicro! (untested!)
// activate all 6 hardware PWM outputs Motor 5 = D11 and 6 = D13. => not possible on ProMicro! (untested!)
// if activated:
// if activated:
// Motor 1-6 = 10-bit hardware PWM
// Motor 1-6 = 10-bit hardware PWM
// Motor 7-8 = 8-bit Software PWM
// Motor 7-8 = 8-bit Software PWM
// Servos = 8-bit Software PWM
// Servos = 8-bit Software PWM
// if deactivated:
// if deactivated:
// Motor 1-4 = 10-bit hardware PWM
// Motor 1-4 = 10-bit hardware PWM
// Motor 5-8 = 10-bit Software PWM
// Motor 5-8 = 10-bit Software PWM
// Servos = 10-bit Software PWM
// Servos = 10-bit Software PWM
//#define HWPWM6
//#define HWPWM6


/********************************** Aux 2 Pin **********************************/
/********************************** Aux 2 Pin **********************************/
// aux2 pin on pin RXO
// aux2 pin on pin RXO
//#define RCAUX2PINRXO
//#define RCAUX2PINRXO


// aux2 pin on pin D17 (RXLED)
// aux2 pin on pin D17 (RXLED)
//#define RCAUX2PIND17
//#define RCAUX2PIND17


/********************************** Buzzer Pin **********************************/
/********************************** Buzzer Pin **********************************/
// this moves the Buzzer pin from TXO to D8 for use with ppm sum or spectrum sat. RX (not needed if A32U4ALLPINS is active)
// this moves the Buzzer pin from TXO to D8 for use with ppm sum or spectrum sat. RX (not needed if A32U4ALLPINS is active)
// #define D8BUZZER
#define D8BUZZER


/*********************** Promicro version related ****************************/
/*********************** Promicro version related ****************************/
// Inverted status LED for Promicro ver 10.
// Inverted status LED for Promicro ver 10.
//#define PROMICRO10
//#define PROMICRO10




/*************************************************************************************************/
/*************************************************************************************************/
/***************** ***************/
/***************** ***************/
/**************** SECTION 4 - ALTERNATE SETUP *******/
/**************** SECTION 4 - ALTERNATE SETUP *******/
/***************** ***************/
/***************** ***************/
/*************************************************************************************************/
/*************************************************************************************************/


/****** Serial com speed *********************************/
/****** Serial com speed *********************************/
/* This is the speed of the serial interface. 115200 kbit/s is the best option for a USB connection.*/
/* This is the speed of the serial interface. 115200 kbit/s is the best option for a USB connection.*/
#define SERIAL_COM_SPEED 115200
#define SERIAL_COM_SPEED 115200


/* interleaving delay in micro seconds between 2 readings WMP/NK in a WMP+NK config
/* interleaving delay in micro seconds between 2 readings WMP/NK in a WMP+NK config
if the ACC calibration time is very long (20 or 30s), try to increase this delay up to 4000
if the ACC calibration time is very long (20 or 30s), try to increase this delay up to 4000
it is relevent only for a conf with NK */
it is relevent only for a conf with NK */
#define INTERLEAVING_DELAY 3000
#define INTERLEAVING_DELAY 3000


/* when there is an error on I2C bus, we neutralize the values during a short time. expressed in microseconds
/* when there is an error on I2C bus, we neutralize the values during a short time. expressed in microseconds
it is relevent only for a conf with at least a WMP */
it is relevent only for a conf with at least a WMP */
#define NEUTRALIZE_DELAY 100000
#define NEUTRALIZE_DELAY 100000


/**************************************************************************************/
/**************************************************************************************/
/******** Gyro filters ********************/
/******** Gyro filters ********************/
/**************************************************************************************/
/**************************************************************************************/


/********************* Lowpass filter for some gyros ****************************/
/********************* Lowpass filter for some gyros ****************************/


/* ITG3200 & ITG3205 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
/* ITG3200 & ITG3205 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
balancing options ran out. Uncomment only one option!
balancing options ran out. Uncomment only one option!
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
//#define ITG3200_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define ITG3200_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define ITG3200_LPF_188HZ
//#define ITG3200_LPF_188HZ
//#define ITG3200_LPF_98HZ
//#define ITG3200_LPF_98HZ
//#define ITG3200_LPF_42HZ
//#define ITG3200_LPF_42HZ
//#define ITG3200_LPF_20HZ
//#define ITG3200_LPF_20HZ
//#define ITG3200_LPF_10HZ // Use this only in extreme cases, rather change motors and/or props
//#define ITG3200_LPF_10HZ // Use this only in extreme cases, rather change motors and/or props


/* MPU6050 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
/* MPU6050 Low pass filter setting. In case you cannot eliminate all vibrations to the Gyro, you can try
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
to decrease the LPF frequency, only one step per try. As soon as twitching gone, stick with that setting.
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
It will not help on feedback wobbles, so change only when copter is randomly twiching and all dampening and
balancing options ran out. Uncomment only one option!
balancing options ran out. Uncomment only one option!
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
IMPORTANT! Change low pass filter setting changes PID behaviour, so retune your PID's after changing LPF.*/
//#define MPU6050_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define MPU6050_LPF_256HZ // This is the default setting, no need to uncomment, just for reference
//#define MPU6050_LPF_188HZ
//#define MPU6050_LPF_188HZ
//#define MPU6050_LPF_98HZ
//#define MPU6050_LPF_98HZ
//#define MPU6050_LPF_42HZ
//#define MPU6050_LPF_42HZ
//#define MPU6050_LPF_20HZ
//#define MPU6050_LPF_20HZ
//#define MPU6050_LPF_10HZ
//#define MPU6050_LPF_10HZ
//#define MPU6050_LPF_5HZ // Use this only in extreme cases, rather change motors and/or props
//#define MPU6050_LPF_5HZ // Use this only in extreme cases, rather change motors and/or props






/****** Gyro smoothing **********************************/
/****** Gyro smoothing **********************************/
/* GYRO_SMOOTHING. In case you cannot reduce vibrations _and_ _after_ you have tried the low pass filter options, you
/* GYRO_SMOOTHING. In case you cannot reduce vibrations _and_ _after_ you have tried the low pass filter options, you
may try this gyro smoothing via averaging. Not suitable for multicopters!
may try this gyro smoothing via averaging. Not suitable for multicopters!
Good results for helicopter, airplanes and flying wings (foamies) with lots of vibrations.*/
Good results for helicopter, airplanes and flying wings (foamies) with lots of vibrations.*/
//#define GYRO_SMOOTHING {20, 20, 3} // separate averaging ranges for roll, pitch, yaw
//#define GYRO_SMOOTHING {20, 20, 3} // separate averaging ranges for roll, pitch, yaw




/************************ Moving Average Gyros **********************************/
/************************ Moving Average Gyros **********************************/
//#define MMGYRO // Active Moving Average Function for Gyros
//#define MMGYRO // Active Moving Average Function for Gyros
//#define MMGYROVECTORLENGHT 10 // Lenght of Moving Average Vector
//#define MMGYROVECTORLENGHT 10 // Lenght of Moving Average Vector
// Moving Average ServoGimbal Signal Output
// Moving Average ServoGimbal Signal Output
//#define MMSERVOGIMBAL // Active Output Moving Average Function for Servos Gimbal
//#define MMSERVOGIMBAL // Active Output Moving Average Function for Servos Gimbal
//#define MMSERVOGIMBALVECTORLENGHT 32 // Lenght of Moving Average Vector
//#define MMSERVOGIMBALVECTORLENGHT 32 // Lenght of Moving Average Vector




/**************************************************************************************/
/**************************************************************************************/
/******** special receiver types ********************/
/******** special receiver types ********************/
/**************************************************************************************/
/**************************************************************************************/


/**************************** PPM Sum Reciver ***********************************/
/**************************** PPM Sum Reciver ***********************************/
/* The following lines apply only for specific receiver with only one PPM sum signal, on digital PIN 2
/* The following lines apply only for specific receiver with only one PPM sum signal, on digital PIN 2
IF YOUR RECEIVER IS NOT CONCERNED, DON'T UNCOMMENT ANYTHING. Note this is mandatory for a Y6 setup on a promini
IF YOUR RECEIVER IS NOT CONCERNED, DON'T UNCOMMENT ANYTHING. Note this is mandatory for a Y6 setup on a promini
Select the right line depending on your radio brand. Feel free to modify the order in your PPM order is different */
Select the right line depending on your radio brand. Feel free to modify the order in your PPM order is different */
//#define SERIAL_SUM_PPM PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4 //For Graupner/Spektrum
//#define SERIAL_SUM_PPM PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4 //For Graupner/Spektrum
//#define SERIAL_SUM_PPM ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4 //For Robe/Hitec/Futaba
//#define SERIAL_SUM_PPM ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4 //For Robe/Hitec/Futaba
//#define SERIAL_SUM_PPM PITCH,ROLL,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4 //For some Hitec/Sanwa/Others
#define SERIA

/********************** Spektrum Satellite Reciver *******************************/
/* The following lines apply only for Spektrum Satellite Receiver
Spektrum Satellites are 3V devices. DO NOT connect to 5V!
For MEGA boards, attach sat grey wire to RX1, pin 19. Sat black wire to ground. Sat orange wire to Mega board's 3.3V (or any other 3V to 3.3V source).
For PROMINI, attach sat grey to RX0. Attach sat black to ground.
There is no 3.3V source on a pro mini; you can either use a different 3V source, or attach orange to 5V with a 3V regulator in-line (such as http://se