本帖最后由 jpno1 于 2014-2-24 21:50 编辑
/**************************************************************************************/
/******** special receiver types 特殊接收类型 ********************/
/**************************************************************************************/
/**************************** PPM Sum Reciver PPM总线接收 ***********************************/
/* The following lines apply only for specific receiver with only one PPM sum signal, on digital PIN 2 以下选项仅适用于只有一个PPM总线信号的接收机 使用digital_pin 2
Select the right line depending on your radio bra n d. Feel free to modify the order in your PPM order is different */ 根据你的遥控器品牌选择合适的选项,随便更改你觉得合适的ppm先后顺序
//#define SERIAL_SUM_PPM PITCH,YAW,THROTTLE,ROLL,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Graupner/Spektrum 遥控设备
//#define SERIAL_SUM_PPM ROLL,PITCH,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Robe/Hitec/Futaba 遥控设备
//#define SERIAL_SUM_PPM ROLL,PITCH,YAW,THROTTLE,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For Multiplex 遥控设备
//#define SERIAL_SUM_PPM PITCH,ROLL,THROTTLE,YAW,AUX1,AUX2,AUX3,AUX4,8,9,10,11 //For some Hitec/Sanwa/Others 遥控设备
// Uncommenting following line allow to connect PPM_SUM receiver to sta n dard THROTTLE PIN on MEGA boards (eg. A8 in CRIUS AIO) 去掉下面的注释可以将ppm sum 信号连接到油门端 (mega版)
//#define PPM_ON_THROTTLE
/********************** Spektrum Satellite Reciver spektrum卫星接收 *******************************/
/* The following lines apply only for Spektrum Satellite Receiver 仅用于spektrum卫星接收系统
Spektrum Satellites are 3V devices. DO NOT connect to 5V! 卫星接收为3v设备, 不要接到主板的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). 对于mega版, 将灰线接到RX1, pin19, 黑线接地, 橙线接到3.3v输出或者任何3.3v电源.
For PROMINI, attach sat grey to RX0. Attach sat black to ground. */ Promini版, 灰线接到RX0
//#define SPEKTRUM 1024
//#define SPEKTRUM 2048
//#define SPEK_SERIAL_PORT 1 // Forced to 0 on Pro Mini a n d single serial boards; Set to your choice of 0, 1, or 2 on any Mega based board (defaults to 1 on Mega). 串行端口选择
//**************************
// Defines that allow a "Bind" of a Spektrum or Compatible Remote Receiver (aka Satellite) via Configuration GUI. 定义为可通过gui绑定(必须设备支持)
// Bind mode will be same as declared above, if your TX is capable. 绑定方式和上面的一样, 如果你发射机兼容.
// Ground, Power, a n d Signal must come from three adjacent pins. 地线,电源,信号线必须来自3个相邻的引脚
// By default, these are Ground=4, Power=5, Signal=6. These pins are in a row on most MultiWii shield boards. Pins can be overriden below. 默认的 地线=4 电源=5 信号=6
// Normally use 3.3V regulator is needed on the power pin!! If your satellite hangs during bind (blinks, but won't complete bind with a solid light), go direct 5V on all pins. 正常情况电源输出需要3.3v变压, 如果你的卫星接收绑定时死机(闪烁,但是不常亮), 直接将所有端口接5v
//**************************
// For Pro Mini, the connector for the Satellite that resides on the FTDI can be unplugged a n d moved to these three adjacent pins.
//#define SPEK_BIND //Un-Comment for Spektrum Satellie Bind Support. Code is ~420 bytes smaller without it.
//#define SPEK_BIND_GROUND 4
//#define SPEK_BIND_POWER 5
//#define SPEK_BIND_DATA 6
/******************************* SBUS RECIVER SBUS接收 ************************************/
/* The following line apply only for Futaba S-Bus Receiver on MEGA boards at RX1 only (Serial 1) or PROMICRO boards. 一下仅适用于futaba sbus系统(mega版 连rx1(串口1),
You have to invert the S-Bus-Serial Signal e.g. with a Hex-Inverter like IC SN74 LS 04 */ sbus串行信号需要反向, 如使用六角逆变器 IC SN74 LS 04
//#define SBUS
//#define SBUS_SERIAL_PORT 1
#define SBUS_MID_OFFSET 988 //SBUS Mid-Point at 1500
/*************************************************************************************************/
/***************** ***************/
/**************** SECTION 4 - ALTERNATE CPUs & BOARDS 可选CPU,主板 *******/
/***************** ***************/
/*************************************************************************************************/
/**************************************************************************************/
/******** Promini Specifig Settings Promini板特殊设置 ********************/
/**************************************************************************************/
/************************** Hexa Motor 5 & 6 Pins 六轴电机 5,6脚 *******************************/
/* PIN A0 a n d A1 instead of PIN D5 & D6 for 6 motors config a n d promini config 使用A0,A1脚替代 D5,D6脚
This mod allow the use of a sta n dard receiver on a pro mini 以下更改允许在promini上使用普通接收器(不需要ppm总线接收)
(no need to use a PPM sum receiver) */
#define A0_A1_PIN_HEX
/********************************* Aux 2 Pin 辅助通道2 ***********************************/
/* possibility to use PIN8 or PIN12 as the AUX2 RC input (only one, not both) 可选pin8或者pin12 作为aux2输入 (只能选一个)
it deactivates in this case the POWER PIN (pin 12) or the BUZZER PIN (pin 8) */ 选了之后会禁用默认的pin12的电源输出和 pin8的蜂鸣器输出.
#define RCAUXPIN8
//#define RCAUXPIN12
/**************************************************************************************/
/***************** Teensy 2.0 Support ******************/
/**************************************************************************************/
/* uncomment this if you use a teensy 2.0 with teensyduino
it needs to run at 16MHz */
//#define TEENSY20
/**************************************************************************************/
/******** Settings for ProMicro, Leonardo a n d other Atmega32u4 Boards ***********/
/**************************************************************************************/
/********************************* pin Layout **********************************/
/* activate this for a better pinlayout if all pins can be used => not possible on ProMicro */
//#define A32U4ALLPINS
/********************************** PWM Setup **********************************/
/* activate all 6 hardware PWM outputs Motor 5 = D11 a n d 6 = D13.
note: not possible on the sparkfun promicro (pin 11 & 13 are not broken out there)
if activated:
Motor 1-6 = 10-bit hardware PWM
Motor 7-8 = 8-bit Software PWM
Servos = 8-bit Software PWM
if deactivated:
Motor 1-4 = 10-bit hardware PWM
Motor 5-8 = 10-bit Software PWM
Servos = 10-bit Software PWM */
//#define HWPWM6
/********************************** Aux 2 Pin **********************************/
/* AUX2 pin on pin RXO */
//#define RCAUX2PINRXO
/* aux2 pin on pin D17 (RXLED) */
//#define RCAUX2PIND17
/********************************** 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) */
//#define D8BUZZER
/*********************** Promicro version related ****************************/
/* Inverted status LED for Promicro ver 10 */
//#define PROMICRO10
/**************************************************************************************/
/********override default pin assignments 覆盖默认的引脚分配 ********************/
/**************************************************************************************/
/* only enable any of this if you must change the default pin assignment, e.g. your board does not have a specific pin */ (如非必要请勿更改默认引脚分配(比如你主板上没有需要的引脚)
/* you may need to change PINx a n d PORTx plus #shift according to the desired pin! */ 你可能为了改变一个引脚而必须变动其他的引脚/端口以及相应的参数)
//#define OVERRIDE_V_BATPIN A0 // instead of A3 // Analog PIN 3
//#define OVERRIDE_PSENSORPIN A1 // instead of A2 // Analog PIN 2
//#define OVERRIDE_LEDPIN_PINMODE pinMode (A1, OUTPUT); // use A1 instead of d13
//#define OVERRIDE_LEDPIN_TOGGLE PINC |= 1<<1; // PINB |= 1<<5; //switch LEDPIN state (digital PIN 13)
//#define OVERRIDE_LEDPIN_OFF PORTC &= ~(1<<1); // PORTB &= ~(1<<5);
//#define OVERRIDE_LEDPIN_ON PORTC |= 1<<1; // was PORTB |= (1<<5);
//#define OVERRIDE_BUZZERPIN_PINMODE pinMode (A2, OUTPUT); // use A2 instead of d8
//#define OVERRIDE_BUZZERPIN_ON PORTC |= 1<<2 //PORTB |= 1;
//#define OVERRIDE_BUZZERPIN_OFF PORTC &= ~(1<<2); //PORTB &= ~1;
|