1#ifndefCONFIG_H_
2
#defineCONFIG_H_
3
4
/*
***********************************************************************************************
*/
5
/*
***可配置参数***
*/
6
/*
***********************************************************************************************
*/
7
/*
8
该文件由多个部分组成
9
*要创建一个工作组合,你必须至少在一节中做出选择。
10
*1-基本设置-您必须在基本设置中选择一个选项。
11
*以连接四个通道的标准电调和电机为例。
12
*2-您可能需要检查飞机类型选项的设置
13
*3-设置无线遥控系统
14
*4-替代的CPU和主板-如果你有
15
*5-替代设置-选择替代的RX(SBU,PPM,等),替代ESC范围,等在这里
16
*6-可选功能-这里有一些很好的功能可以飞行模式,LCD,遥测、电池监控等)
17
*7-调试和开发-如果你知道你在做什么,你已经被警告过了。
18
*(ESC动态校准、电机/支撑平衡、诊断、节省内存...)
19
*8-不推荐使用-这些功能将在未来版本中删除
20
*/
21
/*
Notes:
22
*1.在注释中用(*)存储标记的参数eeprom通过串口监控器或LCD调节。
23
*2.在注释中用(**)标记的参数被储存在eeprom并且可以通过GUI调节
24
*/
25
26
27
/*
***********************************************************************************************
28 /* **************** ************** */ 29 /* *************** SECTION 1 - 基本设置 ****** */ 30 /* **************** ************** */ 31 /* *********************************************************************************************** */ 32 33 /* ************************* 多旋翼飞行器种类 *************************** */ 34 // #define GIMBAL // 自稳云台 35 // #define BI // 两轴 36 // #define TRI // 三轴 37 // #define QUADP // 四轴十字模式 38 #define QUADX // 四轴X模式 39 // #define Y4 // 四轴Y模式 40 // #define Y6 // 六轴Y模式 41 // #define HEX6 // 六轴 42 // #define HEX6X // 六轴X模式 43 // #define HEX6H // 新类型 六轴H模式 44 // #define OCTOX8 // 八轴 45 // #define OCTOFLATP // 八轴十字 46 // #define OCTOFLATX // 八轴X 47 // #define FLYING_WING // 飞翼 48 // #define VTAIL4 // 四轴v尾 49 // #define AIRPLANE // 固定翼 50 // #define SINGLECOPTER // 单旋翼 51 // #define DUALCOPTER // 双旋翼 52 // #define HELI_120_CCPM // 120度CCPM直升机 53 // #define HELI_90_DEG // 90度斜盘直升机 54 55 /* *************************** 电机最小油门 ****************************** */ 56 /* 设定发送至电调(ESC,Electronic Speed Controller)的最小油门命令 57 该最小值允许电机运行在怠速上 即维持电机怠速的最低油门值. */ 58 // #define MINTHROTTLE 1300 // 用于Turnigy Plush ESCs 10A 59 // #define MINTHROTTLE 1120 // 用于Super Simple ESCs 10A 60 // #define MINTHROTTLE 1064 // 特殊的ESC (simonk蜘蛛电调) 61 // #define MINTHROTTLE 1050 // 用于brushed ESC比如ladybird 62 #define MINTHROTTLE 1150 // (*) 63 64 /* *************************** 电机最大油门 ****************************** */ 65 /* ESC全功率工作的最大值,该值最大可增至2000 */ 66 #define MAXTHROTTLE 1850 67 68 /* *************************** 最小命令 ****************************** */ 69 /* 该值用于未解锁时的ESC 70 在某些情况下,用于一些特殊的电调该值必须降至900,否则电调会初始化失败 71 OYUZIQI提示 用场效应管驱动空心杯时上电若微微转动可适当降低此数值 */ 72 #define MINCOMMAND 1000 73 74 /* ********************************* I2C速度 *********************************** */ 75 // #define I2C_SPEED 100000L // 100kHz普通模式,正品WPM必须使用该值 76 #define I2C_SPEED 400000L // 400kHz快速模式,仅用于一些山寨WPM (可用于GY系列模块) 77 78 /* ************************** 内部i2c上拉 ******************************* */ 79 /* 启用内部I2C上拉(在多数情况下,使用外部上拉更佳)(GY系列模块自带外部上拉) */ 80 // #define INTERNAL_I2C_PULLUPS 81 82 /* ********************************* 循环周期时间 ***************************** */ 83 #define LOOP_TIME 2800 84 85 /* ************************************************************************************ */ 86 /* **************** 主控板与传感器定义 ***************** */ 87 /* ************************************************************************************ */ 88 89 /* ************************** 传感器组合板(传感器集成板) ******************************* */ 90 /* 如果你在使用特定的传感器板: 91 请提交改动到这个列表。 92 来自Alex的提示:我只有其中一些板子,对于其他板子,我不能确保好用,信息由遥控论坛生成,请小心使用 * 93 /*=======================友情提示========================== 94 下面有一些集成板子淘宝上可以淘到的,如GY_XX系列比较划算。 95 推荐GY_86,MPU6050\HMC5883L\MS5611的组合挺划算。BMP的180,085气压计确实不怎么样。 96 */ 97 98 99 // #define FFIMUv1 // first 9DOF+baro board from Jussi, with HMC5843 <- confirmed by Alex 100 // #define FFIMUv2 // second version of 9DOF+baro board from Jussi, with HMC5883 <- confirmed by Alex 101 // #define FREEIMUv1 // v0.1 & v0.2 & v0.3 version of 9DOF board from Fabio 102 // #define FREEIMUv03 // FreeIMU v0.3 and v0.3.1 103 // #define FREEIMUv035 // FreeIMU v0.3.5 no baro 104 // #define FREEIMUv035_MS // FreeIMU v0.3.5_MS <- confirmed by Alex 105 // #define FREEIMUv035_BMP // FreeIMU v0.3.5_BMP 106 // #define FREEIMUv04 // FreeIMU v0.4 with MPU6050, HMC5883L, MS561101BA <- confirmed by Alex 107 // #define FREEIMUv043 // same as FREEIMUv04 with final MPU6050 (with the right ACC scale) 108 // #define NANOWII // the smallest multiwii FC based on MPU6050 + pro micro based proc <- confirmed by Alex 109 // #define PIPO // 9DOF board from erazz 110 // #define QUADRINO // full FC board 9DOF+baro board from witespy with BMP085 baro <- confirmed by Alex 111 // #define QUADRINO_ZOOM // full FC board 9DOF+baro board from witespy second edition 112 // #define QUADRINO_ZOOM_MS // full FC board 9DOF+baro board from witespy second edition <- confirmed by Alex 113 // #define ALLINONE // full FC board or standalone 9DOF+baro board from CSG_EU 114 // #define AEROQUADSHIELDv2 115 // #define ATAVRSBIN1 // Atmel 9DOF (Contribution by EOSBandi). requires 3.3V power. 116 // #define SIRIUS // Sirius Navigator IMU <- confirmed by Alex 117 // #define SIRIUSGPS // Sirius Navigator IMU using external MAG on GPS board <- confirmed by Alex 118 // #define SIRIUS600 // Sirius Navigator IMU using the WMP for the gyro 119 // #define SIRIUS_AIR // Sirius Navigator IMU 6050 32U4 from MultiWiiCopter.com <- confirmed by Alex 120 // #define SIRIUS_AIR_GPS // Sirius Navigator IMU 6050 32U4 from MultiWiiCopter.com with GPS/MAG remote located 121 // #define SIRIUS_MEGAv5_OSD // Paris_Sirius™ ITG3050,BMA280,MS5611,HMC5883,uBlox http://www.Multiwiicopter.com <- confirmed by Alex 122 // #define MINIWII // Jussi's MiniWii Flight Controller <- confirmed by Alex 123 // #define MICROWII // MicroWii 10DOF with ATmega32u4, MPU6050, HMC5883L, MS561101BA from http://flyduino.net/ 124 // #define CITRUSv2_1 // CITRUS from qcrc.ca 125 // #define CHERRY6DOFv1_0 126 // #define DROTEK_10DOF // Drotek 10DOF with ITG3200, BMA180, HMC5883, BMP085, w or w/o LLC 127 // #define DROTEK_10DOF_MS // Drotek 10DOF with ITG3200, BMA180, HMC5883, MS5611, LLC 128 // #define DROTEK_6DOFv2 // Drotek 6DOF v2 129 // #define DROTEK_6DOF_MPU // Drotek 6DOF with MPU6050 130 // #define DROTEK_10DOF_MPU // 131 // #define MONGOOSE1_0 // mongoose 1.0 http://store.ckdevices.com/ 132 // #define CRIUS_LITE // Crius MultiWii Lite 133 // #define CRIUS_SE // Crius MultiWii SE 134 // #define CRIUS_SE_v2_0 // Crius MultiWii SE 2.0 with MPU6050, HMC5883 and BMP085 135 // #define OPENLRSv2MULTI // OpenLRS v2 Multi Rc Receiver board including ITG3205 and ADXL345 136 // #define BOARD_PROTO_1 // with MPU6050 + HMC5883L + MS baro 137 // #define BOARD_PROTO_2 // with MPU6050 + slave MAG3110 + MS baro 138 // #define GY_80 // Chinese 10 DOF with L3G4200D ADXL345 HMC5883L BMP085, LLC 139 // #define GY_85 // Chinese 9 DOF with ITG3205 ADXL345 HMC5883L LLC 140 // #define GY_86 // Chinese 10 DOF with MPU6050 HMC5883L MS5611, LLC 141 #define GY_88 // Chinese 10 DOF with MPU6050 HMC5883L BMP085, LLC 142 // #define GY_521 // Chinese 6 DOF with MPU6050, LLC 143 // #define INNOVWORKS_10DOF // with ITG3200, BMA180, HMC5883, BMP085 available here http://www.diymulticopter.com 144 // #define INNOVWORKS_6DOF // with ITG3200, BMA180 available here http://www.diymulticopter.com 145 // #define MultiWiiMega // MEGA + MPU6050+HMC5883L+MS5611 available here http://www.diymulticopter.com 146 // #define PROTO_DIY // 10DOF mega board 147 // #define IOI_MINI_MULTIWII // www.bambucopter.com 148 // #define Bobs_6DOF_V1 // BobsQuads 6DOF V1 with ITG3200 & BMA180 149 // #define Bobs_9DOF_V1 // BobsQuads 9DOF V1 with ITG3200, BMA180 & HMC5883L 150 // #define Bobs_10DOF_BMP_V1 // BobsQuads 10DOF V1 with ITG3200, BMA180, HMC5883L & BMP180 - BMP180 is software compatible with BMP085 151 // #define FLYDUINO_MPU // MPU6050 Break Out onboard 3.3V reg 152 // #define CRIUS_AIO_PRO 153 // #define DESQUARED6DOFV2GO // DEsquared V2 with ITG3200 only 154 // #define DESQUARED6DOFV4 // DEsquared V4 with MPU6050 155 // #define LADYBIRD 156 // #define MEGAWAP_V2_STD // available here: http://www.multircshop.com <- confirmed by Alex 157 // #define MEGAWAP_V2_ADV 158 // #define HK_MultiWii_SE_V2 // Hobbyking board with MPU6050 + HMC5883L + BMP085 159 // #define HK_MultiWii_328P // Also labeled "Hobbybro" on the back. ITG3205 + BMA180 + BMP085 + NMC5583L + DSM2 Connector (Spektrum Satellite) 160 // #define RCNet_FC // RCNet FC with MPU6050 and MS561101BA http://www.rcnet.com 161 // #define RCNet_FC_GPS // RCNet FC with MPU6050 + MS561101BA + HMC5883L + UBLOX GPS http://www.rcnet.com 162 // #define FLYDU_ULTRA // MEGA+10DOF+MT3339 FC 163 // #define DIYFLYING_MAGE_V1 // diyflying 10DOF mega board with MPU6050 + HMC5883L + BMP085 http://www.indoor-flying.hk 164 // #define MultiWii_32U4_SE // Hextronik MultiWii_32U4_SE 165 // #define MultiWii_32U4_SE_no_baro // Hextronik MultiWii_32U4_SE without the MS561101BA to free flash-memory for other functions 166 // #define Flyduino9DOF // Flyduino 9DOF IMU MPU6050+HMC5883l 167 // #define Nano_Plane // Multiwii Plane version with tail-front LSM330 sensor http://www.radiosait.ru/en/page_5324.html 168 169 /* ************************** 独立的传感器 ******************************* */ 170 /* 171 如果你已在上方选择了相应的组合板子,请跳过,保持以下注释状态即可 172 这里是用来设置你单独连接在I2C上的传感器模块。当然每样都单独买价格会高一些,如果你是豪,当我没说。 173 */ 174 /* I2C陀螺仪 */ 175 // #define WMP 176 // #define ITG3050 177 // #define ITG3200 178 // #define MPU3050 179 // #define L3G4200D 180 // #define MPU6050 // 带了加速度 181 // #define LSM330 // 带了加速度 182 183 /* I2C加速度计 */ 184 // #define MMA7455 185 // #define ADXL345 186 // #define BMA020 187 // #define BMA180 188 // #define BMA280 189 // #define LIS3LV02 190 // #define LSM303DLx_ACC 191 // #define MMA8451Q 192 193 /* I2C气压计 */ 194 // #define BMP085 195 // #define MS561101BA 196 197 /* I2C磁力计 */ 198 // #define HMC5843 199 // #define HMC5883 200 // #define AK8975 201 // #define MAG3110 202 203 /* 声呐 */ // 目前用作显示用途 - 无控制代码支持 204 /* OYUZIQI提示:貌似bbs.5imx.com上有大神完成了代码,且国外论坛上有光流 205 http://bbs.5imx.com/bbs/forum.php?mod=viewthread &tid=726172&page=1 206 http://www.multiwii.com/forum/viewtopic.php?f=7 &t=1413 207 */ 208 // #define SRF02 // use the Devantech SRF i2c sensors 209 // #define SRF08 210 // #define SRF10 211 // #define SRF235 212 213 /* ADC加速度计 */ // 用于来自sparkfun的5DOF,使用模拟针脚A1/A2/A3 214 // #define ADCACC 215 216 /* 强制你独有的的传感器方向 - 甚至覆盖集成dof板子特定的默认值 */ 217 // #define FORCE_ACC_ORIENTATION(X, Y, Z) {imu.accADC[ROLL] = Y; imu.accADC[PITCH] = -X; imu.accADC[YAW] = Z;} 218 // #define FORCE_GYRO_ORIENTATION(X, Y, Z) {imu.gyroADC[ROLL] = -Y; imu.gyroADC[PITCH] = X; imu.gyroADC[YAW] = Z;} 219 // #define FORCE_MAG_ORIENTATION(X, Y, Z) {imu.magADC[ROLL] = X; imu.magADC[PITCH] = Y; imu.magADC[YAW] = Z;} 220 221 /* 板子方向转移 */ 222 /* 如果你的机架设计仅用于+模式,并且你不能物理上将飞控旋转至用于X模式飞行(反之亦然) 223 * 你可以使用其中一个选项虚拟旋转传感器45度,然后通过飞行模式设定多旋翼飞行器的类型。 224 * 检查电机顺序与旋转方向是否与新的“前方”匹配!仅使用其中一项注释! */ 225 // #define SENSORS_TILT_45DEG_RIGHT // 将“前方”顺时针旋转45度 226 // #define SENSORS_TILT_45DEG_LEFT // 将“前方”逆时针旋转45度 227 228 229 /* *********************************************************************************************** */ 230 /* **************** ************** */ 231 /* *