diff --git a/Multiprotocol/A7105_SPI.ino b/Multiprotocol/A7105_SPI.ino
index 1698725..251d31e 100644
--- a/Multiprotocol/A7105_SPI.ino
+++ b/Multiprotocol/A7105_SPI.ino
@@ -12,23 +12,20 @@
You should have received a copy of the GNU General Public License
along with Multiprotocol. If not, see .
*/
-
-//-------------------------------
-//-------------------------------
-//A7105 SPI routines
-//-------------------------------
-//-------------------------------
+/********************/
+/** A7105 routines **/
+/********************/
#include "iface_a7105.h"
void A7105_WriteData(uint8_t len, uint8_t channel)
{
uint8_t i;
- CS_off;
- A7105_Write(A7105_RST_WRPTR);
- A7105_Write(0x05);
+ A7105_CSN_off;
+ SPI_Write(A7105_RST_WRPTR);
+ SPI_Write(0x05);
for (i = 0; i < len; i++)
- A7105_Write(packet[i]);
- CS_on;
+ SPI_Write(packet[i]);
+ A7105_CSN_on;
A7105_WriteReg(0x0F, channel);
A7105_Strobe(A7105_TX);
}
@@ -36,67 +33,30 @@ void A7105_WriteData(uint8_t len, uint8_t channel)
void A7105_ReadData() {
uint8_t i;
A7105_Strobe(0xF0); //A7105_RST_RDPTR
- CS_off;
- A7105_Write(0x45);
+ A7105_CSN_off;
+ SPI_Write(0x45);
for (i=0;i<16;i++)
- packet[i]=A7105_Read();
- CS_on;
+ packet[i]=SPI_SDIO_Read();
+ A7105_CSN_on;
}
void A7105_WriteReg(uint8_t address, uint8_t data) {
- CS_off;
- A7105_Write(address);
+ A7105_CSN_off;
+ SPI_Write(address);
NOP();
- A7105_Write(data);
- CS_on;
+ SPI_Write(data);
+ A7105_CSN_on;
}
uint8_t A7105_ReadReg(uint8_t address) {
uint8_t result;
- CS_off;
- A7105_Write(address |=0x40); //bit 6 =1 for reading
- result = A7105_Read();
- CS_on;
+ A7105_CSN_off;
+ SPI_Write(address |=0x40); //bit 6 =1 for reading
+ result = SPI_SDIO_Read();
+ A7105_CSN_on;
return(result);
}
-void A7105_Write(uint8_t command) {
- uint8_t n=8;
-
- SCK_off;//SCK start low
- SDI_off;
- while(n--) {
- if(command&0x80)
- SDI_on;
- else
- SDI_off;
- SCK_on;
- NOP();
- SCK_off;
- command = command << 1;
- }
- SDI_on;
-}
-
-uint8_t A7105_Read(void) {
- uint8_t result=0;
- uint8_t i;
-
- SDI_SET_INPUT;
- for(i=0;i<8;i++) {
- if(SDI_1) ///if SDIO =1
- result=(result<<1)|0x01;
- else
- result=result<<1;
- SCK_on;
- NOP();
- SCK_off;
- NOP();
- }
- SDI_SET_OUTPUT;
- return result;
-}
-
//------------------------
void A7105_SetTxRxMode(uint8_t mode)
{
@@ -121,9 +81,8 @@ uint8_t A7105_Reset()
{
uint8_t result;
- delay(10); //wait 10ms for A7105 wakeup
A7105_WriteReg(0x00, 0x00);
- delay(1000);
+ delayMilliseconds(1);
A7105_SetTxRxMode(TXRX_OFF); //Set both GPIO as output and low
result=A7105_ReadReg(0x10) == 0x9E; //check if is reset.
A7105_Strobe(A7105_STANDBY);
@@ -131,13 +90,13 @@ uint8_t A7105_Reset()
}
void A7105_WriteID(uint32_t ida) {
- CS_off;
- A7105_Write(0x06);//ex id=0x5475c52a ;txid3txid2txid1txid0
- A7105_Write((ida>>24)&0xff);//53
- A7105_Write((ida>>16)&0xff);//75
- A7105_Write((ida>>8)&0xff);//c5
- A7105_Write((ida>>0)&0xff);//2a
- CS_on;
+ A7105_CSN_off;
+ SPI_Write(0x06);//ex id=0x5475c52a ;txid3txid2txid1txid0
+ SPI_Write((ida>>24)&0xff);//53
+ SPI_Write((ida>>16)&0xff);//75
+ SPI_Write((ida>>8)&0xff);//c5
+ SPI_Write((ida>>0)&0xff);//2a
+ A7105_CSN_on;
}
/*
@@ -175,13 +134,17 @@ void A7105_SetPower()
power=IS_POWER_FLAG_on?A7105_HIGH_POWER:A7105_LOW_POWER;
if(IS_RANGE_FLAG_on)
power=A7105_RANGE_POWER;
- A7105_WriteReg(0x28, power);
+ if(prev_power != power)
+ {
+ A7105_WriteReg(0x28, power);
+ prev_power=power;
+ }
}
void A7105_Strobe(uint8_t address) {
- CS_off;
- A7105_Write(address);
- CS_on;
+ A7105_CSN_off;
+ SPI_Write(address);
+ A7105_CSN_on;
}
const uint8_t PROGMEM HUBSAN_A7105_regs[] = {
diff --git a/Multiprotocol/ASSAN_nrf24l01.ino b/Multiprotocol/ASSAN_nrf24l01.ino
new file mode 100644
index 0000000..1a94d74
--- /dev/null
+++ b/Multiprotocol/ASSAN_nrf24l01.ino
@@ -0,0 +1,179 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+#if defined(ASSAN_NRF24L01_INO)
+
+#include "iface_nrf24l01.h"
+
+#define ASSAN_PACKET_SIZE 20
+#define ASSAN_RF_BIND_CHANNEL 0x03
+#define ASSAN_ADDRESS_LENGTH 4
+
+enum {
+ ASSAN_BIND0=0,
+ ASSAN_BIND1,
+ ASSAN_BIND2,
+ ASSAN_DATA0,
+ ASSAN_DATA1,
+ ASSAN_DATA2,
+ ASSAN_DATA3,
+ ASSAN_DATA4,
+ ASSAN_DATA5
+};
+
+void ASSAN_init()
+{
+ NRF24L01_Initialize();
+ NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x02); // 4 bytes rx/tx address
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, (uint8_t *)"\x80\x80\x80\xB8", ASSAN_ADDRESS_LENGTH); // Bind address
+ NRF24L01_WriteRegisterMulti(NRF24L01_0A_RX_ADDR_P0, (uint8_t *)"\x80\x80\x80\xB8", ASSAN_ADDRESS_LENGTH); // Bind address
+ NRF24L01_FlushTx();
+ NRF24L01_FlushRx();
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
+ NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknowldgement on all data pipes
+ NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0 only
+ NRF24L01_WriteReg(NRF24L01_11_RX_PW_P0, ASSAN_PACKET_SIZE);
+ NRF24L01_SetPower();
+}
+
+void ASSAN_send_packet()
+{
+ uint16_t temp;
+ for(uint8_t i=0;i<10;i++)
+ {
+ temp=Servo_data[i]<<3;
+ packet[2*i]=temp>>8;
+ packet[2*i+1]=temp;
+ }
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
+ NRF24L01_FlushTx();
+ NRF24L01_WritePayload(packet, ASSAN_PACKET_SIZE);
+}
+
+uint16_t ASSAN_callback()
+{
+ switch (phase)
+ {
+ // Bind
+ case ASSAN_BIND0:
+ //Config RX @1M
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, ASSAN_RF_BIND_CHANNEL);
+ NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
+ NRF24L01_SetTxRxMode(RX_EN);
+ phase++;
+ case ASSAN_BIND1:
+ //Wait for receiver to send the frames
+ if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR))
+ { //Something has been received
+ NRF24L01_ReadPayload(packet, ASSAN_PACKET_SIZE);
+ if(packet[19]==0x13)
+ { //Last frame received
+ phase++;
+ //Switch to TX
+ NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_SetTxRxMode(TX_EN);
+ //Prepare bind packet
+ memset(packet,0x05,ASSAN_PACKET_SIZE-5);
+ packet[15]=0x99;
+ for(uint8_t i=0;i<4;i++)
+ packet[16+i]=packet[23-i];
+ packet_count=0;
+ delayMilliseconds(260);
+ return 10000; // Wait 270ms in total...
+ }
+ }
+ return 1000;
+ case ASSAN_BIND2:
+ // Send 20 packets
+ packet_count++;
+ if(packet_count==20)
+ packet[15]=0x13; // different value for last packet
+ NRF24L01_WritePayload(packet, ASSAN_PACKET_SIZE);
+ if(packet_count==20)
+ {
+ phase++;
+ delayMilliseconds(2165);
+ }
+ return 22520;
+ // Normal operation
+ case ASSAN_DATA0:
+ // Bind Done
+ BIND_DONE;
+ NRF24L01_SetBitrate(NRF24L01_BR_250K); // 250Kbps
+ NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_SetTxRxMode(TX_EN);
+ case ASSAN_DATA1:
+ case ASSAN_DATA4:
+ // Change ID and RF channel
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR,packet+20+4*hopping_frequency_no, ASSAN_ADDRESS_LENGTH);
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no]);
+ hopping_frequency_no^=0x01;
+ NRF24L01_SetPower();
+ phase=ASSAN_DATA2;
+ return 2000;
+ case ASSAN_DATA2:
+ case ASSAN_DATA3:
+ ASSAN_send_packet();
+ phase++; // DATA 3 or 4
+ return 5000;
+ }
+ return 0;
+}
+
+static void __attribute__((unused)) ASSAN_initialize_txid()
+{
+/* //Renaud TXID with Freq=36 and alternate Freq 67 or 68 or 69 or 70 or 71 or 73 or 74 or 75 or 78 and may be more...
+ packet[23]=0x22;
+ packet[22]=0x37;
+ packet[21]=0xFA;
+ packet[20]=0x53; */
+ // Using packet[20..23] to store the ID1 and packet[24..27] to store the ID2
+ uint8_t freq=0,freq2;
+ for(uint8_t i=0;i<4;i++)
+ {
+ uint8_t temp=rx_tx_addr[0];
+ packet[i+20]=temp;
+ packet[i+24]=temp+1;
+ freq+=temp;
+ }
+
+ // Main frequency
+ freq=((freq%25)+2)<<1;
+ if(freq&0x02) freq|=0x01;
+ hopping_frequency[0]=freq;
+ // Alternate frequency has some random
+ do
+ {
+ freq2=random(0xfefefefe)%9;
+ freq2+=freq*2-5;
+ }
+ while( (freq2>118) || (freq2.
+ */
+/************************************/
+/** Arduino replacement routines **/
+/************************************/
+// replacement millis() and micros()
+// These work polled, no interrupts
+// micros() MUST be called at least once every 32 milliseconds
+uint16_t MillisPrecount ;
+uint16_t lastTimerValue ;
+uint32_t TotalMicros ;
+uint32_t TotalMillis ;
+uint8_t Correction ;
+
+uint32_t micros()
+{
+ uint16_t elapsed ;
+ uint8_t millisToAdd ;
+ uint8_t oldSREG = SREG ;
+ cli() ;
+ uint16_t time = TCNT1 ; // Read timer 1
+ SREG = oldSREG ;
+
+ elapsed = time - lastTimerValue ;
+ elapsed += Correction ;
+ Correction = elapsed & 0x01 ;
+ elapsed >>= 1 ;
+
+ uint32_t ltime = TotalMicros ;
+ ltime += elapsed ;
+ cli() ;
+ TotalMicros = ltime ; // Done this way for RPM to work correctly
+ lastTimerValue = time ;
+ SREG = oldSREG ; // Still valid from above
+
+ elapsed += MillisPrecount;
+ millisToAdd = 0 ;
+
+ if ( elapsed > 15999 )
+ {
+ millisToAdd = 16 ;
+ elapsed -= 16000 ;
+ }
+ if ( elapsed > 7999 )
+ {
+ millisToAdd += 8 ;
+ elapsed -= 8000 ;
+ }
+ if ( elapsed > 3999 )
+ {
+ millisToAdd += 4 ;
+ elapsed -= 4000 ;
+ }
+ if ( elapsed > 1999 )
+ {
+ millisToAdd += 2 ;
+ elapsed -= 2000 ;
+ }
+ if ( elapsed > 999 )
+ {
+ millisToAdd += 1 ;
+ elapsed -= 1000 ;
+ }
+ TotalMillis += millisToAdd ;
+ MillisPrecount = elapsed ;
+ return TotalMicros ;
+}
+
+uint32_t millis()
+{
+ micros() ;
+ return TotalMillis ;
+}
+
+void delayMilliseconds(unsigned long ms)
+{
+ uint16_t start = (uint16_t)micros();
+ uint16_t lms = ms ;
+
+ while (lms > 0) {
+ if (((uint16_t)micros() - start) >= 1000) {
+ lms--;
+ start += 1000;
+ }
+ }
+}
+
+/* Important notes:
+ - Max value is 16000µs
+ - delay is not accurate due to interrupts happening */
+void delayMicroseconds(unsigned int us)
+{
+ if (--us == 0)
+ return;
+ us <<= 2; // * 4
+ us -= 2; // - 2
+#ifdef XMEGA
+ __asm__ __volatile__ (
+ "1: sbiw %0,1" "\n\t" // 2 cycles
+ "nop \n"
+ "nop \n"
+ "nop \n"
+ "nop \n"
+ "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
+ );
+#else
+ __asm__ __volatile__ (
+ "1: sbiw %0,1" "\n\t" // 2 cycles
+ "brne 1b" : "=w" (us) : "0" (us) // 2 cycles
+ );
+#endif
+}
+
+#ifndef XMEGA
+ void init()
+ {
+ // this needs to be called before setup() or some functions won't work there
+ sei();
+ }
+#endif //XMEGA
+
diff --git a/Multiprotocol/Bayang_nrf24l01.ino b/Multiprotocol/Bayang_nrf24l01.ino
index 84907b4..7d010d4 100644
--- a/Multiprotocol/Bayang_nrf24l01.ino
+++ b/Multiprotocol/Bayang_nrf24l01.ino
@@ -99,7 +99,7 @@ static void __attribute__((unused)) BAYANG_send_packet(uint8_t bind)
// Power on, TX mode, 2byte CRC
// Why CRC0? xn297 does not interpret it - either 16-bit CRC or nothing
- XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP));
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
NRF24L01_WriteReg(NRF24L01_05_RF_CH, bind ? BAYANG_RF_BIND_CHANNEL:hopping_frequency[hopping_frequency_no++]);
hopping_frequency_no%=BAYANG_RF_NUM_CHANNELS;
diff --git a/Multiprotocol/CC2500_SPI.ino b/Multiprotocol/CC2500_SPI.ino
index bc6928e..4628b03 100644
--- a/Multiprotocol/CC2500_SPI.ino
+++ b/Multiprotocol/CC2500_SPI.ino
@@ -19,125 +19,107 @@
//-------------------------------
#include "iface_cc2500.h"
-void cc2500_readFifo(uint8_t *dpbuffer, uint8_t len)
-{
- ReadRegisterMulti(CC2500_3F_RXFIFO | CC2500_READ_BURST, dpbuffer, len);
-}
-
-//----------------------
-static void ReadRegisterMulti(uint8_t address, uint8_t data[], uint8_t length)
+//----------------------------
+void CC2500_WriteReg(uint8_t address, uint8_t data)
{
CC25_CSN_off;
- cc2500_spi_write(address);
+ SPI_Write(address);
+ NOP();
+ SPI_Write(data);
+ CC25_CSN_on;
+}
+
+//----------------------
+static void CC2500_ReadRegisterMulti(uint8_t address, uint8_t data[], uint8_t length)
+{
+ CC25_CSN_off;
+ SPI_Write(CC2500_READ_BURST | address);
for(uint8_t i = 0; i < length; i++)
- data[i] = cc2500_spi_read();
+ data[i] = SPI_Read();
CC25_CSN_on;
}
+//--------------------------------------------
+static uint8_t CC2500_ReadReg(uint8_t address)
+{
+ uint8_t result;
+ CC25_CSN_off;
+ SPI_Write(CC2500_READ_SINGLE | address);
+ result = SPI_Read();
+ CC25_CSN_on;
+ return(result);
+}
+
+//------------------------
+void CC2500_ReadData(uint8_t *dpbuffer, uint8_t len)
+{
+ CC2500_ReadRegisterMulti(CC2500_3F_RXFIFO, dpbuffer, len);
+}
+
//*********************************************
+void CC2500_Strobe(uint8_t state)
+{
+ CC25_CSN_off;
+ SPI_Write(state);
+ CC25_CSN_on;
+}
static void CC2500_WriteRegisterMulti(uint8_t address, const uint8_t data[], uint8_t length)
{
CC25_CSN_off;
- cc2500_spi_write(CC2500_WRITE_BURST | address);
+ SPI_Write(CC2500_WRITE_BURST | address);
for(uint8_t i = 0; i < length; i++)
- cc2500_spi_write(data[i]);
+ SPI_Write(data[i]);
CC25_CSN_on;
}
-void cc2500_writeFifo(uint8_t *dpbuffer, uint8_t len)
+void CC2500_WriteData(uint8_t *dpbuffer, uint8_t len)
{
- cc2500_strobe(CC2500_SFTX);//0x3B
+ CC2500_Strobe(CC2500_SFTX);
CC2500_WriteRegisterMulti(CC2500_3F_TXFIFO, dpbuffer, len);
- cc2500_strobe(CC2500_STX);//0x35
+ CC2500_Strobe(CC2500_STX);
}
-//--------------------------------------
-static void cc2500_spi_write(uint8_t command) {
- uint8_t n=8;
-
- SCK_off;//SCK start low
- SDI_off;
- while(n--)
- {
- if(command&0x80)
- SDI_on;
- else
- SDI_off;
- SCK_on;
- NOP();
- SCK_off;
- command = command << 1;
- }
- SDI_on;
-}
-
-//----------------------------
-void cc2500_writeReg(uint8_t address, uint8_t data) {//same as 7105
- CC25_CSN_off;
- cc2500_spi_write(address);
- NOP();
- cc2500_spi_write(data);
- CC25_CSN_on;
-}
-
-static uint8_t cc2500_spi_read(void)
+void CC2500_SetTxRxMode(uint8_t mode)
{
- uint8_t result;
- uint8_t i;
- result=0;
- for(i=0;i<8;i++)
- {
- if(SDO_1) ///
- result=(result<<1)|0x01;
+ if(mode == TX_EN)
+ {//from deviation firmware
+ CC2500_WriteReg(CC2500_02_IOCFG0, 0x2F | 0x40);
+ CC2500_WriteReg(CC2500_00_IOCFG2, 0x2F);
+ }
+ else
+ if (mode == RX_EN)
+ {
+ CC2500_WriteReg(CC2500_02_IOCFG0, 0x2F);
+ CC2500_WriteReg(CC2500_00_IOCFG2, 0x2F | 0x40);
+ }
else
- result=result<<1;
- SCK_on;
- NOP();
- SCK_off;
- NOP();
- }
- return result;
-}
-
-//--------------------------------------------
-static uint8_t cc2500_readReg(uint8_t address)
-{
- uint8_t result;
- CC25_CSN_off;
- address |=0x80; //bit 7 =1 for reading
- cc2500_spi_write(address);
- result = cc2500_spi_read();
- CC25_CSN_on;
- return(result);
-}
-//------------------------
-void cc2500_strobe(uint8_t address)
-{
- CC25_CSN_off;
- cc2500_spi_write(address);
- CC25_CSN_on;
+ {
+ CC2500_WriteReg(CC2500_02_IOCFG0, 0x2F);
+ CC2500_WriteReg(CC2500_00_IOCFG2, 0x2F);
+ }
}
+
//------------------------
/*static void cc2500_resetChip(void)
{
// Toggle chip select signal
CC25_CSN_on;
- _delay_us(30);
+ delayMicroseconds(30);
CC25_CSN_off;
- _delay_us(30);
+ delayMicroseconds(30);
CC25_CSN_on;
- _delay_us(45);
- cc2500_strobe(CC2500_SRES);
+ delayMicroseconds(45);
+ CC2500_Strobe(CC2500_SRES);
_delay_ms(100);
}
*/
uint8_t CC2500_Reset()
{
- cc2500_strobe(CC2500_SRES);
- _delay_us(1000);
+ CC2500_Strobe(CC2500_SRES);
+ delayMilliseconds(1);
CC2500_SetTxRxMode(TXRX_OFF);
- return cc2500_readReg(CC2500_0E_FREQ1) == 0xC4;//check if reset
+ return CC2500_ReadReg(CC2500_0E_FREQ1) == 0xC4;//check if reset
}
/*
static void CC2500_SetPower_Value(uint8_t power)
@@ -154,7 +136,7 @@ static void CC2500_SetPower_Value(uint8_t power)
};
if (power > 7)
power = 7;
- cc2500_writeReg(CC2500_3E_PATABLE, patable[power]);
+ CC2500_WriteReg(CC2500_3E_PATABLE, patable[power]);
}
*/
void CC2500_SetPower()
@@ -164,25 +146,10 @@ void CC2500_SetPower()
power=IS_POWER_FLAG_on?CC2500_HIGH_POWER:CC2500_LOW_POWER;
if(IS_RANGE_FLAG_on)
power=CC2500_RANGE_POWER;
- cc2500_writeReg(CC2500_3E_PATABLE, power);
+ if(prev_power != power)
+ {
+ CC2500_WriteReg(CC2500_3E_PATABLE, power);
+ prev_power=power;
+ }
}
-void CC2500_SetTxRxMode(uint8_t mode)
-{
- if(mode == TX_EN)
- {//from deviation firmware
- cc2500_writeReg(CC2500_02_IOCFG0, 0x2F | 0x40);
- cc2500_writeReg(CC2500_00_IOCFG2, 0x2F);
- }
- else
- if (mode == RX_EN)
- {
- cc2500_writeReg(CC2500_02_IOCFG0, 0x2F);
- cc2500_writeReg(CC2500_00_IOCFG2, 0x2F | 0x40);
- }
- else
- {
- cc2500_writeReg(CC2500_02_IOCFG0, 0x2F);
- cc2500_writeReg(CC2500_00_IOCFG2, 0x2F);
- }
-}
\ No newline at end of file
diff --git a/Multiprotocol/CG023_nrf24l01.ino b/Multiprotocol/CG023_nrf24l01.ino
index 0e5c0ce..8169b8f 100644
--- a/Multiprotocol/CG023_nrf24l01.ino
+++ b/Multiprotocol/CG023_nrf24l01.ino
@@ -25,7 +25,7 @@
#define CG023_INITIAL_WAIT 500
#define CG023_PACKET_SIZE 15 // packets have 15-byte payload
#define CG023_RF_BIND_CHANNEL 0x2D
-#define CG023_BIND_COUNT 1000 // 8 seconds
+#define CG023_BIND_COUNT 500 // 4 seconds
#define YD829_PACKET_PERIOD 4100 // Timeout for callback in uSec
#define H8_3D_PACKET_PERIOD 1800 // Timeout for callback in uSec
#define H8_3D_PACKET_SIZE 20
@@ -171,7 +171,7 @@ static void __attribute__((unused)) CG023_send_packet(uint8_t bind)
// Power on, TX mode, 2byte CRC
// Why CRC0? xn297 does not interpret it - either 16-bit CRC or nothing
- XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP));
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
if (bind)
NRF24L01_WriteReg(NRF24L01_05_RF_CH, sub_protocol==H8_3D?hopping_frequency[0]:CG023_RF_BIND_CHANNEL);
else
diff --git a/Multiprotocol/CX10_nrf24l01.ino b/Multiprotocol/CX10_nrf24l01.ino
index 6722fcd..adc7279 100644
--- a/Multiprotocol/CX10_nrf24l01.ino
+++ b/Multiprotocol/CX10_nrf24l01.ino
@@ -25,7 +25,10 @@
#define Q282_PACKET_SIZE 21
#define CX10_PACKET_PERIOD 1316 // Timeout for callback in uSec
#define CX10A_PACKET_PERIOD 6000
+<<<<<<< HEAD
#define CX10A_BIND_COUNT 400 // 2 seconds
+=======
+>>>>>>> refs/remotes/pascallanger/master
#define CX10_INITIAL_WAIT 500
@@ -149,7 +152,7 @@ static void __attribute__((unused)) CX10_Write_Packet(uint8_t bind)
// Power on, TX mode, 2byte CRC
// Why CRC0? xn297 does not interpret it - either 16-bit CRC or nothing
- XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP));
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
if (bind)
NRF24L01_WriteReg(NRF24L01_05_RF_CH, CX10_RF_BIND_CHANNEL);
else
@@ -182,7 +185,8 @@ static void __attribute__((unused)) CX10_init()
NRF24L01_SetPower();
}
-uint16_t CX10_callback() {
+uint16_t CX10_callback()
+{
switch (phase) {
case CX10_BIND1:
if (bind_counter == 0)
@@ -197,6 +201,7 @@ uint16_t CX10_callback() {
}
break;
case CX10_BIND2:
+<<<<<<< HEAD
bind_counter--;
if(bind_counter==0)
{ // Needed for some CX-10A to properly finish the bind
@@ -204,27 +209,41 @@ uint16_t CX10_callback() {
bind_counter=CX10A_BIND_COUNT;
}
if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & BV(NRF24L01_07_RX_DR))
+=======
+ if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR))
+>>>>>>> refs/remotes/pascallanger/master
{ // RX fifo data ready
XN297_ReadPayload(packet, packet_length);
NRF24L01_SetTxRxMode(TXRX_OFF);
NRF24L01_SetTxRxMode(TX_EN);
if(packet[9] == 1)
{
+<<<<<<< HEAD
phase = CX10_BIND1;
bind_counter=0;
+=======
+ BIND_DONE;
+ phase = CX10_DATA;
+>>>>>>> refs/remotes/pascallanger/master
}
}
else
{
+ // switch to TX mode
NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_FlushTx();
NRF24L01_SetTxRxMode(TX_EN);
CX10_Write_Packet(1);
+<<<<<<< HEAD
delayMicroseconds(400); // 300µs in deviation but not working so using 400µs instead
+=======
+ delayMicroseconds(400);
+>>>>>>> refs/remotes/pascallanger/master
// switch to RX mode
NRF24L01_SetTxRxMode(TXRX_OFF);
NRF24L01_FlushRx();
NRF24L01_SetTxRxMode(RX_EN);
- XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP) | BV(NRF24L01_00_PRIM_RX));
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP) | _BV(NRF24L01_00_PRIM_RX));
}
break;
case CX10_DATA:
@@ -269,7 +288,10 @@ uint16_t initCX10(void)
packet_period = CX10A_PACKET_PERIOD;
phase = CX10_BIND2;
+<<<<<<< HEAD
bind_counter=CX10A_BIND_COUNT;
+=======
+>>>>>>> refs/remotes/pascallanger/master
for(uint8_t i=0; i<4; i++)
packet[5+i] = 0xff; // clear aircraft id
diff --git a/Multiprotocol/CYRF6936_SPI.ino b/Multiprotocol/CYRF6936_SPI.ino
index 3985acb..6a3bae6 100644
--- a/Multiprotocol/CYRF6936_SPI.ino
+++ b/Multiprotocol/CYRF6936_SPI.ino
@@ -14,48 +14,12 @@
*/
#include "iface_cyrf6936.h"
-static void cyrf_spi_write(uint8_t command)
-{
- uint8_t n=8;
- SCK_off;//SCK start low
- SDI_off;
- while(n--) {
- if(command&0x80)
- SDI_on;
- else
- SDI_off;
- SCK_on;
- NOP();
- SCK_off;
- command = command << 1;
- }
- SDI_on;
-}
-
-static uint8_t cyrf_spi_read()
-{
- uint8_t result;
- uint8_t i;
- result=0;
- for(i=0;i<8;i++)
- {
- if(SDO_1) ///
- result=(result<<1)|0x01;
- else
- result=result<<1;
- SCK_on;
- NOP();
- SCK_off;
- NOP();
- }
- return result;
-}
void CYRF_WriteRegister(uint8_t address, uint8_t data)
{
CYRF_CSN_off;
- cyrf_spi_write(0x80 | address);
- cyrf_spi_write(data);
+ SPI_Write(0x80 | address);
+ SPI_Write(data);
CYRF_CSN_on;
}
@@ -64,9 +28,9 @@ static void CYRF_WriteRegisterMulti(uint8_t address, const uint8_t data[], uint8
uint8_t i;
CYRF_CSN_off;
- cyrf_spi_write(0x80 | address);
+ SPI_Write(0x80 | address);
for(i = 0; i < length; i++)
- cyrf_spi_write(data[i]);
+ SPI_Write(data[i]);
CYRF_CSN_on;
}
@@ -75,9 +39,9 @@ static void CYRF_ReadRegisterMulti(uint8_t address, uint8_t data[], uint8_t leng
uint8_t i;
CYRF_CSN_off;
- cyrf_spi_write(address);
+ SPI_Write(address);
for(i = 0; i < length; i++)
- data[i] = cyrf_spi_read();
+ data[i] = SPI_Read();
CYRF_CSN_on;
}
@@ -85,8 +49,8 @@ uint8_t CYRF_ReadRegister(uint8_t address)
{
uint8_t data;
CYRF_CSN_off;
- cyrf_spi_write(address);
- data = cyrf_spi_read();
+ SPI_Write(address);
+ data = SPI_Read();
CYRF_CSN_on;
return data;
}
@@ -94,17 +58,19 @@ uint8_t CYRF_ReadRegister(uint8_t address)
uint8_t CYRF_Reset()
{
- CYRF_WriteRegister(CYRF_1D_MODE_OVERRIDE, 0x01);//software reset
- _delay_us(200);//
- // RS_HI;
- // _delay_us(100);
- // RS_LO;
- // _delay_us(100);
- CYRF_WriteRegister(CYRF_0C_XTAL_CTRL, 0xC0); //Enable XOUT as GPIO
- CYRF_WriteRegister(CYRF_0D_IO_CFG, 0x04); //Enable PACTL as GPIO
+#ifdef CYRF_RST_HI
+ CYRF_RST_HI; //Hardware reset
+ delayMicroseconds(100);
+ CYRF_RST_LO;
+ delayMicroseconds(100);
+#endif
+ CYRF_WriteRegister(CYRF_1D_MODE_OVERRIDE, 0x01); //Software reset
+ delayMicroseconds(200);
+ CYRF_WriteRegister(CYRF_0C_XTAL_CTRL, 0xC0); //Enable XOUT as GPIO
+ CYRF_WriteRegister(CYRF_0D_IO_CFG, 0x04); //Enable PACTL as GPIO
CYRF_SetTxRxMode(TXRX_OFF);
- //Verify the CYRD chip is responding
- return (CYRF_ReadRegister(CYRF_10_FRAMING_CFG) == 0xa5);//return if reset
+ //Verify the CYRF chip is responding
+ return (CYRF_ReadRegister(CYRF_10_FRAMING_CFG) == 0xa5);
}
/*
@@ -136,9 +102,15 @@ void CYRF_SetTxRxMode(uint8_t mode)
//Set the post tx/rx state
CYRF_WriteRegister(CYRF_0F_XACT_CFG, mode == TX_EN ? 0x28 : 0x2C); // 4=IDLE, 8=TX, C=RX
if(mode == TX_EN)
+#ifdef DSM_BLUE
+ CYRF_WriteRegister(CYRF_0E_GPIO_CTRL,0x20); // XOUT=1, PACTL=0
+ else
+ CYRF_WriteRegister(CYRF_0E_GPIO_CTRL,0x80); // XOUT=0, PACTL=1
+#else
CYRF_WriteRegister(CYRF_0E_GPIO_CTRL,0x80); // XOUT=1, PACTL=0
else
CYRF_WriteRegister(CYRF_0E_GPIO_CTRL,0x20); // XOUT=0, PACTL=1
+#endif
}
}
/*
@@ -164,7 +136,12 @@ void CYRF_SetPower(uint8_t val)
power=IS_POWER_FLAG_on?CYRF_HIGH_POWER:CYRF_LOW_POWER;
if(IS_RANGE_FLAG_on)
power=CYRF_RANGE_POWER;
- CYRF_WriteRegister(CYRF_03_TX_CFG, val | power);
+ power|=val;
+ if(prev_power != power)
+ {
+ CYRF_WriteRegister(CYRF_03_TX_CFG,power);
+ prev_power=power;
+ }
}
/*
@@ -196,10 +173,10 @@ void CYRF_ConfigDataCode(const uint8_t *datacodes, uint8_t len)
void CYRF_WritePreamble(uint32_t preamble)
{
CYRF_CSN_off;
- cyrf_spi_write(0x80 | 0x24);
- cyrf_spi_write(preamble & 0xff);
- cyrf_spi_write((preamble >> 8) & 0xff);
- cyrf_spi_write((preamble >> 16) & 0xff);
+ SPI_Write(0x80 | 0x24);
+ SPI_Write(preamble & 0xff);
+ SPI_Write((preamble >> 8) & 0xff);
+ SPI_Write((preamble >> 16) & 0xff);
CYRF_CSN_on;
}
/*
@@ -215,10 +192,18 @@ static void CYRF_StartReceive()
CYRF_ReadRegisterMulti(CYRF_21_RX_BUFFER, dpbuffer, 0x10);
}
*/
+<<<<<<< HEAD
static void CYRF_ReadDataPacketLen(uint8_t dpbuffer[], uint8_t length)
+=======
+void CYRF_ReadDataPacketLen(uint8_t dpbuffer[], uint8_t length)
+>>>>>>> refs/remotes/pascallanger/master
{
- ReadRegisterMulti(CYRF_21_RX_BUFFER, dpbuffer, length);
+ CYRF_ReadRegisterMulti(CYRF_21_RX_BUFFER, dpbuffer, length);
}
+<<<<<<< HEAD
+=======
+
+>>>>>>> refs/remotes/pascallanger/master
static void CYRF_WriteDataPacketLen(const uint8_t dpbuffer[], uint8_t len)
{
CYRF_WriteRegister(CYRF_01_TX_LENGTH, len);
@@ -261,13 +246,13 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
CYRF_ConfigCRCSeed(0x0000);
CYRF_SetTxRxMode(RX_EN);
//Wait for pre-amp to switch from send to receive
- _delay_us(1000);
+ delayMilliseconds(1);
for(i = 0; i < NUM_FREQ; i++)
{
CYRF_ConfigRFChannel(i);
CYRF_ReadRegister(CYRF_13_RSSI);
CYRF_StartReceive();
- _delay_us(10);
+ delayMicroseconds(10);
rssi[i] = CYRF_ReadRegister(CYRF_13_RSSI);
}
@@ -286,3 +271,37 @@ void CYRF_FindBestChannels(uint8_t *channels, uint8_t len, uint8_t minspace, uin
}
CYRF_SetTxRxMode(TX_EN);
}
+
+#if defined(DEVO_CYRF6936_INO) || defined(J6PRO_CYRF6936_INO)
+const uint8_t PROGMEM DEVO_j6pro_sopcodes[][8] = {
+ /* Note these are in order transmitted (LSB 1st) */
+ {0x3C, 0x37, 0xCC, 0x91, 0xE2, 0xF8, 0xCC, 0x91},
+ {0x9B, 0xC5, 0xA1, 0x0F, 0xAD, 0x39, 0xA2, 0x0F},
+ {0xEF, 0x64, 0xB0, 0x2A, 0xD2, 0x8F, 0xB1, 0x2A},
+ {0x66, 0xCD, 0x7C, 0x50, 0xDD, 0x26, 0x7C, 0x50},
+ {0x5C, 0xE1, 0xF6, 0x44, 0xAD, 0x16, 0xF6, 0x44},
+ {0x5A, 0xCC, 0xAE, 0x46, 0xB6, 0x31, 0xAE, 0x46},
+ {0xA1, 0x78, 0xDC, 0x3C, 0x9E, 0x82, 0xDC, 0x3C},
+ {0xB9, 0x8E, 0x19, 0x74, 0x6F, 0x65, 0x18, 0x74},
+ {0xDF, 0xB1, 0xC0, 0x49, 0x62, 0xDF, 0xC1, 0x49},
+ {0x97, 0xE5, 0x14, 0x72, 0x7F, 0x1A, 0x14, 0x72},
+#if defined(J6PRO_CYRF6936_INO)
+ {0x82, 0xC7, 0x90, 0x36, 0x21, 0x03, 0xFF, 0x17},
+ {0xE2, 0xF8, 0xCC, 0x91, 0x3C, 0x37, 0xCC, 0x91}, //Note: the '03' was '9E' in the Cypress recommended table
+ {0xAD, 0x39, 0xA2, 0x0F, 0x9B, 0xC5, 0xA1, 0x0F}, //The following are the same as the 1st 8 above,
+ {0xD2, 0x8F, 0xB1, 0x2A, 0xEF, 0x64, 0xB0, 0x2A}, //but with the upper and lower word swapped
+ {0xDD, 0x26, 0x7C, 0x50, 0x66, 0xCD, 0x7C, 0x50},
+ {0xAD, 0x16, 0xF6, 0x44, 0x5C, 0xE1, 0xF6, 0x44},
+ {0xB6, 0x31, 0xAE, 0x46, 0x5A, 0xCC, 0xAE, 0x46},
+ {0x9E, 0x82, 0xDC, 0x3C, 0xA1, 0x78, 0xDC, 0x3C},
+ {0x6F, 0x65, 0x18, 0x74, 0xB9, 0x8E, 0x19, 0x74},
+#endif
+};
+#endif
+static void __attribute__((unused)) CYRF_PROGMEM_ConfigSOPCode(const uint8_t *data)
+{
+ uint8_t code[8];
+ for(uint8_t i=0;i<8;i++)
+ code[i]=pgm_read_byte_near(&data[i]);
+ CYRF_ConfigSOPCode(code);
+}
\ No newline at end of file
diff --git a/Multiprotocol/Convert.ino b/Multiprotocol/Convert.ino
new file mode 100644
index 0000000..3e2920e
--- /dev/null
+++ b/Multiprotocol/Convert.ino
@@ -0,0 +1,79 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+/************************/
+/** Convert routines **/
+/************************/
+int16_t map( int16_t x, int16_t in_min, int16_t in_max, int16_t out_min, int16_t out_max)
+{
+// return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
+ long y ;
+ x -= in_min ;
+ y = out_max - out_min ;
+ y *= x ;
+ x = y / (in_max - in_min) ;
+ return x + out_min ;
+}
+
+// Channel value is converted to 8bit values full scale
+uint8_t convert_channel_8b(uint8_t num)
+{
+ return (uint8_t) (map(limit_channel_100(num),servo_min_100,servo_max_100,0,255));
+}
+
+// Channel value is converted to 8bit values to provided values scale
+uint8_t convert_channel_8b_scale(uint8_t num,uint8_t min,uint8_t max)
+{
+ return (uint8_t) (map(limit_channel_100(num),servo_min_100,servo_max_100,min,max));
+}
+
+// Channel value is converted sign + magnitude 8bit values
+uint8_t convert_channel_s8b(uint8_t num)
+{
+ uint8_t ch;
+ ch = convert_channel_8b(num);
+ return (ch < 128 ? 127-ch : ch);
+}
+
+// Channel value is converted to 10bit values
+uint16_t convert_channel_10b(uint8_t num)
+{
+ return (uint16_t) (map(limit_channel_100(num),servo_min_100,servo_max_100,1,1023));
+}
+
+// Channel value is multiplied by 1.5
+uint16_t convert_channel_frsky(uint8_t num)
+{
+ return Servo_data[num] + Servo_data[num]/2;
+}
+
+// Channel value is converted for HK310
+void convert_channel_HK310(uint8_t num, uint8_t *low, uint8_t *high)
+{
+ uint16_t temp=0xFFFF-(4*Servo_data[num])/3;
+ *low=(uint8_t)(temp&0xFF);
+ *high=(uint8_t)(temp>>8);
+}
+
+// Channel value is limited to PPM_100
+uint16_t limit_channel_100(uint8_t ch)
+{
+ if(Servo_data[ch]>servo_max_100)
+ return servo_max_100;
+ else
+ if (Servo_data[ch].
+ */
+
+#if defined(DSM_CYRF6936_INO)
+
+#include "iface_cyrf6936.h"
+
+#define DSM_BIND_CHANNEL 0x0d //13 This can be any odd channel
+
+//During binding we will send BIND_COUNT/2 packets
+//One packet each 10msec
+#define DSM_BIND_COUNT 300
+
+enum {
+ DSM_BIND_WRITE=0,
+ DSM_BIND_CHECK,
+ DSM_BIND_READ,
+ DSM_CHANSEL,
+ DSM_CH1_WRITE_A,
+ DSM_CH1_CHECK_A,
+ DSM_CH2_WRITE_A,
+ DSM_CH2_CHECK_A,
+ DSM_CH2_READ_A,
+ DSM_CH1_WRITE_B,
+ DSM_CH1_CHECK_B,
+ DSM_CH2_WRITE_B,
+ DSM_CH2_CHECK_B,
+ DSM_CH2_READ_B,
+};
+
+//
+uint8_t sop_col;
+uint8_t DSM_num_ch=0;
+uint8_t ch_map[14];
+const uint8_t PROGMEM ch_map_progmem[][14] = {
+//22+11ms for 4..7 channels
+ {1, 0, 2, 3, 0xff, 0xff, 0xff, 1, 0, 2, 3, 0xff, 0xff, 0xff}, //4ch - Guess
+ {1, 0, 2, 3, 4, 0xff, 0xff, 1, 0, 2, 3, 4, 0xff, 0xff}, //5ch - Guess
+ {1, 5, 2, 3, 0, 4, 0xff, 1, 5, 2, 3, 0, 4, 0xff}, //6ch - HP6DSM
+ {1, 5, 2, 4, 3, 6, 0, 1, 5, 2, 4, 3, 6, 0 }, //7ch - DX6i
+//22ms for 8..12 channels
+ {1, 5, 2, 3, 6, 0xff, 0xff, 4, 0, 7, 0xff, 0xff, 0xff, 0xff}, //8ch - DX8/DX7
+ {1, 5, 2, 3, 6, 0xff, 0xff, 4, 0, 7, 8, 0xff, 0xff, 0xff}, //9ch - Guess
+ {1, 5, 2, 3, 6, 0xff, 0xff, 4, 0, 7, 8, 9, 0xff, 0xff}, //10ch - Guess
+ {1, 5, 2, 3, 6, 10, 0xff, 4, 0, 7, 8, 9, 0xff, 0xff}, //11ch - Guess
+ {1, 5, 2, 4, 6, 10, 0xff, 0, 7, 3, 8, 9 , 11 , 0xff}, //12ch - DX18
+//11ms for 8..12 channels
+ {1, 5, 2, 3, 6, 7, 0xff, 1, 5, 2, 4, 0, 0xff, 0xff}, //8ch - DX7
+ {1, 5, 2, 3, 6, 7, 0xff, 1, 5, 2, 4, 0, 8, 0xff}, //9ch - Guess
+ {1, 5, 2, 3, 4, 8, 9, 1, 5, 2, 3, 0, 7, 6 }, //10ch - DX18
+};
+
+const uint8_t PROGMEM pncodes[5][8][8] = {
+ /* Note these are in order transmitted (LSB 1st) */
+ { /* Row 0 */
+ /* Col 0 */ {0x03, 0xBC, 0x6E, 0x8A, 0xEF, 0xBD, 0xFE, 0xF8},
+ /* Col 1 */ {0x88, 0x17, 0x13, 0x3B, 0x2D, 0xBF, 0x06, 0xD6},
+ /* Col 2 */ {0xF1, 0x94, 0x30, 0x21, 0xA1, 0x1C, 0x88, 0xA9},
+ /* Col 3 */ {0xD0, 0xD2, 0x8E, 0xBC, 0x82, 0x2F, 0xE3, 0xB4},
+ /* Col 4 */ {0x8C, 0xFA, 0x47, 0x9B, 0x83, 0xA5, 0x66, 0xD0},
+ /* Col 5 */ {0x07, 0xBD, 0x9F, 0x26, 0xC8, 0x31, 0x0F, 0xB8},
+ /* Col 6 */ {0xEF, 0x03, 0x95, 0x89, 0xB4, 0x71, 0x61, 0x9D},
+ /* Col 7 */ {0x40, 0xBA, 0x97, 0xD5, 0x86, 0x4F, 0xCC, 0xD1},
+ /* Col 8 {0xD7, 0xA1, 0x54, 0xB1, 0x5E, 0x89, 0xAE, 0x86}*/
+ },
+ { /* Row 1 */
+ /* Col 0 */ {0x83, 0xF7, 0xA8, 0x2D, 0x7A, 0x44, 0x64, 0xD3},
+ /* Col 1 */ {0x3F, 0x2C, 0x4E, 0xAA, 0x71, 0x48, 0x7A, 0xC9},
+ /* Col 2 */ {0x17, 0xFF, 0x9E, 0x21, 0x36, 0x90, 0xC7, 0x82},
+ /* Col 3 */ {0xBC, 0x5D, 0x9A, 0x5B, 0xEE, 0x7F, 0x42, 0xEB},
+ /* Col 4 */ {0x24, 0xF5, 0xDD, 0xF8, 0x7A, 0x77, 0x74, 0xE7},
+ /* Col 5 */ {0x3D, 0x70, 0x7C, 0x94, 0xDC, 0x84, 0xAD, 0x95},
+ /* Col 6 */ {0x1E, 0x6A, 0xF0, 0x37, 0x52, 0x7B, 0x11, 0xD4},
+ /* Col 7 */ {0x62, 0xF5, 0x2B, 0xAA, 0xFC, 0x33, 0xBF, 0xAF},
+ /* Col 8 {0x40, 0x56, 0x32, 0xD9, 0x0F, 0xD9, 0x5D, 0x97} */
+ },
+ { /* Row 2 */
+ /* Col 0 */ {0x40, 0x56, 0x32, 0xD9, 0x0F, 0xD9, 0x5D, 0x97},
+ /* Col 1 */ {0x8E, 0x4A, 0xD0, 0xA9, 0xA7, 0xFF, 0x20, 0xCA},
+ /* Col 2 */ {0x4C, 0x97, 0x9D, 0xBF, 0xB8, 0x3D, 0xB5, 0xBE},
+ /* Col 3 */ {0x0C, 0x5D, 0x24, 0x30, 0x9F, 0xCA, 0x6D, 0xBD},
+ /* Col 4 */ {0x50, 0x14, 0x33, 0xDE, 0xF1, 0x78, 0x95, 0xAD},
+ /* Col 5 */ {0x0C, 0x3C, 0xFA, 0xF9, 0xF0, 0xF2, 0x10, 0xC9},
+ /* Col 6 */ {0xF4, 0xDA, 0x06, 0xDB, 0xBF, 0x4E, 0x6F, 0xB3},
+ /* Col 7 */ {0x9E, 0x08, 0xD1, 0xAE, 0x59, 0x5E, 0xE8, 0xF0},
+ /* Col 8 {0xC0, 0x90, 0x8F, 0xBB, 0x7C, 0x8E, 0x2B, 0x8E} */
+ },
+ { /* Row 3 */
+ /* Col 0 */ {0xC0, 0x90, 0x8F, 0xBB, 0x7C, 0x8E, 0x2B, 0x8E},
+ /* Col 1 */ {0x80, 0x69, 0x26, 0x80, 0x08, 0xF8, 0x49, 0xE7},
+ /* Col 2 */ {0x7D, 0x2D, 0x49, 0x54, 0xD0, 0x80, 0x40, 0xC1},
+ /* Col 3 */ {0xB6, 0xF2, 0xE6, 0x1B, 0x80, 0x5A, 0x36, 0xB4},
+ /* Col 4 */ {0x42, 0xAE, 0x9C, 0x1C, 0xDA, 0x67, 0x05, 0xF6},
+ /* Col 5 */ {0x9B, 0x75, 0xF7, 0xE0, 0x14, 0x8D, 0xB5, 0x80},
+ /* Col 6 */ {0xBF, 0x54, 0x98, 0xB9, 0xB7, 0x30, 0x5A, 0x88},
+ /* Col 7 */ {0x35, 0xD1, 0xFC, 0x97, 0x23, 0xD4, 0xC9, 0x88},
+ /* Col 8 {0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93} */
+// Wrong values used by Orange TX/RX
+// /* Col 8 */ {0x88, 0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40}
+ },
+ { /* Row 4 */
+ /* Col 0 */ {0xE1, 0xD6, 0x31, 0x26, 0x5F, 0xBD, 0x40, 0x93},
+ /* Col 1 */ {0xDC, 0x68, 0x08, 0x99, 0x97, 0xAE, 0xAF, 0x8C},
+ /* Col 2 */ {0xC3, 0x0E, 0x01, 0x16, 0x0E, 0x32, 0x06, 0xBA},
+ /* Col 3 */ {0xE0, 0x83, 0x01, 0xFA, 0xAB, 0x3E, 0x8F, 0xAC},
+ /* Col 4 */ {0x5C, 0xD5, 0x9C, 0xB8, 0x46, 0x9C, 0x7D, 0x84},
+ /* Col 5 */ {0xF1, 0xC6, 0xFE, 0x5C, 0x9D, 0xA5, 0x4F, 0xB7},
+ /* Col 6 */ {0x58, 0xB5, 0xB3, 0xDD, 0x0E, 0x28, 0xF1, 0xB0},
+ /* Col 7 */ {0x5F, 0x30, 0x3B, 0x56, 0x96, 0x45, 0xF4, 0xA1},
+ /* Col 8 {0x03, 0xBC, 0x6E, 0x8A, 0xEF, 0xBD, 0xFE, 0xF8} */
+ },
+};
+
+static void __attribute__((unused)) read_code(uint8_t *buf, uint8_t row, uint8_t col, uint8_t len)
+{
+ for(uint8_t i=0;i> 8;
+ packet[9] = sum & 0xff;
+ packet[10] = 0x01; //???
+ packet[11] = DSM_num_ch;
+
+ if (sub_protocol==DSM2_22)
+ packet[12]=DSM_num_ch<8?0x01:0x02; // DSM2/1024 1 or 2 packets depending on the number of channels
+ if(sub_protocol==DSM2_11)
+ packet[12]=0x12; // DSM2/2048 2 packets
+ if(sub_protocol==DSMX_22)
+ #if defined DSM_TELEMETRY
+ packet[12] = 0xb2; // DSMX/2048 2 packets
+ #else
+ packet[12] = DSM_num_ch<8? 0xa2 : 0xb2; // DSMX/2048 1 or 2 packets depending on the number of channels
+ #endif
+ if(sub_protocol==DSMX_11 || sub_protocol==DSM_AUTO) // Force DSMX/1024 in mode Auto
+ packet[12]=0xb2; // DSMX/1024 2 packets
+
+ packet[13] = 0x00; //???
+ for(i = 8; i < 14; i++)
+ sum += packet[i];
+ packet[14] = sum >> 8;
+ packet[15] = sum & 0xff;
+}
+
+static void __attribute__((unused)) initialize_bind_phase()
+{
+ CYRF_ConfigRFChannel(DSM_BIND_CHANNEL); //This seems to be random?
+ //64 SDR Mode is configured so only the 8 first values are needed but need to write 16 values...
+ CYRF_ConfigDataCode((const uint8_t*)"\xD7\xA1\x54\xB1\x5E\x89\xAE\x86\xc6\x94\x22\xfe\x48\xe6\x57\x4e", 16);
+ build_bind_packet();
+}
+
+static void __attribute__((unused)) cyrf_configdata()
+{
+ for(uint8_t i = 0; i < sizeof(data_vals) / 2; i++)
+ CYRF_WriteRegister(pgm_read_byte_near(&data_vals[i][0]), pgm_read_byte_near(&data_vals[i][1]));
+}
+
+static void __attribute__((unused)) update_channels()
+{
+ prev_option=option;
+ if(sub_protocol==DSM_AUTO)
+ DSM_num_ch=12; // Force 12 channels in mode Auto
+ else
+ DSM_num_ch=option;
+ if(DSM_num_ch<4 || DSM_num_ch>12)
+ DSM_num_ch=6; // Default to 6 channels if invalid choice...
+
+ // Create channel map based on number of channels and refresh rate
+ uint8_t idx=DSM_num_ch-4;
+ if(DSM_num_ch>7 && DSM_num_ch<11 && (sub_protocol==DSM2_11 || sub_protocol==DSMX_11))
+ idx+=5; // In 11ms mode change index only for channels 8..10
+ for(uint8_t i=0;i<14;i++)
+ ch_map[i]=pgm_read_byte_near(&ch_map_progmem[idx][i]);
+}
+
+static void __attribute__((unused)) build_data_packet(uint8_t upper)
+{
+ uint16_t max = 2047;
+ uint8_t bits = 11;
+
+ if(prev_option!=option)
+ update_channels();
+
+ if (sub_protocol==DSMX_11 || sub_protocol==DSMX_22 )
+ {
+ packet[0] = cyrfmfg_id[2];
+ packet[1] = cyrfmfg_id[3];
+ }
+ else
+ {
+ packet[0] = (0xff ^ cyrfmfg_id[2]);
+ packet[1] = (0xff ^ cyrfmfg_id[3]);
+ if(sub_protocol==DSM2_22)
+ {
+ max=1023; // Only DSM_22 is using a resolution of 1024
+ bits=10;
+ }
+ }
+
+ for (uint8_t i = 0; i < 7; i++)
+ {
+ uint8_t idx = ch_map[(upper?7:0) + i];//1,5,2,3,0,4
+ uint16_t value = 0xffff;;
+ if (idx != 0xff)
+ {
+ if (!IS_BIND_DONE_on)
+ { // Failsafe position during binding
+ value=max/2; //all channels to middle
+ if(idx==0)
+ value=1; //except throttle
+ }
+ else
+ value=map(Servo_data[CH_TAER[idx]],servo_min_125,servo_max_125,0,max);
+ value |= (upper && i==0 ? 0x8000 : 0) | (idx << bits);
+ }
+ packet[i*2+2] = (value >> 8) & 0xff;
+ packet[i*2+3] = (value >> 0) & 0xff;
+ }
+}
+
+static void __attribute__((unused)) set_sop_data_crc()
+{
+ //The crc for channel '1' is NOT(mfgid[0] << 8 + mfgid[1])
+ //The crc for channel '2' is (mfgid[0] << 8 + mfgid[1])
+ uint16_t crc = (cyrfmfg_id[0] << 8) + cyrfmfg_id[1];
+ if(phase==DSM_CH1_CHECK_A||phase==DSM_CH1_CHECK_B)
+ CYRF_ConfigCRCSeed(crc); //CH2
+ else
+ CYRF_ConfigCRCSeed(~crc); //CH1
+
+ uint8_t pn_row = get_pn_row(hopping_frequency[hopping_frequency_no]);
+ uint8_t code[16];
+ read_code(code,pn_row,sop_col,8); // pn_row between 0 and 4, sop_col between 1 and 7
+ CYRF_ConfigSOPCode(code);
+ read_code(code,pn_row,7 - sop_col,8); // 7-sop_col between 0 and 6
+ read_code(code+8,pn_row,7 - sop_col + 1,8); // 7-sop_col+1 between 1 and 7
+ CYRF_ConfigDataCode(code, 16);
+
+ CYRF_ConfigRFChannel(hopping_frequency[hopping_frequency_no]);
+ hopping_frequency_no++;
+ if(sub_protocol == DSMX_11 || sub_protocol == DSMX_22)
+ hopping_frequency_no %=23;
+ else
+ hopping_frequency_no %=2;
+}
+
+static void __attribute__((unused)) calc_dsmx_channel()
+{
+ uint8_t idx = 0;
+ uint32_t id = ~(((uint32_t)cyrfmfg_id[0] << 24) | ((uint32_t)cyrfmfg_id[1] << 16) | ((uint32_t)cyrfmfg_id[2] << 8) | (cyrfmfg_id[3] << 0));
+ uint32_t id_tmp = id;
+ while(idx < 23)
+ {
+ uint8_t i;
+ uint8_t count_3_27 = 0, count_28_51 = 0, count_52_76 = 0;
+ id_tmp = id_tmp * 0x0019660D + 0x3C6EF35F; // Randomization
+ uint8_t next_ch = ((id_tmp >> 8) % 0x49) + 3; // Use least-significant byte and must be larger than 3
+ if ( (next_ch ^ cyrfmfg_id[3]) & 0x01 )
+ continue;
+ for (i = 0; i < idx; i++)
+ {
+ if(hopping_frequency[i] == next_ch)
+ break;
+ if(hopping_frequency[i] <= 27)
+ count_3_27++;
+ else
+ if (hopping_frequency[i] <= 51)
+ count_28_51++;
+ else
+ count_52_76++;
+ }
+ if (i != idx)
+ continue;
+ if ((next_ch < 28 && count_3_27 < 8)
+ ||(next_ch >= 28 && next_ch < 52 && count_28_51 < 7)
+ ||(next_ch >= 52 && count_52_76 < 8))
+ hopping_frequency[idx++] = next_ch;
+ }
+}
+
+static uint8_t __attribute__((unused)) DSM_Check_RX_packet()
+{
+ uint8_t result=1; // assume good packet
+
+ uint16_t sum = 384 - 0x10;
+ for(uint8_t i = 1; i < 9; i++)
+ {
+ sum += pkt[i];
+ if(i<5)
+ if(pkt[i] != (0xff ^ cyrfmfg_id[i-1]))
+ result=0; // bad packet
+ }
+ if( pkt[9] != (sum>>8) && pkt[10] != (uint8_t)sum )
+ result=0;
+ return result;
+}
+
+uint16_t ReadDsm()
+{
+#define DSM_CH1_CH2_DELAY 4010 // Time between write of channel 1 and channel 2
+#define DSM_WRITE_DELAY 1550 // Time after write to verify write complete
+#define DSM_READ_DELAY 600 // Time before write to check read phase, and switch channels. Was 400 but 600 seems what the 328p needs to read a packet
+ uint16_t start;
+ #if defined DSM_TELEMETRY
+ uint8_t rx_phase;
+ uint8_t len;
+ #endif
+
+ switch(phase)
+ {
+ case DSM_BIND_WRITE:
+ if(bind_counter--==0)
+ #if defined DSM_TELEMETRY
+ phase=DSM_BIND_CHECK; //Check RX answer
+ #else
+ phase=DSM_CHANSEL; //Switch to normal mode
+ #endif
+ CYRF_WriteDataPacket(packet);
+ return 10000;
+ #if defined DSM_TELEMETRY
+ case DSM_BIND_CHECK:
+ //64 SDR Mode is configured so only the 8 first values are needed but we need to write 16 values...
+ CYRF_ConfigDataCode((const uint8_t *)"\x98\x88\x1B\xE4\x30\x79\x03\x84\xC9\x2C\x06\x93\x86\xB9\x9E\xD7", 16);
+ CYRF_SetTxRxMode(RX_EN); //Receive mode
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //Prepare to receive
+ bind_counter=2*DSM_BIND_COUNT; //Timeout of 4.2s if no packet received
+ phase++; // change from BIND_CHECK to BIND_READ
+ return 2000;
+ case DSM_BIND_READ:
+ //Read data from RX
+ rx_phase = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
+ if((rx_phase & 0x03) == 0x02) // RXC=1, RXE=0 then 2nd check is required (debouncing)
+ rx_phase |= CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
+ if((rx_phase & 0x07) == 0x02)
+ { // data received with no errors
+ CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80); // need to set RXOW before data read
+ len=CYRF_ReadRegister(CYRF_09_RX_COUNT);
+ if(len>MAX_PKT-2)
+ len=MAX_PKT-2;
+ CYRF_ReadDataPacketLen(pkt+1, len);
+ if(len==10 && DSM_Check_RX_packet())
+ {
+ pkt[0]=0x80;
+ telemetry_link=1; // send received data on serial
+ phase++;
+ return 2000;
+ }
+ }
+ else
+ if((rx_phase & 0x02) != 0x02)
+ { // data received with errors
+ CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Abort RX operation
+ CYRF_SetTxRxMode(RX_EN); // Force end state read
+ CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); // Clear abort RX operation
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x83); // Prepare to receive
+ }
+ if( --bind_counter == 0 )
+ { // Exit if no answer has been received for some time
+ phase++; // DSM_CHANSEL
+ return 7000 ;
+ }
+ return 7000;
+ #endif
+ case DSM_CHANSEL:
+ BIND_DONE;
+ cyrf_configdata();
+ CYRF_SetTxRxMode(TX_EN);
+ hopping_frequency_no = 0;
+ phase = DSM_CH1_WRITE_A; // in fact phase++
+ set_sop_data_crc();
+ return 10000;
+ case DSM_CH1_WRITE_A:
+ case DSM_CH1_WRITE_B:
+ case DSM_CH2_WRITE_A:
+ case DSM_CH2_WRITE_B:
+ build_data_packet(phase == DSM_CH1_WRITE_B||phase == DSM_CH2_WRITE_B); // build lower or upper channels
+ CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS); // clear IRQ flags
+ CYRF_WriteDataPacket(packet);
+ phase++; // change from WRITE to CHECK mode
+ return DSM_WRITE_DELAY;
+ case DSM_CH1_CHECK_A:
+ case DSM_CH1_CHECK_B:
+ start=micros();
+ while ((uint16_t)micros()-start < 500) // Wait max 500µs
+ if(CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS) & 0x02)
+ break;
+ set_sop_data_crc();
+ phase++; // change from CH1_CHECK to CH2_WRITE
+ return DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY;
+ case DSM_CH2_CHECK_A:
+ case DSM_CH2_CHECK_B:
+ start=micros();
+ while ((uint16_t)micros()-start < 500) // Wait max 500µs
+ if(CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS) & 0x02)
+ break;
+ if (phase == DSM_CH2_CHECK_A)
+ CYRF_SetPower(0x28); //Keep transmit power in sync
+#if defined DSM_TELEMETRY
+ phase++; // change from CH2_CHECK to CH2_READ
+ CYRF_SetTxRxMode(RX_EN); //Receive mode
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive
+ return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY - DSM_READ_DELAY;
+ case DSM_CH2_READ_A:
+ case DSM_CH2_READ_B:
+ //Read telemetry
+ rx_phase = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
+ if((rx_phase & 0x03) == 0x02) // RXC=1, RXE=0 then 2nd check is required (debouncing)
+ rx_phase |= CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
+ if((rx_phase & 0x07) == 0x02)
+ { // good data (complete with no errors)
+ CYRF_WriteRegister(CYRF_07_RX_IRQ_STATUS, 0x80); // need to set RXOW before data read
+ len=CYRF_ReadRegister(CYRF_09_RX_COUNT);
+ if(len>MAX_PKT-2)
+ len=MAX_PKT-2;
+ CYRF_ReadDataPacketLen(pkt+1, len);
+ pkt[0]=CYRF_ReadRegister(CYRF_13_RSSI)&0x1F;// store RSSI of the received telemetry signal
+ telemetry_link=1;
+ }
+ CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x20); // Abort RX operation
+ if (phase == DSM_CH2_READ_A && (sub_protocol==DSM2_22 || sub_protocol==DSMX_22) && DSM_num_ch < 8) // 22ms mode
+ {
+ CYRF_SetTxRxMode(RX_EN); // Force end state read
+ CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); // Clear abort RX operation
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x87); //0x80??? //Prepare to receive
+ phase = DSM_CH2_READ_B;
+ return 11000;
+ }
+ if (phase == DSM_CH2_READ_A)
+ phase = DSM_CH1_WRITE_B; //Transmit upper
+ else
+ phase = DSM_CH1_WRITE_A; //Transmit lower
+ CYRF_SetTxRxMode(TX_EN); //TX mode
+ CYRF_WriteRegister(CYRF_29_RX_ABORT, 0x00); //Clear abort RX operation
+ set_sop_data_crc();
+ return DSM_READ_DELAY;
+#else
+ // No telemetry
+ set_sop_data_crc();
+ if (phase == DSM_CH2_CHECK_A)
+ {
+ if(DSM_num_ch > 7 || sub_protocol==DSM2_11 || sub_protocol==DSMX_11)
+ phase = DSM_CH1_WRITE_B; //11ms mode or upper to transmit change from CH2_CHECK_A to CH1_WRITE_A
+ else
+ { //Normal mode 22ms
+ phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_A to CH1_WRITE_A (ie no upper)
+ return 22000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY ;
+ }
+ }
+ else
+ phase = DSM_CH1_WRITE_A; // change from CH2_CHECK_B to CH1_WRITE_A (upper already transmitted so transmit lower)
+ return 11000 - DSM_CH1_CH2_DELAY - DSM_WRITE_DELAY;
+#endif
+ }
+ return 0;
+}
+
+uint16_t initDsm()
+{
+ CYRF_GetMfgData(cyrfmfg_id);
+ //Model match
+ cyrfmfg_id[3]^=RX_num;
+ //Calc sop_col
+ sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07;
+ //Fix for OrangeRX using wrong pncodes by preventing access to "Col 8"
+ if(sop_col==0)
+ {
+ cyrfmfg_id[rx_tx_addr[0]%3]^=0x01; //Change a bit so sop_col will be different from 0
+ sop_col = (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + 2) & 0x07;
+ }
+ //Hopping frequencies
+ if (sub_protocol == DSMX_11 || sub_protocol == DSMX_22)
+ calc_dsmx_channel();
+ else
+ {
+ uint8_t tmpch[10];
+ CYRF_FindBestChannels(tmpch, 10, 5, 3, 75);
+ //
+ uint8_t idx = random(0xfefefefe) % 10;
+ hopping_frequency[0] = tmpch[idx];
+ while(1)
+ {
+ idx = random(0xfefefefe) % 10;
+ if (tmpch[idx] != hopping_frequency[0])
+ break;
+ }
+ hopping_frequency[1] = tmpch[idx];
+ }
+ //
+ cyrf_config();
+ CYRF_SetTxRxMode(TX_EN);
+ //
+ update_channels();
+ //
+ if(IS_AUTOBIND_FLAG_on )
+ {
+ BIND_IN_PROGRESS;
+ initialize_bind_phase();
+ phase = DSM_BIND_WRITE;
+ bind_counter=DSM_BIND_COUNT;
+ }
+ else
+ phase = DSM_CHANSEL;//
+ return 10000;
+}
+
+#endif
\ No newline at end of file
diff --git a/Multiprotocol/Devo_cyrf6936.ino b/Multiprotocol/Devo_cyrf6936.ino
index e569cb9..91d752e 100644
--- a/Multiprotocol/Devo_cyrf6936.ino
+++ b/Multiprotocol/Devo_cyrf6936.ino
@@ -21,16 +21,13 @@
//For Debug
//#define NO_SCRAMBLE
-#define PKTS_PER_CHANNEL 4
-#define DEVO_BIND_COUNT 0x1388
-//#define TELEMETRY_ENABLE 0x30
-#define NUM_WAIT_LOOPS (100 / 5) //each loop is ~5us. Do not wait more than 100us
-//
-//#define TELEM_ON 0
-//#define TELEM_OFF 1
-enum Devo_PhaseState
-{
+#define DEVO_PKTS_PER_CHANNEL 4
+#define DEVO_BIND_COUNT 0x1388
+
+#define DEVO_NUM_WAIT_LOOPS (100 / 5) //each loop is ~5us. Do not wait more than 100us
+
+enum {
DEVO_BIND,
DEVO_BIND_SENDCH,
DEVO_BOUND,
@@ -46,6 +43,7 @@ enum Devo_PhaseState
DEVO_BOUND_10,
};
+<<<<<<< HEAD
const uint8_t sopcodes[][8] = {
/* Note these are in order transmitted (LSB 1st) */
/* 0 */ {0x3C,0x37,0xCC,0x91,0xE2,0xF8,0xCC,0x91}, //0x91CCF8E291CC373C
@@ -67,56 +65,84 @@ uint8_t use_fixed_id;
uint8_t failsafe_pkt;
static void __attribute__((unused)) scramble_pkt()
+=======
+static void __attribute__((unused)) DEVO_scramble_pkt()
+>>>>>>> refs/remotes/pascallanger/master
{
#ifdef NO_SCRAMBLE
return;
#else
- uint8_t i;
- for(i = 0; i < 15; i++)
+ for(uint8_t i = 0; i < 15; i++)
packet[i + 1] ^= cyrfmfg_id[i % 4];
#endif
}
+<<<<<<< HEAD
static void __attribute__((unused)) add_pkt_suffix()
+=======
+static void __attribute__((unused)) DEVO_add_pkt_suffix()
+>>>>>>> refs/remotes/pascallanger/master
{
- uint8_t bind_state;
- if (use_fixed_id)
+ uint8_t bind_state;
+ #ifdef ENABLE_PPM
+ if(mode_select && option==0 && IS_BIND_DONE_on) //PPM mode and option not already set and bind is finished
{
- if (bind_counter > 0)
- bind_state = 0xc0;
- else
- bind_state = 0x80;
+ BIND_SET_INPUT;
+ BIND_SET_PULLUP; // set pullup
+ if(IS_BIND_BUTTON_on)
+ {
+ eeprom_write_byte((uint8_t*)(30+mode_select),0x01); // Set fixed id mode for the current model
+ option=1;
+ }
+ BIND_SET_OUTPUT;
}
+ #endif //ENABLE_PPM
+ if(prev_option!=option && IS_BIND_DONE_on)
+ {
+ MProtocol_id = RX_num + MProtocol_id_master;
+ bind_counter=DEVO_BIND_COUNT;
+ }
+ if (option)
+ {
+ if (bind_counter > 0)
+ bind_state = 0xc0;
+ else
+ bind_state = 0x80;
+ }
else
- bind_state = 0x00;
- packet[10] = bind_state | (PKTS_PER_CHANNEL - pkt_num - 1);
+ bind_state = 0x00;
+ packet[10] = bind_state | (DEVO_PKTS_PER_CHANNEL - packet_count - 1);
packet[11] = *(hopping_frequency_ptr + 1);
packet[12] = *(hopping_frequency_ptr + 2);
- packet[13] = fixed_id & 0xff;
- packet[14] = (fixed_id >> 8) & 0xff;
- packet[15] = (fixed_id >> 16) & 0xff;
+ packet[13] = MProtocol_id & 0xff;
+ packet[14] = (MProtocol_id >> 8) & 0xff;
+ packet[15] = (MProtocol_id >> 16) & 0xff;
}
+<<<<<<< HEAD
static void __attribute__((unused)) build_beacon_pkt(uint8_t upper)
+=======
+static void __attribute__((unused)) DEVO_build_beacon_pkt(uint8_t upper)
+>>>>>>> refs/remotes/pascallanger/master
{
- packet[0] = ((DEVO_NUM_CHANNELS << 4) | 0x07);
-// uint8_t enable = 0;
+ packet[0] = (DEVO_NUM_CHANNELS << 4) | 0x07;
uint8_t max = 8;
-// int offset = 0;
if (upper)
{
packet[0] += 1;
max = 4;
-// offset = 8;
}
for(uint8_t i = 0; i < max; i++)
packet[i+1] = 0;
-// packet[9] = enable;
packet[9] = 0;
- add_pkt_suffix();
+ DEVO_add_pkt_suffix();
}
+<<<<<<< HEAD
static void __attribute__((unused)) build_bind_pkt()
+=======
+static void __attribute__((unused)) DEVO_build_bind_pkt()
+>>>>>>> refs/remotes/pascallanger/master
{
packet[0] = (DEVO_NUM_CHANNELS << 4) | 0x0a;
packet[1] = bind_counter & 0xff;
@@ -128,7 +154,7 @@ static void __attribute__((unused)) build_bind_pkt()
packet[7] = cyrfmfg_id[1];
packet[8] = cyrfmfg_id[2];
packet[9] = cyrfmfg_id[3];
- add_pkt_suffix();
+ DEVO_add_pkt_suffix();
//The fixed-id portion is scrambled in the bind packet
//I assume it is ignored
packet[13] ^= cyrfmfg_id[0];
@@ -136,16 +162,19 @@ static void __attribute__((unused)) build_bind_pkt()
packet[15] ^= cyrfmfg_id[2];
}
+<<<<<<< HEAD
static void __attribute__((unused)) build_data_pkt()
+=======
+static void __attribute__((unused)) DEVO_build_data_pkt()
+>>>>>>> refs/remotes/pascallanger/master
{
- uint8_t i;
+ static uint8_t ch_idx=0;
+
packet[0] = (DEVO_NUM_CHANNELS << 4) | (0x0b + ch_idx);
uint8_t sign = 0x0b;
- for (i = 0; i < 4; i++)
+ for (uint8_t i = 0; i < 4; i++)
{
- //
- int16_t value= map(Servo_data[ch_idx * 4 + i],PPM_MIN,PPM_MAX,-1600,1600);//range -1600...+1600
- //s32 value = (s32)Channels[ch_idx * 4 + i] * 0x640 / CHAN_MAX_VALUE;//10000
+ int16_t value=map(Servo_data[CH_EATR[ch_idx * 4 + i]],servo_min_125,servo_max_125,-1600,1600);//range -1600..+1600
if(value < 0)
{
value = -value;
@@ -155,13 +184,17 @@ static void __attribute__((unused)) build_data_pkt()
packet[2 * i + 2] = (value >> 8) & 0xff;
}
packet[9] = sign;
- ch_idx = ch_idx + 1;
+ ch_idx++;
if (ch_idx * 4 >= DEVO_NUM_CHANNELS)
ch_idx = 0;
- add_pkt_suffix();
+ DEVO_add_pkt_suffix();
}
+<<<<<<< HEAD
static void __attribute__((unused)) cyrf_set_bound_sop_code()
+=======
+static void __attribute__((unused)) DEVO_cyrf_set_bound_sop_code()
+>>>>>>> refs/remotes/pascallanger/master
{
/* crc == 0 isn't allowed, so use 1 if the math results in 0 */
uint8_t crc = (cyrfmfg_id[0] + (cyrfmfg_id[1] >> 6) + cyrfmfg_id[2]);
@@ -170,68 +203,70 @@ static void __attribute__((unused)) cyrf_set_bound_sop_code()
uint8_t sopidx = (0xff &((cyrfmfg_id[0] << 2) + cyrfmfg_id[1] + cyrfmfg_id[2])) % 10;
CYRF_SetTxRxMode(TX_EN);
CYRF_ConfigCRCSeed((crc << 8) + crc);
- CYRF_ConfigSOPCode(sopcodes[sopidx]);
+ CYRF_PROGMEM_ConfigSOPCode(DEVO_j6pro_sopcodes[sopidx]);
CYRF_SetPower(0x08);
}
+<<<<<<< HEAD
static void __attribute__((unused)) cyrf_init()
+=======
+const uint8_t PROGMEM DEVO_init_vals[][2] = {
+ { CYRF_1D_MODE_OVERRIDE, 0x38 },
+ { CYRF_03_TX_CFG, 0x08 },
+ { CYRF_06_RX_CFG, 0x4A },
+ { CYRF_0B_PWR_CTRL, 0x00 },
+ { CYRF_10_FRAMING_CFG, 0xA4 },
+ { CYRF_11_DATA32_THOLD, 0x05 },
+ { CYRF_12_DATA64_THOLD, 0x0E },
+ { CYRF_1B_TX_OFFSET_LSB, 0x55 },
+ { CYRF_1C_TX_OFFSET_MSB, 0x05 },
+ { CYRF_32_AUTO_CAL_TIME, 0x3C },
+ { CYRF_35_AUTOCAL_OFFSET, 0x14 },
+ { CYRF_39_ANALOG_CTRL, 0x01 },
+ { CYRF_1E_RX_OVERRIDE, 0x10 },
+ { CYRF_1F_TX_OVERRIDE, 0x00 },
+ { CYRF_01_TX_LENGTH, 0x10 },
+ { CYRF_0F_XACT_CFG, 0x10 },
+ { CYRF_27_CLK_OVERRIDE, 0x02 },
+ { CYRF_28_CLK_EN, 0x02 },
+ { CYRF_0F_XACT_CFG, 0x28 }
+};
+
+static void __attribute__((unused)) DEVO_cyrf_init()
+>>>>>>> refs/remotes/pascallanger/master
{
/* Initialise CYRF chip */
- CYRF_WriteRegister(CYRF_1D_MODE_OVERRIDE, 0x39);
- CYRF_SetPower(0x08);
- CYRF_WriteRegister(CYRF_06_RX_CFG, 0x4A);
- CYRF_WriteRegister(CYRF_0B_PWR_CTRL, 0x00);
- CYRF_WriteRegister(CYRF_0D_IO_CFG, 0x04);
- CYRF_WriteRegister(CYRF_0E_GPIO_CTRL, 0x20);
- CYRF_WriteRegister(CYRF_10_FRAMING_CFG, 0xA4);
- CYRF_WriteRegister(CYRF_11_DATA32_THOLD, 0x05);
- CYRF_WriteRegister(CYRF_12_DATA64_THOLD, 0x0E);
- CYRF_WriteRegister(CYRF_1B_TX_OFFSET_LSB, 0x55);
- CYRF_WriteRegister(CYRF_1C_TX_OFFSET_MSB, 0x05);
- CYRF_WriteRegister(CYRF_32_AUTO_CAL_TIME, 0x3C);
- CYRF_WriteRegister(CYRF_35_AUTOCAL_OFFSET, 0x14);
- CYRF_WriteRegister(CYRF_39_ANALOG_CTRL, 0x01);
- CYRF_WriteRegister(CYRF_1E_RX_OVERRIDE, 0x10);
- CYRF_WriteRegister(CYRF_1F_TX_OVERRIDE, 0x00);
- CYRF_WriteRegister(CYRF_01_TX_LENGTH, 0x10);
- CYRF_WriteRegister(CYRF_0C_XTAL_CTRL, 0xC0);
- CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x10);
- CYRF_WriteRegister(CYRF_27_CLK_OVERRIDE, 0x02);
- CYRF_WriteRegister(CYRF_28_CLK_EN, 0x02);
- CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x28);
+ for(uint8_t i = 0; i < sizeof(DEVO_init_vals) / 2; i++)
+ CYRF_WriteRegister(pgm_read_byte( &DEVO_init_vals[i][0]), pgm_read_byte( &DEVO_init_vals[i][1]) );
}
+<<<<<<< HEAD
static void __attribute__((unused)) set_radio_channels()
+=======
+static void __attribute__((unused)) DEVO_set_radio_channels()
+>>>>>>> refs/remotes/pascallanger/master
{
- //int i;
CYRF_FindBestChannels(hopping_frequency, 3, 4, 4, 80);
- //printf("Radio Channels:");
- // for (i = 0; i < 3; i++) {
- // printf(" %02x", radio_ch[i]);
-
- //Serial.print(radio_ch[i]);
- // }
- // printf("\n");
- //Makes code a little easier to duplicate these here
hopping_frequency[3] = hopping_frequency[0];
hopping_frequency[4] = hopping_frequency[1];
}
static void __attribute__((unused)) DEVO_BuildPacket()
{
+ static uint8_t failsafe_pkt=0;
switch(phase)
{
case DEVO_BIND:
- if(bind_counter>0)
+ if(bind_counter)
bind_counter--;
- build_bind_pkt();
+ DEVO_build_bind_pkt();
phase = DEVO_BIND_SENDCH;
break;
case DEVO_BIND_SENDCH:
- if(bind_counter>0)
+ if(bind_counter)
bind_counter--;
- build_data_pkt();
- scramble_pkt();
+ DEVO_build_data_pkt();
+ DEVO_scramble_pkt();
if (bind_counter == 0)
{
phase = DEVO_BOUND;
@@ -250,10 +285,10 @@ static void __attribute__((unused)) DEVO_BuildPacket()
case DEVO_BOUND_7:
case DEVO_BOUND_8:
case DEVO_BOUND_9:
- build_data_pkt();
- scramble_pkt();
+ DEVO_build_data_pkt();
+ DEVO_scramble_pkt();
phase++;
- if (bind_counter > 0)
+ if (bind_counter)
{
bind_counter--;
if (bind_counter == 0)
@@ -261,19 +296,20 @@ static void __attribute__((unused)) DEVO_BuildPacket()
}
break;
case DEVO_BOUND_10:
- build_beacon_pkt(DEVO_NUM_CHANNELS > 8 ? failsafe_pkt : 0);
+ DEVO_build_beacon_pkt(DEVO_NUM_CHANNELS > 8 ? failsafe_pkt : 0);
failsafe_pkt = failsafe_pkt ? 0 : 1;
- scramble_pkt();
+ DEVO_scramble_pkt();
phase = DEVO_BOUND_1;
break;
}
- pkt_num++;
- if(pkt_num == PKTS_PER_CHANNEL)
- pkt_num = 0;
+ packet_count++;
+ if(packet_count == DEVO_PKTS_PER_CHANNEL)
+ packet_count = 0;
}
uint16_t devo_callback()
{
+ static uint8_t txState=0;
if (txState == 0)
{
txState = 1;
@@ -284,24 +320,24 @@ uint16_t devo_callback()
txState = 0;
uint8_t i = 0;
while (! (CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS) & 0x02))
- if(++i > NUM_WAIT_LOOPS)
+ if(++i > DEVO_NUM_WAIT_LOOPS)
return 1200;
if (phase == DEVO_BOUND)
{
/* exit binding state */
phase = DEVO_BOUND_3;
- cyrf_set_bound_sop_code();
+ DEVO_cyrf_set_bound_sop_code();
}
- if(pkt_num == 0)
+ if(packet_count == 0)
{
- //Keep tx power updated
- CYRF_SetPower(0x08);
+ CYRF_SetPower(0x08); //Keep tx power updated
hopping_frequency_ptr = hopping_frequency_ptr == &hopping_frequency[2] ? hopping_frequency : hopping_frequency_ptr + 1;
CYRF_ConfigRFChannel(*hopping_frequency_ptr);
}
return 1200;
}
+<<<<<<< HEAD
/*static void __attribute__((unused)) devo_bind()
{
fixed_id = Model_fixed_id;
@@ -328,63 +364,39 @@ devo_bind();
*/
+=======
+>>>>>>> refs/remotes/pascallanger/master
uint16_t DevoInit()
{
- CYRF_Reset();
- cyrf_init();
+ DEVO_cyrf_init();
CYRF_GetMfgData(cyrfmfg_id);
CYRF_SetTxRxMode(TX_EN);
CYRF_ConfigCRCSeed(0x0000);
- CYRF_ConfigSOPCode(sopcodes[0]);
- set_radio_channels();
- use_fixed_id = 0;
- failsafe_pkt = 0;
+ CYRF_PROGMEM_ConfigSOPCode(DEVO_j6pro_sopcodes[0]);
+ DEVO_set_radio_channels();
+
hopping_frequency_ptr = hopping_frequency;
- //
CYRF_ConfigRFChannel(*hopping_frequency_ptr);
- //FIXME: Properly setnumber of channels;
- pkt_num = 0;
- ch_idx = 0;
- txState = 0;
- //uint8_t txid[4];
- //
-
- /*
-if(BIND_0){
-Model_fixed_id=0;
-eeprom_write_block((const void*)0,(void*)40,4);
-while(1){
-LED_ON;
-delay(100);
-LED_OFF;
-delay(100);
-}
-}
-else{
-eeprom_read_block((void*)txid,(const void*)40,3);
-Model_fixed_id=(txid[0] | ((uint32_t)txid[1]<<8) | ((uint32_t)txid[2]<<16));
-}
-*/
-
- if(! Model_fixed_id)
- {//model fixed ID =0
- fixed_id = ((uint32_t)(hopping_frequency[0] ^ cyrfmfg_id[0] ^ cyrfmfg_id[3]) << 16)
- | ((uint32_t)(hopping_frequency[1] ^ cyrfmfg_id[1] ^ cyrfmfg_id[4]) << 8)
- | ((uint32_t)(hopping_frequency[2] ^ cyrfmfg_id[2] ^ cyrfmfg_id[5]) << 0);
- fixed_id = fixed_id % 1000000;
+
+ packet_count = 0;
+
+ prev_option=option;
+ if(option==0)
+ {
+ MProtocol_id = ((uint32_t)(hopping_frequency[0] ^ cyrfmfg_id[0] ^ cyrfmfg_id[3]) << 16)
+ | ((uint32_t)(hopping_frequency[1] ^ cyrfmfg_id[1] ^ cyrfmfg_id[4]) << 8)
+ | ((uint32_t)(hopping_frequency[2] ^ cyrfmfg_id[2] ^ cyrfmfg_id[5]) << 0);
+ MProtocol_id %= 1000000;
bind_counter = DEVO_BIND_COUNT;
phase = DEVO_BIND;
- //PROTOCOL_SetBindState(0x1388 * 2400 / 1000); //msecs
+ BIND_IN_PROGRESS;
}
else
{
- fixed_id = Model_fixed_id;
- use_fixed_id = 1;
phase = DEVO_BOUND_1;
bind_counter = 0;
- cyrf_set_bound_sop_code();
+ DEVO_cyrf_set_bound_sop_code();
}
-
return 2400;
}
diff --git a/Multiprotocol/ESky_nrf24l01.ino b/Multiprotocol/ESky_nrf24l01.ino
index 7641a9d..80fdd85 100644
--- a/Multiprotocol/ESky_nrf24l01.ino
+++ b/Multiprotocol/ESky_nrf24l01.ino
@@ -35,7 +35,7 @@ static void __attribute__((unused)) ESKY_init(uint8_t bind)
NRF24L01_Initialize();
// 2-bytes CRC, radio off
- NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO));
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO));
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknowledgement
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0
if (bind)
@@ -119,8 +119,8 @@ static void __attribute__((unused)) ESKY_send_packet(uint8_t bind)
{
for (uint8_t i = 0; i < 6; i++)
{
- packet[i*2] = Servo_data[ch[i]]>>8; //high byte of servo timing(1000-2000us)
- packet[i*2+1] = Servo_data[ch[i]]&0xFF; //low byte of servo timing(1000-2000us)
+ packet[i*2] = Servo_data[CH_AETR[i]]>>8; //high byte of servo timing(1000-2000us)
+ packet[i*2+1] = Servo_data[CH_AETR[i]]&0xFF; //low byte of servo timing(1000-2000us)
}
}
rf_ch = hopping_frequency[hopping_frequency_no];
diff --git a/Multiprotocol/FQ777_nrf24l01.ino b/Multiprotocol/FQ777_nrf24l01.ino
new file mode 100644
index 0000000..369812f
--- /dev/null
+++ b/Multiprotocol/FQ777_nrf24l01.ino
@@ -0,0 +1,212 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+// Last sync with bikemike FQ777-124.ino
+
+#if defined(FQ777_NRF24L01_INO)
+
+#include "iface_nrf24l01.h"
+
+#define FQ777_INITIAL_WAIT 500
+#define FQ777_PACKET_PERIOD 2000
+#define FQ777_PACKET_SIZE 8
+#define FQ777_BIND_COUNT 1000
+#define FQ777_NUM_RF_CHANNELS 4
+
+enum {
+ FQ777_FLAG_RETURN = 0x40, // 0x40 when not off, !0x40 when one key return
+ FQ777_FLAG_HEADLESS = 0x04,
+ FQ777_FLAG_EXPERT = 0x01,
+ FQ777_FLAG_FLIP = 0x80,
+};
+
+const uint8_t ssv_xor[] = {0x80,0x44,0x64,0x75,0x6C,0x71,0x2A,0x36,0x7C,0xF1,0x6E,0x52,0x9,0x9D,0x1F,0x78,0x3F,0xE1,0xEE,0x16,0x6D,0xE8,0x73,0x9,0x15,0xD7,0x92,0xE7,0x3,0xBA};
+uint8_t FQ777_bind_addr [] = {0xe7,0xe7,0xe7,0xe7,0x67};
+
+static void __attribute__((unused)) ssv_pack_dpl(uint8_t addr[], uint8_t pid, uint8_t* len, uint8_t* payload, uint8_t* packed_payload)
+{
+ uint8_t i = 0;
+
+ uint16_t pcf = (*len & 0x3f) << 3;
+ pcf |= (pid & 0x3) << 1;
+ pcf |= 0x00; // noack field
+
+ uint8_t header[7] = {0};
+ header[6] = pcf;
+ header[5] = (pcf >> 7) | (addr[0] << 1);
+ header[4] = (addr[0] >> 7) | (addr[1] << 1);
+ header[3] = (addr[1] >> 7) | (addr[2] << 1);
+ header[2] = (addr[2] >> 7) | (addr[3] << 1);
+ header[1] = (addr[3] >> 7) | (addr[4] << 1);
+ header[0] = (addr[4] >> 7);
+
+ // calculate the crc
+ union
+ {
+ uint8_t bytes[2];
+ uint16_t val;
+ } crc;
+
+ crc.val=0x3c18;
+ for (i = 0; i < 7; ++i)
+ crc.val=crc16_update(crc.val,header[i]);
+ for (i = 0; i < *len; ++i)
+ crc.val=crc16_update(crc.val,payload[i]);
+
+ // encode payload and crc
+ // xor with this:
+ for (i = 0; i < *len; ++i)
+ payload[i] ^= ssv_xor[i];
+ crc.bytes[1] ^= ssv_xor[i++];
+ crc.bytes[0] ^= ssv_xor[i++];
+
+ // pack the pcf, payload, and crc into packed_payload
+ packed_payload[0] = pcf >> 1;
+ packed_payload[1] = (pcf << 7) | (payload[0] >> 1);
+
+ for (i = 0; i < *len - 1; ++i)
+ packed_payload[i+2] = (payload[i] << 7) | (payload[i+1] >> 1);
+
+ packed_payload[i+2] = (payload[i] << 7) | (crc.val >> 9);
+ ++i;
+ packed_payload[i+2] = (crc.val >> 1 & 0x80 ) | (crc.val >> 1 & 0x7F);
+ ++i;
+ packed_payload[i+2] = (crc.val << 7);
+
+ *len += 4;
+}
+
+static void __attribute__((unused)) FQ777_send_packet(uint8_t bind)
+{
+ uint8_t packet_len = FQ777_PACKET_SIZE;
+ uint8_t packet_ori[8];
+ if (bind)
+ {
+ // 4,5,6 = address fields
+ // last field is checksum of address fields
+ packet_ori[0] = 0x20;
+ packet_ori[1] = 0x15;
+ packet_ori[2] = 0x05;
+ packet_ori[3] = 0x06;
+ packet_ori[4] = rx_tx_addr[0];
+ packet_ori[5] = rx_tx_addr[1];
+ packet_ori[6] = rx_tx_addr[2];
+ packet_ori[7] = packet_ori[4] + packet_ori[5] + packet_ori[6];
+ }
+ else
+ {
+ // throt, yaw, pitch, roll, trims, flags/left button,00,right button
+ //0-3 0x00-0x64
+ //4 roll/pitch/yaw trims. cycles through one trim at a time - 0-40 trim1, 40-80 trim2, 80-C0 trim3 (center: A0 20 60)
+ //5 flags for throttle button, two buttons above throttle - def: 0x40
+ //6 00 ??
+ //7 checksum - add values in other fields
+
+
+ // Trims are usually done through the radio configuration but leaving the code here just in case...
+ uint8_t trim_mod = packet_count % 144;
+ uint8_t trim_val = 0;
+ if (36 <= trim_mod && trim_mod < 72) // yaw
+ trim_val = 0x20; // don't modify yaw trim
+ else
+ if (108 < trim_mod && trim_mod) // pitch
+ trim_val = 0xA0;
+ else // roll
+ trim_val = 0x60;
+
+ packet_ori[0] = convert_channel_8b_scale(THROTTLE,0,0x64);
+ packet_ori[1] = convert_channel_8b_scale(RUDDER,0,0x64);
+ packet_ori[2] = convert_channel_8b_scale(ELEVATOR,0,0x64);
+ packet_ori[3] = convert_channel_8b_scale(AILERON,0,0x64);
+ packet_ori[4] = trim_val; // calculated above
+ packet_ori[5] = GET_FLAG(Servo_AUX1, FQ777_FLAG_FLIP)
+ | GET_FLAG(Servo_AUX3, FQ777_FLAG_HEADLESS)
+ | GET_FLAG(!Servo_AUX2, FQ777_FLAG_RETURN)
+ | GET_FLAG(Servo_AUX4,FQ777_FLAG_EXPERT);
+ packet_ori[6] = 0x00;
+ // calculate checksum
+ uint8_t checksum = 0;
+ for (int i = 0; i < 7; ++i)
+ checksum += packet_ori[i];
+ packet_ori[7] = checksum;
+
+ packet_count++;
+ }
+
+ ssv_pack_dpl( (0 == bind) ? rx_tx_addr : FQ777_bind_addr, hopping_frequency_no, &packet_len, packet_ori, packet);
+
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG,_BV(NRF24L01_00_PWR_UP));
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no++]);
+ hopping_frequency_no %= FQ777_NUM_RF_CHANNELS;
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
+ NRF24L01_FlushTx();
+ NRF24L01_WritePayload(packet, packet_len);
+ NRF24L01_WritePayload(packet, packet_len);
+ NRF24L01_WritePayload(packet, packet_len);
+}
+
+static void __attribute__((unused)) FQ777_init()
+{
+ NRF24L01_Initialize();
+ NRF24L01_SetTxRxMode(TX_EN);
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, FQ777_bind_addr, 5);
+ NRF24L01_FlushTx();
+ NRF24L01_FlushRx();
+ NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknowledgement on all data pipes
+ NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x00);
+ NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03);
+ NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0x00); // no retransmits
+ NRF24L01_SetBitrate(NRF24L01_BR_250K);
+ NRF24L01_SetPower();
+ NRF24L01_Activate(0x73); // Activate feature register
+ NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x00); // Disable dynamic payload length on all pipes
+ NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x01);
+ NRF24L01_Activate(0x73);
+}
+
+uint16_t FQ777_callback()
+{
+ if(bind_counter!=0)
+ {
+ FQ777_send_packet(1);
+ bind_counter--;
+ if (bind_counter == 0)
+ {
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, 5);
+ BIND_DONE;
+ }
+ }
+ else
+ FQ777_send_packet(0);
+ return FQ777_PACKET_PERIOD;
+}
+
+uint16_t initFQ777(void)
+{
+ BIND_IN_PROGRESS; // autobind protocol
+ bind_counter = FQ777_BIND_COUNT;
+ packet_count=0;
+ hopping_frequency[0] = 0x4D;
+ hopping_frequency[1] = 0x43;
+ hopping_frequency[2] = 0x27;
+ hopping_frequency[3] = 0x07;
+ hopping_frequency_no=0;
+ rx_tx_addr[2] = 0x00;
+ rx_tx_addr[3] = 0xe7;
+ rx_tx_addr[4] = 0x67;
+ FQ777_init();
+ return FQ777_INITIAL_WAIT;
+}
+
+#endif
diff --git a/Multiprotocol/FY326_nrf24l01.ino b/Multiprotocol/FY326_nrf24l01.ino
index 6417bfb..670103f 100644
--- a/Multiprotocol/FY326_nrf24l01.ino
+++ b/Multiprotocol/FY326_nrf24l01.ino
@@ -15,17 +15,26 @@
// Last sync with hexfet new_protocols/fy326_nrf24l01.c dated 2015-07-29
#if defined(FY326_NRF24L01_INO)
+<<<<<<< HEAD
+=======
+
+>>>>>>> refs/remotes/pascallanger/master
#include "iface_nrf24l01.h"
#define FY326_INITIAL_WAIT 500
#define FY326_PACKET_PERIOD 1500
#define FY326_PACKET_CHKTIME 300
#define FY326_PACKET_SIZE 15
+<<<<<<< HEAD
#define FY326_BIND_COUNT 16
+=======
+#define FY326_BIND_COUNT 16
+>>>>>>> refs/remotes/pascallanger/master
#define FY326_RF_BIND_CHANNEL 0x17
#define FY326_NUM_RF_CHANNELS 5
enum {
+<<<<<<< HEAD
FY326_INIT1 = 0,
FY326_BIND1,
FY326_BIND2,
@@ -33,6 +42,11 @@ enum {
FY319_INIT1,
FY319_BIND1,
FY319_BIND2,
+=======
+ FY326_BIND1=0,
+ FY326_BIND2,
+ FY326_DATA
+>>>>>>> refs/remotes/pascallanger/master
};
#define rxid channel
@@ -42,7 +56,11 @@ static void __attribute__((unused)) FY326_send_packet(uint8_t bind)
{
packet[0] = rx_tx_addr[3];
if(bind)
+<<<<<<< HEAD
packet[1] = 0x55;
+=======
+ packet[1] = 0x55;
+>>>>>>> refs/remotes/pascallanger/master
else
packet[1] = GET_FLAG(Servo_AUX3, 0x80) // Headless
| GET_FLAG(Servo_AUX2, 0x40) // RTH
@@ -53,6 +71,7 @@ static void __attribute__((unused)) FY326_send_packet(uint8_t bind)
packet[3] = convert_channel_8b_scale(ELEVATOR, 0, 200); // elevator
packet[4] = 200 - convert_channel_8b_scale(RUDDER, 0, 200); // rudder
packet[5] = convert_channel_8b_scale(THROTTLE, 0, 200); // throttle
+<<<<<<< HEAD
if(sub_protocol == FY319) {
packet[6] = 255 - scale_channel(AILERON, 0, 255);
packet[7] = scale_channel(ELEVATOR, 0, 255);
@@ -68,6 +87,16 @@ static void __attribute__((unused)) FY326_send_packet(uint8_t bind)
packet[11] = CHAN_TO_TRIM(packet[4]); // rudder_trim;
packet[12] = 0; // throttle_trim;
packet[13] = rxid;
+=======
+ packet[6] = rx_tx_addr[0];
+ packet[7] = rx_tx_addr[1];
+ packet[8] = rx_tx_addr[2];
+ packet[9] = CHAN_TO_TRIM(packet[2]); // aileron_trim;
+ packet[10] = CHAN_TO_TRIM(packet[3]); // elevator_trim;
+ packet[11] = CHAN_TO_TRIM(packet[4]); // rudder_trim;
+ packet[12] = 0; // throttle_trim;
+ packet[13] = rxid;
+>>>>>>> refs/remotes/pascallanger/master
packet[14] = rx_tx_addr[4];
if (bind)
@@ -76,12 +105,20 @@ static void __attribute__((unused)) FY326_send_packet(uint8_t bind)
{
NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no++]);
hopping_frequency_no %= FY326_NUM_RF_CHANNELS;
+<<<<<<< HEAD
}
// clear packet status bits and TX FIFO
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
NRF24L01_FlushTx();
+=======
+ }
+
+ // clear packet status bits and TX FIFO
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
+ NRF24L01_FlushTx();
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WritePayload(packet, FY326_PACKET_SIZE);
@@ -90,12 +127,18 @@ static void __attribute__((unused)) FY326_send_packet(uint8_t bind)
static void __attribute__((unused)) FY326_init()
{
+<<<<<<< HEAD
NRF24L01_Initialize();
NRF24L01_SetTxRxMode(TX_EN);
if(sub_protocol == FY319)
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // Five-byte rx/tx address
else
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x01); // Three-byte rx/tx address
+=======
+ NRF24L01_Initialize();
+ NRF24L01_SetTxRxMode(TX_EN);
+ NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x01); // Three-byte rx/tx address
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, (uint8_t *)"\x15\x59\x23\xc6\x29", 5);
NRF24L01_WriteRegisterMulti(NRF24L01_0A_RX_ADDR_P0, (uint8_t *)"\x15\x59\x23\xc6\x29", 5);
NRF24L01_FlushTx();
@@ -107,13 +150,19 @@ static void __attribute__((unused)) FY326_init()
NRF24L01_WriteReg(NRF24L01_05_RF_CH, FY326_RF_BIND_CHANNEL);
NRF24L01_SetBitrate(NRF24L01_BR_250K);
NRF24L01_SetPower();
+<<<<<<< HEAD
NRF24L01_Activate(0x73);
+=======
+
+ NRF24L01_Activate(0x73);
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x3f);
NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x07);
NRF24L01_Activate(0x73);
}
+<<<<<<< HEAD
uint16_t fy326_callback()
{
uint8_t i;
@@ -206,11 +255,55 @@ uint16_t fy326_callback()
FY326_send_packet(0);
break;
}
+=======
+uint16_t FY326_callback()
+{
+ switch (phase)
+ {
+ case FY326_BIND1:
+ if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR))
+ { // RX fifo data ready
+ NRF24L01_ReadPayload(packet, FY326_PACKET_SIZE);
+ rxid = packet[13];
+ rx_tx_addr[0] = 0xAA;
+ NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_SetTxRxMode(TX_EN);
+ BIND_DONE;
+ phase = FY326_DATA;
+ }
+ else
+ if (bind_counter-- == 0)
+ {
+ bind_counter = FY326_BIND_COUNT;
+ NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_SetTxRxMode(TX_EN);
+ FY326_send_packet(1);
+ phase = FY326_BIND2;
+ return FY326_PACKET_CHKTIME;
+ }
+ break;
+ case FY326_BIND2:
+ if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_TX_DS))
+ { // TX data sent -> switch to RX mode
+ NRF24L01_SetTxRxMode(TXRX_OFF);
+ NRF24L01_FlushRx();
+ NRF24L01_SetTxRxMode(RX_EN);
+ phase = FY326_BIND1;
+ }
+ else
+ return FY326_PACKET_CHKTIME;
+ break;
+ case FY326_DATA:
+ FY326_send_packet(0);
+ break;
+ }
+>>>>>>> refs/remotes/pascallanger/master
return FY326_PACKET_PERIOD;
}
static void __attribute__((unused)) FY326_initialize_txid()
{
+<<<<<<< HEAD
if(sub_protocol == FY319) {
hopping_frequency[0] = (rx_tx_addr[0]&0x0f) & ~0x80;
hopping_frequency[1] = (rx_tx_addr[0] >> 4) & ~0x80;
@@ -224,11 +317,19 @@ static void __attribute__((unused)) FY326_initialize_txid()
hopping_frequency[3] = 0x30 + (rx_tx_addr[1] >> 4);
hopping_frequency[4] = 0x40 + (rx_tx_addr[2] >> 4);
}
+=======
+ hopping_frequency[0] = (rx_tx_addr[0]&0x0f);
+ hopping_frequency[1] = 0x10 + (rx_tx_addr[0] >> 4);
+ hopping_frequency[2] = 0x20 + (rx_tx_addr[1]&0x0f);
+ hopping_frequency[3] = 0x30 + (rx_tx_addr[1] >> 4);
+ hopping_frequency[4] = 0x40 + (rx_tx_addr[2] >> 4);
+>>>>>>> refs/remotes/pascallanger/master
}
uint16_t initFY326(void)
{
BIND_IN_PROGRESS; // autobind protocol
+<<<<<<< HEAD
rxid = 0xaa;
bind_counter = 0;
FY326_initialize_txid();
@@ -237,6 +338,13 @@ uint16_t initFY326(void)
phase = FY319_INIT1;
else
phase = FY326_INIT1;
+=======
+ rxid = 0xAA;
+ bind_counter = 0;
+ FY326_initialize_txid();
+ FY326_init();
+ phase=FY326_BIND1;
+>>>>>>> refs/remotes/pascallanger/master
return FY326_INITIAL_WAIT;
}
diff --git a/Multiprotocol/FlySky_a7105.ino b/Multiprotocol/FlySky_a7105.ino
index f32ae11..1165aea 100644
--- a/Multiprotocol/FlySky_a7105.ino
+++ b/Multiprotocol/FlySky_a7105.ino
@@ -21,6 +21,7 @@
//FlySky constants & variables
#define FLYSKY_BIND_COUNT 2500
+<<<<<<< HEAD
const uint8_t PROGMEM tx_channels[] = {
0x0a, 0x5a, 0x14, 0x64, 0x1e, 0x6e, 0x28, 0x78, 0x32, 0x82, 0x3c, 0x8c, 0x46, 0x96, 0x50, 0xa0,
0xa0, 0x50, 0x96, 0x46, 0x8c, 0x3c, 0x82, 0x32, 0x78, 0x28, 0x6e, 0x1e, 0x64, 0x14, 0x5a, 0x0a,
@@ -47,6 +48,15 @@ enum {
// flags going to byte 12
FLAG_V9X9_FLIP = 0x10,
FLAG_V9X9_LED = 0x20,
+=======
+enum {
+ // flags going to byte 10
+ FLAG_V9X9_VIDEO = 0x40,
+ FLAG_V9X9_CAMERA= 0x80,
+ // flags going to byte 12
+ FLAG_V9X9_FLIP = 0x10,
+ FLAG_V9X9_LED = 0x20,
+>>>>>>> refs/remotes/pascallanger/master
};
enum {
@@ -69,12 +79,12 @@ enum {
FLAG_V912_BTMBTN= 0x80,
};
-uint8_t chanrow;
-uint8_t chancol;
-uint8_t chanoffset;
+const uint8_t PROGMEM V912_X17_SEQ[10] = { 0x14, 0x31, 0x40, 0x49, 0x49, // sometime first byte is 0x15 ?
+ 0x49, 0x49, 0x49, 0x49, 0x49, };
static void __attribute__((unused)) flysky_apply_extension_flags()
{
+<<<<<<< HEAD
const uint8_t V912_X17_SEQ[10] = { 0x14, 0x31, 0x40, 0x49, 0x49, // sometime first byte is 0x15 ?
0x49, 0x49, 0x49, 0x49, 0x49, };
static uint8_t seq_counter;
@@ -146,6 +156,77 @@ static void __attribute__((unused)) flysky_apply_extension_flags()
default:
break;
}
+=======
+ static uint8_t seq_counter;
+ switch(sub_protocol)
+ {
+ case V9X9:
+ if(Servo_AUX1)
+ packet[12] |= FLAG_V9X9_FLIP;
+ if(Servo_AUX2)
+ packet[12] |= FLAG_V9X9_LED;
+ if(Servo_AUX3)
+ packet[10] |= FLAG_V9X9_CAMERA;
+ if(Servo_AUX4)
+ packet[10] |= FLAG_V9X9_VIDEO;
+ break;
+
+ case V6X6:
+ packet[13] = 0x03; // 3 = 100% rate (0=40%, 1=60%, 2=80%)
+ packet[14] = 0x00;
+ if(Servo_AUX1)
+ packet[14] |= FLAG_V6X6_FLIP;
+ if(Servo_AUX2)
+ packet[14] |= FLAG_V6X6_LED;
+ if(Servo_AUX3)
+ packet[14] |= FLAG_V6X6_CAMERA;
+ if(Servo_AUX4)
+ packet[14] |= FLAG_V6X6_VIDEO;
+ if(Servo_AUX5)
+ {
+ packet[13] |= FLAG_V6X6_HLESS1;
+ packet[14] |= FLAG_V6X6_HLESS2;
+ }
+ if(Servo_AUX6) //use option to manipulate these bytes
+ packet[14] |= FLAG_V6X6_RTH;
+ if(Servo_AUX7)
+ packet[14] |= FLAG_V6X6_XCAL;
+ if(Servo_AUX8)
+ packet[14] |= FLAG_V6X6_YCAL;
+ packet[15] = 0x10; // unknown
+ packet[16] = 0x10; // unknown
+ packet[17] = 0xAA; // unknown
+ packet[18] = 0xAA; // unknown
+ packet[19] = 0x60; // unknown, changes at irregular interval in stock TX
+ packet[20] = 0x02; // unknown
+ break;
+
+ case V912:
+ seq_counter++;
+ if( seq_counter > 9)
+ seq_counter = 0;
+ packet[12] |= 0x20; // bit 6 is always set ?
+ packet[13] = 0x00; // unknown
+ packet[14] = 0x00;
+ if(Servo_AUX1)
+ packet[14] = FLAG_V912_BTMBTN;
+ if(Servo_AUX2)
+ packet[14] |= FLAG_V912_TOPBTN;
+ packet[15] = 0x27; // [15] and [16] apparently hold an analog channel with a value lower than 1000
+ packet[16] = 0x03; // maybe it's there for a pitch channel for a CP copter ?
+ packet[17] = pgm_read_byte( &V912_X17_SEQ[seq_counter] ) ; // not sure what [17] & [18] are for
+ if(seq_counter == 0) // V912 Rx does not even read those bytes... [17-20]
+ packet[18] = 0x02;
+ else
+ packet[18] = 0x00;
+ packet[19] = 0x00; // unknown
+ packet[20] = 0x00; // unknown
+ break;
+
+ default:
+ break;
+ }
+>>>>>>> refs/remotes/pascallanger/master
}
static void __attribute__((unused)) flysky_build_packet(uint8_t init)
@@ -161,12 +242,20 @@ static void __attribute__((unused)) flysky_build_packet(uint8_t init)
packet[2] = rx_tx_addr[2];
packet[3] = rx_tx_addr[1];
packet[4] = rx_tx_addr[0];
+<<<<<<< HEAD
const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
for(i = 0; i < 8; i++)
{
packet[5+2*i]=lowByte(Servo_data[ch[i]]); //low byte of servo timing(1000-2000us)
packet[6+2*i]=highByte(Servo_data[ch[i]]); //high byte of servo timing(1000-2000us)
}
+=======
+ for(i = 0; i < 8; i++)
+ {
+ packet[5 + i*2]=Servo_data[CH_AETR[i]]&0xFF; //low byte of servo timing(1000-2000us)
+ packet[6 + i*2]=(Servo_data[CH_AETR[i]]>>8)&0xFF; //high byte of servo timing(1000-2000us)
+ }
+>>>>>>> refs/remotes/pascallanger/master
flysky_apply_extension_flags();
}
@@ -180,6 +269,7 @@ uint16_t ReadFlySky()
if (! bind_counter)
BIND_DONE;
}
+<<<<<<< HEAD
else
{
flysky_build_packet(0);
@@ -207,7 +297,62 @@ uint16_t initFlySky() {
else
bind_counter = 0;
return 2400;
+=======
+ else
+ {
+ flysky_build_packet(0);
+ A7105_WriteData(21, hopping_frequency[hopping_frequency_no]);
+ hopping_frequency_no = (hopping_frequency_no + 1) & 0x0F;
+ A7105_SetPower();
+ }
+ return 1510; //1460 on deviation but not working with the latest V911 bricks... Turnigy 9X v2 is 1533, Flysky TX for 9XR/9XR Pro is 1510, V911 TX is 1490.
}
+const uint8_t PROGMEM tx_channels[8][4] = {
+ { 0x12, 0x34, 0x56, 0x78},
+ { 0x18, 0x27, 0x36, 0x45},
+ { 0x41, 0x82, 0x36, 0x57},
+ { 0x84, 0x13, 0x65, 0x72},
+ { 0x87, 0x64, 0x15, 0x32},
+ { 0x76, 0x84, 0x13, 0x52},
+ { 0x71, 0x62, 0x84, 0x35},
+ { 0x71, 0x86, 0x43, 0x52}
+};
+
+uint16_t initFlySky()
+{
+ uint8_t chanrow;
+ uint8_t chanoffset;
+ uint8_t temp;
+
+ A7105_Init(INIT_FLYSKY); //flysky_init();
+
+ if ((rx_tx_addr[3]&0xF0) > 0x90) // limit offset to 9 as higher values don't work with some RX (ie V912)
+ rx_tx_addr[3]=rx_tx_addr[3]-0x70;
+ chanrow=rx_tx_addr[3] & 0x0F;
+ chanoffset=rx_tx_addr[3]/16;
+
+ // Build frequency hop table
+ for(uint8_t i=0;i<16;i++)
+ {
+ temp=pgm_read_byte_near(&tx_channels[chanrow>>1][i>>2]);
+ if(i&0x01)
+ temp&=0x0F;
+ else
+ temp>>=4;
+ temp*=0x0A;
+ if(i&0x02)
+ temp+=0x50;
+ hopping_frequency[((chanrow&1)?15-i:i)]=temp-chanoffset;
+ }
+ hopping_frequency_no=0;
+
+ if(IS_AUTOBIND_FLAG_on)
+ bind_counter = FLYSKY_BIND_COUNT;
+ else
+ bind_counter = 0;
+ return 2400;
+>>>>>>> refs/remotes/pascallanger/master
+}
#endif
diff --git a/Multiprotocol/FrSkyD_cc2500.ino b/Multiprotocol/FrSkyD_cc2500.ino
new file mode 100644
index 0000000..9bc2ff5
--- /dev/null
+++ b/Multiprotocol/FrSkyD_cc2500.ino
@@ -0,0 +1,208 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+#if defined(FRSKYD_CC2500_INO)
+
+#include "iface_cc2500.h"
+
+static void __attribute__((unused)) frsky2way_init(uint8_t bind)
+{
+ // Configure cc2500 for tx mode
+ //
+ for(uint8_t i=0;i<36;i++)
+ {
+ uint8_t reg=pgm_read_byte_near(&cc2500_conf[i][0]);
+ uint8_t val=pgm_read_byte_near(&cc2500_conf[i][1]);
+
+ if(reg==CC2500_0C_FSCTRL0)
+ val=option;
+ else
+ if(reg==CC2500_1B_AGCCTRL2)
+ val=bind ? 0x43 : 0x03;
+ CC2500_WriteReg(reg,val);
+ }
+ prev_option = option ;
+
+ CC2500_SetTxRxMode(TX_EN);
+ CC2500_SetPower();
+
+ CC2500_Strobe(CC2500_SIDLE);
+
+ CC2500_WriteReg(CC2500_09_ADDR, bind ? 0x03 : rx_tx_addr[3]);
+ CC2500_WriteReg(CC2500_07_PKTCTRL1, 0x05);
+ CC2500_Strobe(CC2500_SIDLE); // Go to idle...
+ //
+ CC2500_WriteReg(CC2500_0A_CHANNR, 0x00);
+ CC2500_WriteReg(CC2500_23_FSCAL3, 0x89);
+ CC2500_Strobe(CC2500_SFRX);
+ //#######END INIT########
+}
+
+static uint8_t __attribute__((unused)) get_chan_num(uint16_t idx)
+{
+ uint8_t ret = (idx * 0x1e) % 0xeb;
+ if(idx == 3 || idx == 23 || idx == 47)
+ ret++;
+ if(idx > 47)
+ return 0;
+ return ret;
+}
+
+static void __attribute__((unused)) frsky2way_build_bind_packet()
+{
+ //11 03 01 d7 2d 00 00 1e 3c 5b 78 00 00 00 00 00 00 01
+ //11 03 01 19 3e 00 02 8e 2f bb 5c 00 00 00 00 00 00 01
+ packet[0] = 0x11;
+ packet[1] = 0x03;
+ packet[2] = 0x01;
+ packet[3] = rx_tx_addr[3];
+ packet[4] = rx_tx_addr[2];
+ uint16_t idx = ((state -FRSKY_BIND) % 10) * 5;
+ packet[5] = idx;
+ packet[6] = get_chan_num(idx++);
+ packet[7] = get_chan_num(idx++);
+ packet[8] = get_chan_num(idx++);
+ packet[9] = get_chan_num(idx++);
+ packet[10] = get_chan_num(idx++);
+ packet[11] = 0x00;
+ packet[12] = 0x00;
+ packet[13] = 0x00;
+ packet[14] = 0x00;
+ packet[15] = 0x00;
+ packet[16] = 0x00;
+ packet[17] = 0x01;
+}
+
+static void __attribute__((unused)) frsky2way_data_frame()
+{//pachet[4] is telemetry user frame counter(hub)
+ //11 d7 2d 22 00 01 c9 c9 ca ca 88 88 ca ca c9 ca 88 88
+ //11 57 12 00 00 01 f2 f2 f2 f2 06 06 ca ca ca ca 18 18
+ packet[0] = 0x11; //Length
+ packet[1] = rx_tx_addr[3];
+ packet[2] = rx_tx_addr[2];
+ packet[3] = counter;//
+ #if defined TELEMETRY
+ packet[4] = telemetry_counter;
+ #else
+ packet[4] = 0x00;
+ #endif
+
+ packet[5] = 0x01;
+ //
+ packet[10] = 0;
+ packet[11] = 0;
+ packet[16] = 0;
+ packet[17] = 0;
+ for(uint8_t i = 0; i < 8; i++)
+ {
+ uint16_t value;
+ value = convert_channel_frsky(i);
+ if(i < 4)
+ {
+ packet[6+i] = value & 0xff;
+ packet[10+(i>>1)] |= ((value >> 8) & 0x0f) << (4 *(i & 0x01));
+ }
+ else
+ {
+ packet[8+i] = value & 0xff;
+ packet[16+((i-4)>>1)] |= ((value >> 8) & 0x0f) << (4 * ((i-4) & 0x01));
+ }
+ }
+}
+
+uint16_t initFrSky_2way()
+{
+ if(IS_AUTOBIND_FLAG_on)
+ {
+ frsky2way_init(1);
+ state = FRSKY_BIND;
+ }
+ else
+ {
+ frsky2way_init(0);
+ state = FRSKY_DATA2;
+ }
+ return 10000;
+}
+
+uint16_t ReadFrSky_2way()
+{
+ if (state < FRSKY_BIND_DONE)
+ {
+ frsky2way_build_bind_packet();
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, 0x00);
+ CC2500_WriteReg(CC2500_23_FSCAL3, 0x89);
+ CC2500_Strobe(CC2500_SFRX);//0x3A
+ CC2500_WriteData(packet, packet[0]+1);
+ state++;
+ return 9000;
+ }
+ if (state == FRSKY_BIND_DONE)
+ {
+ state = FRSKY_DATA2;
+ frsky2way_init(0);
+ counter = 0;
+ BIND_DONE;
+ }
+ else
+ if (state == FRSKY_DATA5)
+ {
+ CC2500_Strobe(CC2500_SRX);//0x34 RX enable
+ state = FRSKY_DATA1;
+ return 9200;
+ }
+ counter = (counter + 1) % 188;
+ if (state == FRSKY_DATA4)
+ { //telemetry receive
+ CC2500_SetTxRxMode(RX_EN);
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, get_chan_num(counter % 47));
+ CC2500_WriteReg(CC2500_23_FSCAL3, 0x89);
+ state++;
+ return 1300;
+ }
+ else
+ {
+ if (state == FRSKY_DATA1)
+ {
+ len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
+ if (len && len<=MAX_PKT)//27 bytes
+ {
+ CC2500_ReadData(pkt, len); //received telemetry packets
+ #if defined(TELEMETRY)
+ //parse telemetry packet here
+ frsky_check_telemetry(pkt,len); //check if valid telemetry packets and buffer them.
+ #endif
+ }
+ CC2500_SetTxRxMode(TX_EN);
+ CC2500_SetPower(); // Set tx_power
+ }
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, get_chan_num(counter % 47));
+ if ( prev_option != option )
+ {
+ CC2500_WriteReg(CC2500_0C_FSCTRL0,option); // Frequency offset hack
+ prev_option = option ;
+ }
+ CC2500_WriteReg(CC2500_23_FSCAL3, 0x89);
+ CC2500_Strobe(CC2500_SFRX);
+ frsky2way_data_frame();
+ CC2500_WriteData(packet, packet[0]+1);
+ state++;
+ }
+ return state == FRSKY_DATA4 ? 7500 : 9000;
+}
+#endif
diff --git a/Multiprotocol/FrSkyV_cc2500.ino b/Multiprotocol/FrSkyV_cc2500.ino
new file mode 100644
index 0000000..aaf88a9
--- /dev/null
+++ b/Multiprotocol/FrSkyV_cc2500.ino
@@ -0,0 +1,209 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+#if defined(FRSKYV_CC2500_INO)
+
+#define FRSKYV_BIND_COUNT 200
+
+enum {
+ FRSKYV_DATA1=0,
+ FRSKYV_DATA2,
+ FRSKYV_DATA3,
+ FRSKYV_DATA4,
+ FRSKYV_DATA5
+};
+
+
+#include "iface_cc2500.h"
+const PROGMEM uint8_t FRSKYV_cc2500_conf[][2]={
+ { CC2500_17_MCSM1, 0x0c },
+ { CC2500_18_MCSM0, 0x18 },
+ { CC2500_06_PKTLEN, 0xff },
+ { CC2500_07_PKTCTRL1, 0x04 },
+ { CC2500_08_PKTCTRL0, 0x05 },
+ { CC2500_3E_PATABLE, 0xfe },
+ { CC2500_0B_FSCTRL1, 0x08 },
+ { CC2500_0C_FSCTRL0, 0x00 },
+ { CC2500_0D_FREQ2, 0x5c },
+ { CC2500_0E_FREQ1, 0x58 },
+ { CC2500_0F_FREQ0, 0x9d },
+ { CC2500_10_MDMCFG4, 0xaa },
+ { CC2500_11_MDMCFG3, 0x10 },
+ { CC2500_12_MDMCFG2, 0x93 },
+ { CC2500_13_MDMCFG1, 0x23 },
+ { CC2500_14_MDMCFG0, 0x7a },
+ { CC2500_15_DEVIATN, 0x41 }
+};
+
+static void __attribute__((unused)) FRSKYV_init()
+{
+ for(uint8_t i=0;i<17;i++)
+ {
+ uint8_t reg=pgm_read_byte_near(&FRSKYV_cc2500_conf[i][0]);
+ uint8_t val=pgm_read_byte_near(&FRSKYV_cc2500_conf[i][1]);
+ if(reg==CC2500_0C_FSCTRL0)
+ val=option;
+ CC2500_WriteReg(reg,val);
+ }
+ prev_option = option ;
+ for(uint8_t i=19;i<36;i++)
+ {
+ uint8_t reg=pgm_read_byte_near(&cc2500_conf[i][0]);
+ uint8_t val=pgm_read_byte_near(&cc2500_conf[i][1]);
+ CC2500_WriteReg(reg,val);
+ }
+
+ CC2500_SetTxRxMode(TX_EN);
+ CC2500_SetPower();
+
+ CC2500_Strobe(CC2500_SIDLE); // Go to idle...
+}
+
+static uint8_t __attribute__((unused)) FRSKYV_crc8(uint8_t result, uint8_t *data, uint8_t len)
+{
+ for(uint8_t i = 0; i < len; i++)
+ {
+ result = result ^ data[i];
+ for(uint8_t j = 0; j < 8; j++)
+ if(result & 0x80)
+ result = (result << 1) ^ 0x07;
+ else
+ result = result << 1;
+ }
+ return result;
+}
+
+static uint8_t __attribute__((unused)) FRSKYV_crc8_le(uint8_t *data, uint8_t len)
+{
+ uint8_t result = 0xD6;
+
+ for(uint8_t i = 0; i < len; i++)
+ {
+ result = result ^ data[i];
+ for(uint8_t j = 0; j < 8; j++)
+ if(result & 0x01)
+ result = (result >> 1) ^ 0x83;
+ else
+ result = result >> 1;
+ }
+ return result;
+}
+
+static void __attribute__((unused)) FRSKYV_build_bind_packet()
+{
+ //0e 03 01 57 12 00 06 0b 10 15 1a 00 00 00 61
+ packet[0] = 0x0e; //Length
+ packet[1] = 0x03; //Packet type
+ packet[2] = 0x01; //Packet type
+ packet[3] = rx_tx_addr[3];
+ packet[4] = rx_tx_addr[2];
+ packet[5] = (binding_idx % 10) * 5;
+ packet[6] = packet[5] * 5 + 6;
+ packet[7] = packet[5] * 5 + 11;
+ packet[8] = packet[5] * 5 + 16;
+ packet[9] = packet[5] * 5 + 21;
+ packet[10] = packet[5] * 5 + 26;
+ packet[11] = 0x00;
+ packet[12] = 0x00;
+ packet[13] = 0x00;
+ packet[14] = FRSKYV_crc8(0x93, packet, 14);
+}
+
+static uint8_t __attribute__((unused)) FRSKYV_calc_channel()
+{
+ uint32_t temp=seed;
+ temp = (temp * 0xaa) % 0x7673;
+ seed = temp;
+ return (seed & 0xff) % 0x32;
+}
+
+static void __attribute__((unused)) FRSKYV_build_data_packet()
+{
+ uint8_t idx = 0; // transmit lower channels
+
+ packet[0] = 0x0e;
+ packet[1] = rx_tx_addr[3];
+ packet[2] = rx_tx_addr[2];
+ packet[3] = seed & 0xff;
+ packet[4] = seed >> 8;
+ if (phase == FRSKYV_DATA1 || phase == FRSKYV_DATA3)
+ packet[5] = 0x0f;
+ else
+ if(phase == FRSKYV_DATA2 || phase == FRSKYV_DATA4)
+ {
+ packet[5] = 0xf0;
+ idx=4; // transmit upper channels
+ }
+ else
+ packet[5] = 0x00;
+ for(uint8_t i = 0; i < 4; i++)
+ {
+ uint16_t value = convert_channel_frsky(i+idx);
+ packet[2*i + 6] = value & 0xff;
+ packet[2*i + 7] = value >> 8;
+ }
+ packet[14] = FRSKYV_crc8(crc8, packet, 14);
+}
+
+uint16_t ReadFRSKYV()
+{
+ if(IS_BIND_DONE_on)
+ { // Normal operation
+ uint8_t chan = FRSKYV_calc_channel();
+ CC2500_Strobe(CC2500_SIDLE);
+ if (option != prev_option)
+ {
+ CC2500_WriteReg(CC2500_0C_FSCTRL0, option);
+ prev_option=option;
+ }
+ CC2500_WriteReg(CC2500_0A_CHANNR, chan * 5 + 6);
+ FRSKYV_build_data_packet();
+
+ if (phase == FRSKYV_DATA5)
+ {
+ CC2500_SetPower();
+ phase = FRSKYV_DATA1;
+ }
+ else
+ phase++;
+
+ CC2500_WriteData(packet, packet[0]+1);
+ return 9006;
+ }
+ // Bind mode
+ FRSKYV_build_bind_packet();
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, 0x00);
+ CC2500_WriteData(packet, packet[0]+1);
+ binding_idx++;
+ if(binding_idx>=FRSKYV_BIND_COUNT)
+ BIND_DONE;
+ return 53460;
+}
+
+uint16_t initFRSKYV()
+{
+ //ID is 15 bits. Using rx_tx_addr[2] and rx_tx_addr[3] since we want to use RX_Num for model match
+ rx_tx_addr[2]&=0x7F;
+ crc8 = FRSKYV_crc8_le(rx_tx_addr+2, 2);
+
+ FRSKYV_init();
+ seed = 1;
+ binding_idx=0;
+ phase = FRSKYV_DATA1;
+ return 10000;
+}
+
+#endif
diff --git a/Multiprotocol/FrSkyX_cc2500.ino b/Multiprotocol/FrSkyX_cc2500.ino
index dc6e2f2..5f5f6ba 100644
--- a/Multiprotocol/FrSkyX_cc2500.ino
+++ b/Multiprotocol/FrSkyX_cc2500.ino
@@ -218,6 +218,7 @@
packet[29]=lowByte(crc);
}
+<<<<<<< HEAD
uint16_t ReadFrSkyX()
{
switch(state)
@@ -306,4 +307,315 @@
}
return 10000;
}
+=======
+uint8_t chanskip;
+uint8_t counter_rst;
+uint8_t ctr;
+uint8_t seq_last_sent;
+uint8_t seq_last_rcvd;
+
+const PROGMEM uint8_t hop_data[]={
+ 0x02, 0xD4, 0xBB, 0xA2, 0x89,
+ 0x70, 0x57, 0x3E, 0x25, 0x0C,
+ 0xDE, 0xC5, 0xAC, 0x93, 0x7A,
+ 0x61, 0x48, 0x2F, 0x16, 0xE8,
+ 0xCF, 0xB6, 0x9D, 0x84, 0x6B,
+ 0x52, 0x39, 0x20, 0x07, 0xD9,
+ 0xC0, 0xA7, 0x8E, 0x75, 0x5C,
+ 0x43, 0x2A, 0x11, 0xE3, 0xCA,
+ 0xB1, 0x98, 0x7F, 0x66, 0x4D,
+ 0x34, 0x1B, 0x00, 0x1D, 0x03
+};
+
+static uint8_t __attribute__((unused)) hop(uint8_t byte)
+{
+ return pgm_read_byte_near(&hop_data[byte]);
+}
+
+static void __attribute__((unused)) set_start(uint8_t ch )
+{
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_25_FSCAL1, calData[ch]);
+ CC2500_WriteReg(CC2500_0A_CHANNR, ch==47? 0:hop(ch));
+}
+
+static void __attribute__((unused)) frskyX_init()
+{
+ for(uint8_t i=0;i<36;i++)
+ {
+ uint8_t reg=pgm_read_byte_near(&cc2500_conf[i][0]);
+ uint8_t val=pgm_read_byte_near(&cc2500_conf[i][1]);
+
+ if(reg==CC2500_06_PKTLEN)
+ val=0x1E;
+ else
+ if(reg==CC2500_08_PKTCTRL0)
+ val=0x01;
+ else
+ if(reg==CC2500_0B_FSCTRL1)
+ val=0x0A;
+ else
+ if(reg==CC2500_10_MDMCFG4)
+ val=0x7B;
+ else
+ if(reg==CC2500_11_MDMCFG3)
+ val=0x61;
+ else
+ if(reg==CC2500_12_MDMCFG2)
+ val=0x13;
+ else
+ if(reg==CC2500_15_DEVIATN)
+ val=0x51;
+
+ CC2500_WriteReg(reg,val);
+ }
+
+ CC2500_WriteReg(CC2500_07_PKTCTRL1, 0x04);
+ prev_option = option ;
+ CC2500_WriteReg(CC2500_0C_FSCTRL0, option);
+ CC2500_Strobe(CC2500_SIDLE);
+ //
+ for(uint8_t c=0;c < 47;c++)
+ {//calibrate hop channels
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR,hop(c));
+ CC2500_Strobe(CC2500_SCAL);
+ delayMicroseconds(900);//
+ calData[c] = CC2500_ReadReg(CC2500_25_FSCAL1);
+ }
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR,0x00);
+ CC2500_Strobe(CC2500_SCAL);
+ delayMicroseconds(900);
+ calData[47] = CC2500_ReadReg(CC2500_25_FSCAL1);
+ //#######END INIT########
+}
+
+static void __attribute__((unused)) initialize_data(uint8_t adr)
+{
+ CC2500_WriteReg(CC2500_0C_FSCTRL0,option); // Frequency offset hack
+ CC2500_WriteReg(CC2500_18_MCSM0, 0x8);
+ CC2500_WriteReg(CC2500_09_ADDR, adr ? 0x03 : rx_tx_addr[3]);
+ CC2500_WriteReg(CC2500_07_PKTCTRL1,0x05);
+}
+
+//**CRC**
+const uint16_t PROGMEM CRC_Short[]={
+ 0x0000, 0x1189, 0x2312, 0x329B, 0x4624, 0x57AD, 0x6536, 0x74BF,
+ 0x8C48, 0x9DC1, 0xAF5A, 0xBED3, 0xCA6C, 0xDBE5, 0xE97E, 0xF8F7 };
+static uint16_t CRCTable(uint8_t val)
+{
+ uint16_t word ;
+ word = pgm_read_word(&CRC_Short[val&0x0F]) ;
+ val /= 16 ;
+ return word ^ (0x1081 * val) ;
+}
+static uint16_t __attribute__((unused)) crc_x(uint8_t *data, uint8_t len)
+{
+ uint16_t crc = 0;
+ for(uint8_t i=0; i < len; i++)
+ crc = (crc<<8) ^ CRCTable((uint8_t)(crc>>8) ^ *data++);
+ return crc;
+}
+
+ // 0-2047, 0 = 817, 1024 = 1500, 2047 = 2182
+ //64=860,1024=1500,1984=2140//Taranis 125%
+
+static uint16_t __attribute__((unused)) scaleForPXX( uint8_t i )
+{ //mapped 860,2140(125%) range to 64,1984(PXX values);
+ return (uint16_t)(((Servo_data[i]-servo_min_125)*3)>>1)+64;
+}
+
+static void __attribute__((unused)) frskyX_build_bind_packet()
+{
+ packet[0] = 0x1D;
+ packet[1] = 0x03;
+ packet[2] = 0x01;
+ //
+ packet[3] = rx_tx_addr[3];
+ packet[4] = rx_tx_addr[2];
+ int idx = ((state -FRSKY_BIND) % 10) * 5;
+ packet[5] = idx;
+ packet[6] = hop(idx++);
+ packet[7] = hop(idx++);
+ packet[8] = hop(idx++);
+ packet[9] = hop(idx++);
+ packet[10] = hop(idx++);
+ packet[11] = 0x02;
+ packet[12] = RX_num;
+ //
+ memset(&packet[13], 0, 15);
+ uint16_t lcrc = crc_x(&packet[3], 25);
+ //
+ packet[28] = lcrc >> 8;
+ packet[29] = lcrc;
+ //
+}
+
+static void __attribute__((unused)) frskyX_data_frame()
+{
+ //0x1D 0xB3 0xFD 0x02 0x56 0x07 0x15 0x00 0x00 0x00 0x04 0x40 0x00 0x04 0x40 0x00 0x04 0x40 0x00 0x04 0x40 0x08 0x00 0x00 0x00 0x00 0x00 0x00 0x96 0x12
+ //
+ static uint8_t lpass;
+ uint16_t chan_0 ;
+ uint16_t chan_1 ;
+ uint8_t startChan = 0;
+ //
+ packet[0] = 0x1D;
+ packet[1] = rx_tx_addr[3];
+ packet[2] = rx_tx_addr[2];
+ packet[3] = 0x02;
+ //
+ packet[4] = (ctr<<6)+hopping_frequency_no;
+ packet[5] = counter_rst;
+ packet[6] = RX_num;
+ //packet[7] = FLAGS 00 - standard packet
+ //10, 12, 14, 16, 18, 1A, 1C, 1E - failsafe packet
+ //20 - range check packet
+ packet[7] = 0;
+ packet[8] = 0;
+ //
+ if ( lpass & 1 )
+ startChan += 8 ;
+
+ for(uint8_t i = 0; i <12 ; i+=3)
+ {//12 bytes
+ chan_0 = scaleForPXX(startChan);
+ if(lpass & 1 )
+ chan_0+=2048;
+ startChan+=1;
+ //
+ chan_1 = scaleForPXX(startChan);
+ if(lpass & 1 )
+ chan_1+= 2048;
+ startChan+=1;
+ //
+ packet[9+i] = lowByte(chan_0);//3 bytes*4
+ packet[9+i+1]=(((chan_0>>8) & 0x0F)|(chan_1 << 4));
+ packet[9+i+2]=chan_1>>4;
+ }
+
+ packet[21] = seq_last_sent << 4 | seq_last_rcvd;//8 at start
+ if (seq_last_sent < 0x08 && seq_last_rcvd < 8)
+ seq_last_sent = (seq_last_sent + 1) % 4;
+ else if (seq_last_rcvd == 0x00)
+ seq_last_sent = 1;
+
+ if(sub_protocol== CH_8 )// in X8 mode send only 8ch every 9ms
+ lpass = 0 ;
+ else
+ lpass += 1 ;
+
+ for (uint8_t i=22;i<28;i++)
+ packet[i]=0;
+ uint16_t lcrc = crc_x(&packet[3], 25);
+
+ packet[28]=lcrc>>8;//high byte
+ packet[29]=lcrc;//low byte
+}
+
+uint16_t ReadFrSkyX()
+{
+ switch(state)
+ {
+ default:
+ set_start(47);
+ CC2500_SetPower();
+ CC2500_Strobe(CC2500_SFRX);
+ //
+ frskyX_build_bind_packet();
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteData(packet, packet[0]+1);
+ state++;
+ return 9000;
+ case FRSKY_BIND_DONE:
+ initialize_data(0);
+ hopping_frequency_no=0;
+ BIND_DONE;
+ state++;
+ break;
+ case FRSKY_DATA1:
+ if ( prev_option != option )
+ {
+ CC2500_WriteReg(CC2500_0C_FSCTRL0,option); // Frequency offset hack
+ prev_option = option ;
+ }
+ CC2500_SetTxRxMode(TX_EN);
+ set_start(hopping_frequency_no);
+ CC2500_SetPower();
+ CC2500_Strobe(CC2500_SFRX);
+ hopping_frequency_no = (hopping_frequency_no+chanskip)%47;
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteData(packet, packet[0]+1);
+ //
+ frskyX_data_frame();
+ state++;
+ return 5500;
+ case FRSKY_DATA2:
+ CC2500_SetTxRxMode(RX_EN);
+ CC2500_Strobe(CC2500_SIDLE);
+ state++;
+ return 200;
+ case FRSKY_DATA3:
+ CC2500_Strobe(CC2500_SRX);
+ state++;
+ return 3000;
+ case FRSKY_DATA4:
+ len = CC2500_ReadReg(CC2500_3B_RXBYTES | CC2500_READ_BURST) & 0x7F;
+ if (len && (len100)
+ {//~1sec
+ seq_last_sent = 0;
+ seq_last_rcvd = 8;
+ counter=0;
+ }
+ }
+ state = FRSKY_DATA1;
+ return 300;
+ }
+ return 1;
+}
+
+uint16_t initFrSkyX()
+{
+ while(!chanskip)
+ chanskip=random(0xfefefefe)%47;
+ while((chanskip-ctr)%4)
+ ctr=(ctr+1)%4;
+
+ counter_rst=(chanskip-ctr)>>2;
+ //for test***************
+ //rx_tx_addr[3]=0xB3;
+ //rx_tx_addr[2]=0xFD;
+ //************************
+ frskyX_init();
+ CC2500_SetTxRxMode(TX_EN);
+ //
+ if(IS_AUTOBIND_FLAG_on)
+ {
+ state = FRSKY_BIND;
+ initialize_data(1);
+ }
+ else
+ {
+ state = FRSKY_DATA1;
+ initialize_data(0);
+ }
+ seq_last_sent = 0;
+ seq_last_rcvd = 8;
+ return 10000;
+}
+>>>>>>> refs/remotes/pascallanger/master
#endif
\ No newline at end of file
diff --git a/Multiprotocol/Hisky_nrf24l01.ino b/Multiprotocol/Hisky_nrf24l01.ino
index c6edabe..ddf935b 100644
--- a/Multiprotocol/Hisky_nrf24l01.ino
+++ b/Multiprotocol/Hisky_nrf24l01.ino
@@ -120,10 +120,9 @@ static void __attribute__((unused)) build_ch_data()
{
uint16_t temp;
uint8_t i,j;
- const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
for (i = 0; i< 8; i++) {
- j=ch[i];
- temp=map(limit_channel_100(j),PPM_MIN_100,PPM_MAX_100,0,1000);
+ j=CH_AETR[i];
+ temp=map(limit_channel_100(j),servo_min_100,servo_max_100,0,1000);
if (j == THROTTLE) // It is clear that hisky's throttle stick is made reversely, so I adjust it here on purpose
temp = 1000 -temp;
if (j == AUX3)
diff --git a/Multiprotocol/Hontai_nrf24l01.ino b/Multiprotocol/Hontai_nrf24l01.ino
new file mode 100644
index 0000000..64f61a9
--- /dev/null
+++ b/Multiprotocol/Hontai_nrf24l01.ino
@@ -0,0 +1,247 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+#if defined(HONTAI_NRF24L01_INO)
+
+#include "iface_nrf24l01.h"
+
+#define HONTAI_BIND_COUNT 80
+#define HONTAI_PACKET_PERIOD 13500
+
+#define HONTAI_INITIAL_WAIT 500
+#define HONTAI_BIND_HONTAI_PACKET_SIZE 10
+#define HONTAI_PACKET_SIZE 12
+#define HONTAI_RF_BIND_CHANNEL 0
+
+enum{
+ HONTAI_FLAG_FLIP = 0x01,
+ HONTAI_FLAG_PICTURE = 0x02,
+ HONTAI_FLAG_VIDEO = 0x04,
+ HONTAI_FLAG_HEADLESS = 0x08,
+ HONTAI_FLAG_RTH = 0x10,
+ HONTAI_FLAG_CALIBRATE = 0x20,
+};
+
+// proudly swiped from http://www.drdobbs.com/implementing-the-ccitt-cyclical-redundan/199904926
+#define HONTAI_POLY 0x8408
+static void __attribute__((unused)) crc16(uint8_t *data_p, uint8_t length)
+{
+ uint16_t crc = 0xffff;
+
+ length -= 2;
+ do
+ {
+ for (uint8_t i = 0, data = (uint8_t)*data_p++;
+ i < 8;
+ i++, data >>= 1)
+ {
+ if ((crc & 0x01) ^ (data & 0x01))
+ crc = (crc >> 1) ^ HONTAI_POLY;
+ else
+ crc >>= 1;
+ }
+ } while (--length);
+
+ crc = ~crc;
+ *data_p++ = crc & 0xff;
+ *data_p = crc >> 8;
+}
+
+static void __attribute__((unused)) HONTAI_send_packet(uint8_t bind)
+{
+ uint8_t packet_size;
+ if (bind)
+ {
+ memcpy(packet, rx_tx_addr, 5);
+ memset(&packet[5], 0, 3);
+ packet_size=HONTAI_BIND_HONTAI_PACKET_SIZE;
+ }
+ else
+ {
+ if(sub_protocol == FORMAT_JJRCX1)
+ packet[0] = GET_FLAG(Servo_AUX2, 0x02); // Arm
+ else
+ packet[0] = 0x0b;
+
+ packet[1] = 0x00;
+ packet[2] = 0x00;
+ packet[3] = (convert_channel_8b_scale(THROTTLE, 0, 127) << 1) // Throttle
+ | GET_FLAG(Servo_AUX3, 0x01); // Picture
+ packet[4] = convert_channel_8b_scale(AILERON, 63, 0); // Aileron
+ if(sub_protocol == FORMAT_HONTAI)
+ {
+ packet[4] |= GET_FLAG(Servo_AUX6, 0x80) // RTH
+ | GET_FLAG(Servo_AUX5, 0x40); // Headless
+ }
+ else
+ {
+ packet[4] |= 0x80; // not sure what this bit does
+ if (sub_protocol == FORMAT_X5C1)
+ packet[4] |= GET_FLAG(Servo_AUX2, 0x40); // Lights (X5C1)
+ }
+ packet[5] = convert_channel_8b_scale(ELEVATOR, 0, 63) // Elevator
+ | GET_FLAG(Servo_AUX7, 0x80) // Calibrate
+ | GET_FLAG(Servo_AUX1, 0x40); // Flip
+ packet[6] = convert_channel_8b_scale(RUDDER, 0, 63) // Rudder
+ | GET_FLAG(Servo_AUX4, 0x80); // Video
+ if(sub_protocol == FORMAT_X5C1)
+ packet[7] = convert_channel_8b_scale(AILERON, 0, 63)-31; // Aileron trim
+ else
+ packet[7] = convert_channel_8b_scale(AILERON, 0, 32)-16; // Aileron trim
+ if(sub_protocol == FORMAT_HONTAI)
+ packet[8] = convert_channel_8b_scale(RUDDER, 0, 32)-16; // Rudder trim
+ else
+ {
+ packet[8] = 0xc0 // Always in expert mode
+ | GET_FLAG(Servo_AUX6, 0x02) // RTH
+ | GET_FLAG(Servo_AUX5, 0x01); // Headless
+ }
+ if (sub_protocol == FORMAT_X5C1)
+ packet[9] = convert_channel_8b_scale(ELEVATOR, 0, 63)-31; // Elevator trim
+ else
+ packet[9] = convert_channel_8b_scale(ELEVATOR, 0, 32)-16; // Elevator trim
+
+ packet_size=HONTAI_PACKET_SIZE;
+ }
+ crc16(packet, packet_size);
+
+ // Power on, TX mode, 2byte CRC
+ if(sub_protocol == FORMAT_JJRCX1)
+ NRF24L01_SetTxRxMode(TX_EN);
+ else
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
+
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, bind ? HONTAI_RF_BIND_CHANNEL : hopping_frequency[hopping_frequency_no++]);
+ hopping_frequency_no %= 3;
+
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
+ NRF24L01_FlushTx();
+
+ if(sub_protocol == FORMAT_JJRCX1)
+ NRF24L01_WritePayload(packet, packet_size);
+ else
+ XN297_WritePayload(packet, packet_size);
+
+ NRF24L01_SetPower();
+}
+
+static void __attribute__((unused)) HONTAI_init()
+{
+ NRF24L01_Initialize();
+
+ NRF24L01_SetTxRxMode(TX_EN);
+
+ if(sub_protocol == FORMAT_JJRCX1)
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, (uint8_t*)"\xd2\xb5\x99\xb3\x4a", 5);
+ else
+ XN297_SetTXAddr((const uint8_t*)"\xd2\xb5\x99\xb3\x4a", 5);
+
+ NRF24L01_FlushTx();
+ NRF24L01_FlushRx();
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
+ NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknowldgement on all data pipes
+ NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
+ NRF24L01_SetPower();
+ NRF24L01_Activate(0x73); // Activate feature register
+ if(sub_protocol == FORMAT_JJRCX1)
+ {
+ NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0xff); // JJRC uses dynamic payload length
+ NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x3f); // match other stock settings even though AA disabled...
+ NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x07);
+ }
+ else
+ {
+ NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0x00); // no retransmits
+ NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x00); // Disable dynamic payload length on all pipes
+ NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x00);
+ }
+ NRF24L01_Activate(0x73); // Deactivate feature register
+}
+
+const uint8_t PROGMEM hopping_frequency_nonels[][3] = {
+ {0x05, 0x19, 0x28}, // Hontai
+ {0x0a, 0x1e, 0x2d}}; // JJRC X1
+
+const uint8_t PROGMEM addr_vals[4][16] = {
+ {0x24, 0x26, 0x2a, 0x2c, 0x32, 0x34, 0x36, 0x4a, 0x4c, 0x4e, 0x54, 0x56, 0x5a, 0x64, 0x66, 0x6a},
+ {0x92, 0x94, 0x96, 0x9a, 0xa4, 0xa6, 0xac, 0xb2, 0xb4, 0xb6, 0xca, 0xcc, 0xd2, 0xd4, 0xd6, 0xda},
+ {0x93, 0x95, 0x99, 0x9b, 0xa5, 0xa9, 0xab, 0xad, 0xb3, 0xb5, 0xc9, 0xcb, 0xcd, 0xd3, 0xd5, 0xd9},
+ {0x25, 0x29, 0x2b, 0x2d, 0x33, 0x35, 0x49, 0x4b, 0x4d, 0x59, 0x5b, 0x65, 0x69, 0x6b, 0x6d, 0x6e}};
+
+static void __attribute__((unused)) HONTAI_init2()
+{
+ uint8_t data_tx_addr[5];
+
+ //TX address
+ data_tx_addr[0] = pgm_read_byte_near( &addr_vals[0][ rx_tx_addr[3] & 0x0f]);
+ data_tx_addr[1] = pgm_read_byte_near( &addr_vals[1][(rx_tx_addr[3] >> 4) & 0x0f]);
+ data_tx_addr[2] = pgm_read_byte_near( &addr_vals[2][ rx_tx_addr[4] & 0x0f]);
+ data_tx_addr[3] = pgm_read_byte_near( &addr_vals[3][(rx_tx_addr[4] >> 4) & 0x0f]);
+ data_tx_addr[4] = 0x24;
+ if(sub_protocol == FORMAT_JJRCX1)
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, data_tx_addr, sizeof(data_tx_addr));
+ else
+ XN297_SetTXAddr(data_tx_addr, sizeof(data_tx_addr));
+
+ //Hopping frequency table
+ for(uint8_t i=0;i<3;i++)
+ hopping_frequency[i]=pgm_read_byte_near( &hopping_frequency_nonels[sub_protocol == FORMAT_JJRCX1?1:0][i] );
+ hopping_frequency_no=0;
+}
+
+static void __attribute__((unused)) HONTAI_initialize_txid()
+{
+ rx_tx_addr[4] = rx_tx_addr[2];
+ if(sub_protocol == FORMAT_HONTAI)
+ {
+ rx_tx_addr[0] = 0x4c; // first three bytes some kind of model id? - set same as stock tx
+ rx_tx_addr[1] = 0x4b;
+ rx_tx_addr[2] = 0x3a;
+ }
+ else
+ {
+ rx_tx_addr[0] = 0x4b; // JJRC X1
+ rx_tx_addr[1] = 0x59;
+ rx_tx_addr[2] = 0x3a;
+ }
+}
+
+uint16_t HONTAI_callback()
+{
+ if(bind_counter!=0)
+ {
+ HONTAI_send_packet(1);
+ bind_counter--;
+ if (bind_counter == 0)
+ {
+ HONTAI_init2();
+ BIND_DONE;
+ }
+ }
+ else
+ HONTAI_send_packet(0);
+
+ return HONTAI_PACKET_PERIOD;
+}
+
+uint16_t initHONTAI()
+{
+ BIND_IN_PROGRESS; // autobind protocol
+ bind_counter = HONTAI_BIND_COUNT;
+ HONTAI_initialize_txid();
+ HONTAI_init();
+ return HONTAI_INITIAL_WAIT;
+}
+#endif
diff --git a/Multiprotocol/Hubsan_a7105.ino b/Multiprotocol/Hubsan_a7105.ino
index 760cb4e..de0c2bf 100644
--- a/Multiprotocol/Hubsan_a7105.ino
+++ b/Multiprotocol/Hubsan_a7105.ino
@@ -235,9 +235,9 @@ uint16_t ReadHubsan()
phase &= ~WAIT_WRITE;
if(id_data == ID_PLUS)
{
- if(state == BIND_7 && packet[2] == 9)
+ if(phase == BIND_7 && packet[2] == 9)
{
- state = DATA_1;
+ phase = DATA_1;
A7105_WriteReg(A7105_1F_CODE_I, 0x0F);
BIND_DONE;
return 4500;
@@ -345,7 +345,6 @@ uint16_t initHubsan() {
const uint8_t allowed_ch[] = {0x14, 0x1e, 0x28, 0x32, 0x3c, 0x46, 0x50, 0x5a, 0x64, 0x6e, 0x78, 0x82};
A7105_Init(INIT_HUBSAN); //hubsan_init();
- randomSeed((uint32_t)analogRead(A6) << 10 | analogRead(A7));
sessionid = random(0xfefefefe) + ((uint32_t)random(0xfefefefe) << 16);
channel = allowed_ch[random(0xfefefefe) % sizeof(allowed_ch)];
diff --git a/Multiprotocol/J6Pro_cyrf6936.ino b/Multiprotocol/J6Pro_cyrf6936.ino
new file mode 100644
index 0000000..acc0971
--- /dev/null
+++ b/Multiprotocol/J6Pro_cyrf6936.ino
@@ -0,0 +1,249 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+#if defined(J6PRO_CYRF6936_INO)
+
+#include "iface_cyrf6936.h"
+
+enum PktState {
+ J6PRO_BIND,
+ J6PRO_BIND_01,
+ J6PRO_BIND_03_START,
+ J6PRO_BIND_03_CHECK,
+ J6PRO_BIND_05_1,
+ J6PRO_BIND_05_2,
+ J6PRO_BIND_05_3,
+ J6PRO_BIND_05_4,
+ J6PRO_BIND_05_5,
+ J6PRO_BIND_05_6,
+ J6PRO_CHANSEL,
+ J6PRO_CHAN_1,
+ J6PRO_CHAN_2,
+ J6PRO_CHAN_3,
+ J6PRO_CHAN_4,
+};
+
+const uint8_t PROGMEM j6pro_bind_sop_code[] = {0x62, 0xdf, 0xc1, 0x49, 0xdf, 0xb1, 0xc0, 0x49};
+const uint8_t j6pro_data_code[] = {0x02, 0xf9, 0x93, 0x97, 0x02, 0xfa, 0x5c, 0xe3, 0x01, 0x2b, 0xf1, 0xdb, 0x01, 0x32, 0xbe, 0x6f};
+
+static void __attribute__((unused)) j6pro_build_bind_packet()
+{
+ packet[0] = 0x01; //Packet type
+ packet[1] = 0x01; //FIXME: What is this? Model number maybe?
+ packet[2] = 0x56; //FIXME: What is this?
+ packet[3] = cyrfmfg_id[0];
+ packet[4] = cyrfmfg_id[1];
+ packet[5] = cyrfmfg_id[2];
+ packet[6] = cyrfmfg_id[3];
+ packet[7] = cyrfmfg_id[4];
+ packet[8] = cyrfmfg_id[5];
+}
+
+static void __attribute__((unused)) j6pro_build_data_packet()
+{
+ uint8_t i;
+ uint32_t upperbits = 0;
+ uint16_t value;
+ packet[0] = 0xaa; //FIXME what is this?
+ for (i = 0; i < 12; i++)
+ {
+ value = convert_channel_10b(CH_AETR[i]);
+ packet[i+1] = value & 0xff;
+ upperbits |= (value >> 8) << (i * 2);
+ }
+ packet[13] = upperbits & 0xff;
+ packet[14] = (upperbits >> 8) & 0xff;
+ packet[15] = (upperbits >> 16) & 0xff;
+}
+
+static void __attribute__((unused)) j6pro_cyrf_init()
+{
+ /* Initialise CYRF chip */
+ CYRF_WriteRegister(CYRF_28_CLK_EN, 0x02);
+ CYRF_WriteRegister(CYRF_32_AUTO_CAL_TIME, 0x3c);
+ CYRF_WriteRegister(CYRF_35_AUTOCAL_OFFSET, 0x14);
+ CYRF_WriteRegister(CYRF_1C_TX_OFFSET_MSB, 0x05);
+ CYRF_WriteRegister(CYRF_1B_TX_OFFSET_LSB, 0x55);
+ CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x25);
+ CYRF_SetPower(0x05);
+ CYRF_WriteRegister(CYRF_06_RX_CFG, 0x8a);
+ CYRF_SetPower(0x28);
+ CYRF_WriteRegister(CYRF_12_DATA64_THOLD, 0x0e);
+ CYRF_WriteRegister(CYRF_10_FRAMING_CFG, 0xee);
+ CYRF_WriteRegister(CYRF_1F_TX_OVERRIDE, 0x00);
+ CYRF_WriteRegister(CYRF_1E_RX_OVERRIDE, 0x00);
+ CYRF_ConfigDataCode(j6pro_data_code, 16);
+ CYRF_WritePreamble(0x023333);
+
+ CYRF_GetMfgData(cyrfmfg_id);
+ //Model match
+ cyrfmfg_id[3]+=RX_num;
+}
+
+static void __attribute__((unused)) cyrf_bindinit()
+{
+/* Use when binding */
+ //0.060470# 03 2f
+ CYRF_SetPower(0x28); //Deviation using max power, replaced by bind power...
+
+ CYRF_ConfigRFChannel(0x52);
+ CYRF_PROGMEM_ConfigSOPCode(j6pro_bind_sop_code);
+ CYRF_ConfigCRCSeed(0x0000);
+ CYRF_WriteRegister(CYRF_06_RX_CFG, 0x4a);
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x83);
+ //0.061511# 13 20
+
+ CYRF_ConfigRFChannel(0x52);
+ //0.062684# 0f 05
+ CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x25);
+ //0.062792# 0f 05
+ CYRF_WriteRegister(CYRF_02_TX_CTRL, 0x40);
+ j6pro_build_bind_packet(); //01 01 e9 49 ec a9 c4 c1 ff
+ //CYRF_WriteDataPacketLen(packet, 0x09);
+}
+
+static void __attribute__((unused)) cyrf_datainit()
+{
+/* Use when already bound */
+ //0.094007# 0f 05
+ uint8_t sop_idx = (0xff & (cyrfmfg_id[0] + cyrfmfg_id[1] + cyrfmfg_id[2] + cyrfmfg_id[3] - cyrfmfg_id[5])) % 19;
+ uint16_t crc = (0xff & (cyrfmfg_id[1] - cyrfmfg_id[4] + cyrfmfg_id[5])) |
+ ((0xff & (cyrfmfg_id[2] + cyrfmfg_id[3] - cyrfmfg_id[4] + cyrfmfg_id[5])) << 8);
+ CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x25);
+ CYRF_PROGMEM_ConfigSOPCode(DEVO_j6pro_sopcodes[sop_idx]);
+ CYRF_ConfigCRCSeed(crc);
+}
+
+static void __attribute__((unused)) j6pro_set_radio_channels()
+{
+ //FIXME: Query free channels
+ //lowest channel is 0x08, upper channel is 0x4d?
+ CYRF_FindBestChannels(hopping_frequency, 3, 5, 8, 77);
+ hopping_frequency[3] = hopping_frequency[0];
+}
+
+uint16_t ReadJ6Pro()
+{
+ uint32_t start;
+
+ switch(phase)
+ {
+ case J6PRO_BIND:
+ cyrf_bindinit();
+ phase = J6PRO_BIND_01;
+ //no break because we want to send the 1st bind packet now
+ case J6PRO_BIND_01:
+ CYRF_ConfigRFChannel(0x52);
+ CYRF_SetTxRxMode(TX_EN);
+ //0.062684# 0f 05
+ CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x25);
+ //0.062684# 0f 05
+ CYRF_WriteDataPacketLen(packet, 0x09);
+ phase = J6PRO_BIND_03_START;
+ return 3000; //3msec
+ case J6PRO_BIND_03_START:
+ start=micros();
+ while (micros()-start < 500) // Wait max 500µs
+ if(CYRF_ReadRegister(CYRF_04_TX_IRQ_STATUS) & 0x06)
+ break;
+ CYRF_ConfigRFChannel(0x53);
+ CYRF_SetTxRxMode(RX_EN);
+ CYRF_WriteRegister(CYRF_06_RX_CFG, 0x4a);
+ CYRF_WriteRegister(CYRF_05_RX_CTRL, 0x83);
+ phase = J6PRO_BIND_03_CHECK;
+ return 30000; //30msec
+ case J6PRO_BIND_03_CHECK:
+ {
+ uint8_t rx = CYRF_ReadRegister(CYRF_07_RX_IRQ_STATUS);
+ if((rx & 0x1a) == 0x1a) {
+ rx = CYRF_ReadRegister(CYRF_0A_RX_LENGTH);
+ if(rx == 0x0f) {
+ rx = CYRF_ReadRegister(CYRF_09_RX_COUNT);
+ if(rx == 0x0f) {
+ //Expected and actual length are both 15
+ CYRF_ReadDataPacketLen(packet, rx);
+ if (packet[0] == 0x03 &&
+ packet[3] == cyrfmfg_id[0] &&
+ packet[4] == cyrfmfg_id[1] &&
+ packet[5] == cyrfmfg_id[2] &&
+ packet[6] == cyrfmfg_id[3] &&
+ packet[7] == cyrfmfg_id[4] &&
+ packet[8] == cyrfmfg_id[5])
+ {
+ //Send back Ack
+ packet[0] = 0x05;
+ CYRF_ConfigRFChannel(0x54);
+ CYRF_SetTxRxMode(TX_EN);
+ phase = J6PRO_BIND_05_1;
+ return 2000; //2msec
+ }
+ }
+ }
+ }
+ phase = J6PRO_BIND_01;
+ return 500;
+ }
+ case J6PRO_BIND_05_1:
+ case J6PRO_BIND_05_2:
+ case J6PRO_BIND_05_3:
+ case J6PRO_BIND_05_4:
+ case J6PRO_BIND_05_5:
+ case J6PRO_BIND_05_6:
+ CYRF_WriteRegister(CYRF_0F_XACT_CFG, 0x25);
+ CYRF_WriteDataPacketLen(packet, 0x0f);
+ phase = phase + 1;
+ return 4600; //4.6msec
+ case J6PRO_CHANSEL:
+ BIND_DONE;
+ j6pro_set_radio_channels();
+ cyrf_datainit();
+ phase = J6PRO_CHAN_1;
+ case J6PRO_CHAN_1:
+ //Keep transmit power updated
+ CYRF_SetPower(0);
+ j6pro_build_data_packet();
+ //return 3400;
+ case J6PRO_CHAN_2:
+ //return 3500;
+ case J6PRO_CHAN_3:
+ //return 3750
+ case J6PRO_CHAN_4:
+ CYRF_ConfigRFChannel(hopping_frequency[phase - J6PRO_CHAN_1]);
+ CYRF_SetTxRxMode(TX_EN);
+ CYRF_WriteDataPacket(packet);
+ if (phase == J6PRO_CHAN_4) {
+ phase = J6PRO_CHAN_1;
+ return 13900;
+ }
+ phase = phase + 1;
+ return 3550;
+ }
+ return 0;
+}
+
+uint16_t initJ6Pro()
+{
+ j6pro_cyrf_init();
+
+ if(IS_AUTOBIND_FLAG_on) {
+ phase = J6PRO_BIND;
+ }
+ else {
+ phase = J6PRO_CHANSEL;
+ }
+ return 2400;
+}
+
+#endif
diff --git a/Multiprotocol/KN_nrf24l01.ino b/Multiprotocol/KN_nrf24l01.ino
index 9e0775b..5675181 100644
--- a/Multiprotocol/KN_nrf24l01.ino
+++ b/Multiprotocol/KN_nrf24l01.ino
@@ -246,7 +246,11 @@ static void __attribute__((unused)) kn_init()
NRF24L01_Initialize();
+<<<<<<< HEAD
NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO));
+=======
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO));
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknoledgement
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5-byte RX/TX address
@@ -259,7 +263,11 @@ static void __attribute__((unused)) kn_init()
NRF24L01_Activate(0x73);
NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 1); // Dynamic payload for data pipe 0
// Enable: Dynamic Payload Length to enable PCF
+<<<<<<< HEAD
NRF24L01_WriteReg(NRF24L01_1D_FEATURE, BV(NRF2401_1D_EN_DPL));
+=======
+ NRF24L01_WriteReg(NRF24L01_1D_FEATURE, _BV(NRF2401_1D_EN_DPL));
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_SetPower();
diff --git a/Multiprotocol/MJXQ_nrf24l01.ino b/Multiprotocol/MJXQ_nrf24l01.ino
index 484e798..a1cb14a 100644
--- a/Multiprotocol/MJXQ_nrf24l01.ino
+++ b/Multiprotocol/MJXQ_nrf24l01.ino
@@ -12,7 +12,11 @@
You should have received a copy of the GNU General Public License
along with Multiprotocol. If not, see .
*/
+<<<<<<< HEAD
// compatible with MJX WLH08, X600, X800, H26D
+=======
+// compatible with MJX WLH08, X600, X800, H26D, Eachine E010
+>>>>>>> refs/remotes/pascallanger/master
// Last sync with hexfet new_protocols/mjxq_nrf24l01.c dated 2016-01-17
#if defined(MJXQ_NRF24L01_INO)
@@ -26,6 +30,20 @@
#define MJXQ_RF_NUM_CHANNELS 4
#define MJXQ_ADDRESS_LENGTH 5
+<<<<<<< HEAD
+=======
+// haven't figured out txid<-->rf channel mapping for MJX models
+const uint8_t PROGMEM MJXQ_map_rfchan[][4] = {
+ {0x0A, 0x46, 0x3A, 0x42},
+ {0x0A, 0x3C, 0x36, 0x3F},
+ {0x0A, 0x43, 0x36, 0x3F} };
+const uint8_t PROGMEM MJXQ_map_txid[][3] = {
+ {0xF8, 0x4F, 0x1C},
+ {0xC8, 0x6E, 0x02},
+ {0x48, 0x6A, 0x40} };
+
+
+>>>>>>> refs/remotes/pascallanger/master
#define MJXQ_PAN_TILT_COUNT 16 // for H26D - match stock tx timing
#define MJXQ_PAN_DOWN 0x08
#define MJXQ_PAN_UP 0x04
@@ -39,6 +57,7 @@ static uint8_t __attribute__((unused)) MJXQ_pan_tilt_value()
packet_count++;
if(packet_count & MJXQ_PAN_TILT_COUNT)
{
+<<<<<<< HEAD
if(Servo_AUX8)
pan=MJXQ_PAN_UP;
if(Servo_data[AUX8]PPM_MAX_COMMAND)
+ pan=MJXQ_PAN_UP;
+ if(Servo_data[AUX8]PPM_MAX_COMMAND)
+ pan+=MJXQ_TILT_UP;
+ if(Servo_data[AUX9]>>>>>> refs/remotes/pascallanger/master
}
return pan;
}
@@ -57,10 +86,17 @@ static void __attribute__((unused)) MJXQ_send_packet(uint8_t bind)
packet[0] = convert_channel_8b(THROTTLE);
packet[1] = convert_channel_s8b(RUDDER);
packet[4] = 0x40; // rudder does not work well with dyntrim
+<<<<<<< HEAD
packet[2] = convert_channel_s8b(ELEVATOR);
packet[5] = MJXQ_CHAN2TRIM(packet[2]); // trim elevator
packet[3] = convert_channel_s8b(AILERON);
packet[6] = MJXQ_CHAN2TRIM(packet[3]); // trim aileron
+=======
+ packet[2] = 0x80 ^ convert_channel_s8b(ELEVATOR);
+ packet[5] = GET_FLAG(Servo_AUX5, 1) ? 0x40 : MJXQ_CHAN2TRIM(packet[2]); // trim elevator
+ packet[3] = convert_channel_s8b(AILERON);
+ packet[6] = GET_FLAG(Servo_AUX5, 1) ? 0x40 : MJXQ_CHAN2TRIM(packet[3]); // trim aileron
+>>>>>>> refs/remotes/pascallanger/master
packet[7] = rx_tx_addr[0];
packet[8] = rx_tx_addr[1];
packet[9] = rx_tx_addr[2];
@@ -85,6 +121,10 @@ static void __attribute__((unused)) MJXQ_send_packet(uint8_t bind)
packet[10]=MJXQ_pan_tilt_value();
// fall through on purpose - no break
case WLH08:
+<<<<<<< HEAD
+=======
+ case E010:
+>>>>>>> refs/remotes/pascallanger/master
packet[10] += GET_FLAG(Servo_AUX6, 0x02) //RTH
| GET_FLAG(Servo_AUX5, 0x01); //HEADLESS
if (!bind)
@@ -97,11 +137,14 @@ static void __attribute__((unused)) MJXQ_send_packet(uint8_t bind)
}
break;
case X600:
+<<<<<<< HEAD
if(Servo_AUX5) //HEADLESS
{ // driven trims cause issues when headless is enabled
packet[5] = 0x40;
packet[6] = 0x40;
}
+=======
+>>>>>>> refs/remotes/pascallanger/master
packet[10] = GET_FLAG(!Servo_AUX2, 0x02); //LED
packet[11] = GET_FLAG(Servo_AUX6, 0x01); //RTH
if (!bind)
@@ -135,7 +178,11 @@ static void __attribute__((unused)) MJXQ_send_packet(uint8_t bind)
if (sub_protocol == H26D)
NRF24L01_SetTxRxMode(TX_EN);
else
+<<<<<<< HEAD
XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP));
+=======
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no++ / 2]);
hopping_frequency_no %= 2 * MJXQ_RF_NUM_CHANNELS; // channels repeated
@@ -158,12 +205,20 @@ static void __attribute__((unused)) MJXQ_init()
if (sub_protocol == WLH08)
memcpy(hopping_frequency, "\x12\x22\x32\x42", MJXQ_RF_NUM_CHANNELS);
else
+<<<<<<< HEAD
if (sub_protocol == H26D)
+=======
+ if (sub_protocol == H26D || sub_protocol == E010)
+>>>>>>> refs/remotes/pascallanger/master
memcpy(hopping_frequency, "\x36\x3e\x46\x2e", MJXQ_RF_NUM_CHANNELS);
else
{
memcpy(hopping_frequency, "\x0a\x35\x42\x3d", MJXQ_RF_NUM_CHANNELS);
+<<<<<<< HEAD
memcpy(addr, "\x6d\x6a\x73\x73\x73", MJXQ_RF_NUM_CHANNELS);
+=======
+ memcpy(addr, "\x6d\x6a\x73\x73\x73", MJXQ_ADDRESS_LENGTH);
+>>>>>>> refs/remotes/pascallanger/master
}
@@ -182,12 +237,20 @@ static void __attribute__((unused)) MJXQ_init()
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0 only
NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0x00); // no retransmits
NRF24L01_WriteReg(NRF24L01_11_RX_PW_P0, MJXQ_PACKET_SIZE); // rx pipe 0 (used only for blue board)
+<<<<<<< HEAD
NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
+=======
+ if (sub_protocol == E010)
+ NRF24L01_SetBitrate(NRF24L01_BR_250K); // 250K
+ else
+ NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_SetPower();
}
static void __attribute__((unused)) MJXQ_init2()
{
+<<<<<<< HEAD
// haven't figured out txid<-->rf channel mapping for MJX models
static const uint8_t rf_map[][4] = {
{0x0A, 0x46, 0x3A, 0x42},
@@ -198,10 +261,19 @@ static void __attribute__((unused)) MJXQ_init2()
else
if (sub_protocol == WLH08)
memcpy(hopping_frequency, rf_map[rx_tx_addr[0]%3], MJXQ_RF_NUM_CHANNELS);
+=======
+ if (sub_protocol == H26D)
+ memcpy(hopping_frequency, "\x32\x3e\x42\x4e", MJXQ_RF_NUM_CHANNELS);
+ else
+ if (sub_protocol != WLH08 && sub_protocol != E010)
+ for(uint8_t i=0;i>>>>>> refs/remotes/pascallanger/master
}
static void __attribute__((unused)) MJXQ_initialize_txid()
{
+<<<<<<< HEAD
// haven't figured out txid<-->rf channel mapping for MJX models
static const uint8_t tx_map[][3]={
{0xF8, 0x4F, 0x1C},
@@ -211,6 +283,17 @@ static void __attribute__((unused)) MJXQ_initialize_txid()
rx_tx_addr[0]&=0xF8; // txid must be multiple of 8
else
memcpy(rx_tx_addr,tx_map[rx_tx_addr[0]%3],3);
+=======
+ rx_tx_addr[0]&=0xF8;
+ if (sub_protocol == E010)
+ {
+ rx_tx_addr[1]=(rx_tx_addr[1]&0xF0)|0x0C;
+ rx_tx_addr[2]&=0xF0;
+ }
+ else
+ for(uint8_t i=0;i<3;i++)
+ rx_tx_addr[i]=pgm_read_byte_near( &MJXQ_map_txid[rx_tx_addr[4]%3][i] );
+>>>>>>> refs/remotes/pascallanger/master
}
uint16_t MJXQ_callback()
diff --git a/Multiprotocol/MT99xx_nrf24l01.ino b/Multiprotocol/MT99xx_nrf24l01.ino
index 5e719ed..dff51d7 100644
--- a/Multiprotocol/MT99xx_nrf24l01.ino
+++ b/Multiprotocol/MT99xx_nrf24l01.ino
@@ -12,7 +12,11 @@
You should have received a copy of the GNU General Public License
along with Multiprotocol. If not, see .
*/
+<<<<<<< HEAD
// compatible with MT99xx, Eachine H7, Yi Zhan i6S
+=======
+// compatible with MT99xx, Eachine H7, Yi Zhan i6S and LS114/124
+>>>>>>> refs/remotes/pascallanger/master
// Last sync with Goebish mt99xx_nrf24l01.c dated 2016-01-29
#if defined(MT99XX_NRF24L01_INO)
@@ -37,12 +41,26 @@ enum{
FLAG_MT_FLIP = 0x80,
};
+<<<<<<< HEAD
+=======
+enum{
+ // flags going to packet[6] (LS)
+ FLAG_LS_INVERT = 0x01,
+ FLAG_LS_RATE = 0x02,
+ FLAG_LS_HEADLESS= 0x10,
+ FLAG_LS_SNAPSHOT= 0x20,
+ FLAG_LS_VIDEO = 0x40,
+ FLAG_LS_FLIP = 0x80,
+};
+
+>>>>>>> refs/remotes/pascallanger/master
enum {
MT99XX_INIT = 0,
MT99XX_BIND,
MT99XX_DATA
};
+<<<<<<< HEAD
static void __attribute__((unused)) MT99XX_send_packet()
{
const uint8_t yz_p4_seq[] = {0xa0, 0x20, 0x60};
@@ -71,6 +89,56 @@ static void __attribute__((unused)) MT99XX_send_packet()
// low nibble: index in chan list ?
// high nibble: 0->start from start of list, 1->start from end of list ?
packet[7] = mys_byte[hopping_frequency_no];
+=======
+const uint8_t h7_mys_byte[] = {
+ 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14,
+ 0x05, 0x15, 0x06, 0x16, 0x07, 0x17, 0x00, 0x10
+};
+
+static const u8 ls_mys_byte[] = {
+ 0x05, 0x15, 0x25, 0x06, 0x16, 0x26,
+ 0x07, 0x17, 0x27, 0x00, 0x10, 0x20,
+ 0x01, 0x11, 0x21, 0x02, 0x12, 0x22,
+ 0x03, 0x13, 0x23, 0x04, 0x14, 0x24
+};
+
+static void __attribute__((unused)) MT99XX_send_packet()
+{
+ const uint8_t yz_p4_seq[] = {0xa0, 0x20, 0x60};
+ static uint8_t yz_seq_num=0;
+ static uint8_t ls_counter=0;
+
+ if(sub_protocol != YZ)
+ { // MT99XX & H7 & LS
+ packet[0] = convert_channel_8b_scale(THROTTLE,0xE1,0x00); // throttle
+ packet[1] = convert_channel_8b_scale(RUDDER ,0x00,0xE1); // rudder
+ packet[2] = convert_channel_8b_scale(AILERON ,0xE1,0x00); // aileron
+ packet[3] = convert_channel_8b_scale(ELEVATOR,0x00,0xE1); // elevator
+ packet[4] = 0x20; // pitch trim (0x3f-0x20-0x00)
+ packet[5] = 0x20; // roll trim (0x00-0x20-0x3f)
+ packet[6] = GET_FLAG( Servo_AUX1, FLAG_MT_FLIP );
+ packet[7] = h7_mys_byte[hopping_frequency_no]; // next rf channel index ?
+
+ if(sub_protocol==H7)
+ packet[6]|=FLAG_MT_RATE1; // max rate on H7
+ else
+ if(sub_protocol==MT99)
+ packet[6] |= 0x40 | FLAG_MT_RATE2
+ | GET_FLAG( Servo_AUX3, FLAG_MT_SNAPSHOT )
+ | GET_FLAG( Servo_AUX4, FLAG_MT_VIDEO ); // max rate on MT99xx
+ else //LS
+ {
+ packet[6] |= FLAG_LS_RATE // max rate
+ | GET_FLAG( Servo_AUX2, FLAG_LS_INVERT ) //INVERT
+ | GET_FLAG( Servo_AUX3, FLAG_LS_SNAPSHOT ) //SNAPSHOT
+ | GET_FLAG( Servo_AUX4, FLAG_LS_VIDEO ) //VIDEO
+ | GET_FLAG( Servo_AUX5, FLAG_LS_HEADLESS ); //HEADLESS
+ packet[7] = ls_mys_byte[ls_counter++];
+ if(ls_counter >= sizeof(ls_mys_byte))
+ ls_counter=0;
+ }
+
+>>>>>>> refs/remotes/pascallanger/master
uint8_t result=checksum_offset;
for(uint8_t i=0; i<8; i++)
result += packet[i];
@@ -79,9 +147,15 @@ static void __attribute__((unused)) MT99XX_send_packet()
else
{ // YZ
packet[0] = convert_channel_8b_scale(THROTTLE,0x00,0x64); // throttle
+<<<<<<< HEAD
packet[1] = convert_channel_8b_scale(RUDDER ,0x00,0x64); // rudder
packet[2] = convert_channel_8b_scale(ELEVATOR,0x00,0x64); // elevator
packet[3] = convert_channel_8b_scale(AILERON ,0x00,0x64); // aileron
+=======
+ packet[1] = convert_channel_8b_scale(RUDDER ,0x64,0x00); // rudder
+ packet[2] = convert_channel_8b_scale(ELEVATOR,0x00,0x64); // elevator
+ packet[3] = convert_channel_8b_scale(AILERON ,0x64,0x00); // aileron
+>>>>>>> refs/remotes/pascallanger/master
if(packet_count++ >= 23)
{
yz_seq_num ++;
@@ -102,7 +176,14 @@ static void __attribute__((unused)) MT99XX_send_packet()
packet[8] = 0xff;
}
+<<<<<<< HEAD
NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no] + channel_offset);
+=======
+ if(sub_protocol == LS)
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, 0x2D); // LS always transmits on the same channel
+ else
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no] + channel_offset);
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
NRF24L01_FlushTx();
XN297_WritePayload(packet, MT99XX_PACKET_SIZE);
@@ -120,8 +201,16 @@ static void __attribute__((unused)) MT99XX_send_packet()
static void __attribute__((unused)) MT99XX_init()
{
NRF24L01_Initialize();
+<<<<<<< HEAD
NRF24L01_SetTxRxMode(TX_EN);
NRF24L01_FlushTx();
+=======
+ if(sub_protocol == YZ)
+ XN297_SetScrambledMode(XN297_UNSCRAMBLED);
+ NRF24L01_SetTxRxMode(TX_EN);
+ NRF24L01_FlushTx();
+ XN297_SetTXAddr((uint8_t *)"\xCC\xCC\xCC\xCC\xCC", 5);
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknowldgement on all data pipes
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0 only
@@ -133,19 +222,40 @@ static void __attribute__((unused)) MT99XX_init()
NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
NRF24L01_SetPower();
+<<<<<<< HEAD
XN297_Configure(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP) | (sub_protocol == YZ ? BV(XN297_UNSCRAMBLED):0) );
XN297_SetTXAddr((uint8_t *)"\xCC\xCC\xCC\xCC\xCC", 5);
+=======
+ XN297_Configure(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP) );
+
+>>>>>>> refs/remotes/pascallanger/master
}
static void __attribute__((unused)) MT99XX_initialize_txid()
{
+<<<<<<< HEAD
+=======
+ rx_tx_addr[3] = 0xCC;
+ rx_tx_addr[4] = 0xCC;
+>>>>>>> refs/remotes/pascallanger/master
if(sub_protocol == YZ)
{
rx_tx_addr[0] = 0x53; // test (SB id)
rx_tx_addr[1] = 0x00;
+<<<<<<< HEAD
}
checksum_offset = (rx_tx_addr[0] + rx_tx_addr[1]) & 0xff;
+=======
+ rx_tx_addr[2] = 0x00;
+ }
+ else
+ if(sub_protocol == LS)
+ rx_tx_addr[0] = 0xCC;
+ else //MT99 & H7
+ rx_tx_addr[2] = 0x00;
+ checksum_offset = rx_tx_addr[0] + rx_tx_addr[1] + rx_tx_addr[2];
+>>>>>>> refs/remotes/pascallanger/master
channel_offset = (((checksum_offset & 0xf0)>>4) + (checksum_offset & 0x0f)) % 8;
}
@@ -157,16 +267,26 @@ uint16_t MT99XX_callback()
{
if (bind_counter == 0)
{
+<<<<<<< HEAD
rx_tx_addr[2] = 0x00;
rx_tx_addr[3] = 0xCC;
rx_tx_addr[4] = 0xCC;
+=======
+>>>>>>> refs/remotes/pascallanger/master
// set tx address for data packets
XN297_SetTXAddr(rx_tx_addr, 5);
BIND_DONE;
}
else
{
+<<<<<<< HEAD
NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no]);
+=======
+ if(sub_protocol == LS)
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, 0x2D); // LS always transmits on the same channel
+ else
+ NRF24L01_WriteReg(NRF24L01_05_RF_CH, hopping_frequency[hopping_frequency_no]);
+>>>>>>> refs/remotes/pascallanger/master
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70);
NRF24L01_FlushTx();
XN297_WritePayload(packet, MT99XX_PACKET_SIZE); // bind packet
@@ -193,6 +313,7 @@ uint16_t initMT99XX(void)
MT99XX_init();
packet[0] = 0x20;
+<<<<<<< HEAD
if(sub_protocol!=YZ)
{ // MT99 & H7
packet_period = MT99XX_PACKET_PERIOD_MT;
@@ -210,6 +331,32 @@ uint16_t initMT99XX(void)
packet[4] = rx_tx_addr[0]; // 1st byte for data state tx address
packet[5] = rx_tx_addr[1]; // 2nd byte for data state tx address (always 0x00 on Yi Zhan ?)
packet[6] = 0x00; // 3rd byte for data state tx address (always 0x00 ?)
+=======
+ packet_period = MT99XX_PACKET_PERIOD_MT;
+ switch(sub_protocol)
+ { // MT99 & H7
+ case MT99:
+ case H7:
+ packet[1] = 0x14;
+ packet[2] = 0x03;
+ packet[3] = 0x25;
+ break;
+ case YZ:
+ packet_period = MT99XX_PACKET_PERIOD_YZ;
+ packet[1] = 0x15;
+ packet[2] = 0x05;
+ packet[3] = 0x06;
+ break;
+ case LS:
+ packet[1] = 0x14;
+ packet[2] = 0x05;
+ packet[3] = 0x11;
+ break;
+ }
+ packet[4] = rx_tx_addr[0];
+ packet[5] = rx_tx_addr[1];
+ packet[6] = rx_tx_addr[2];
+>>>>>>> refs/remotes/pascallanger/master
packet[7] = checksum_offset; // checksum offset
packet[8] = 0xAA; // fixed
packet_count=0;
diff --git a/Multiprotocol/Makefile.xmega b/Multiprotocol/Makefile.xmega
new file mode 100644
index 0000000..3c596b7
--- /dev/null
+++ b/Multiprotocol/Makefile.xmega
@@ -0,0 +1,624 @@
+# Hey Emacs, this is a -*- makefile -*-
+#----------------------------------------------------------------------------
+# WinAVR Makefile
+#
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device, using avrdude.
+# Please customize the avrdude settings below first!
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+# with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+# bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+
+# MCU name
+MCU = atxmega32d4
+
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+# Typical values are:
+# F_CPU = 1000000
+# F_CPU = 1843200
+# F_CPU = 2000000
+# F_CPU = 3686400
+# F_CPU = 4000000
+# F_CPU = 7372800
+# F_CPU = 8000000
+# F_CPU = 11059200
+# F_CPU = 14745600
+# F_CPU = 16000000
+# F_CPU = 18432000
+# F_CPU = 20000000
+F_CPU = 32000000
+
+
+# Output format. (can be srec, ihex, binary)
+FORMAT = ihex
+
+
+# Target file name (without extension).
+TARGET = MultiOrange
+
+
+# Object files directory
+# To put object files in current directory, use a dot (.), do NOT make
+# this an empty or blank macro!
+OBJDIR = .
+
+
+# List C source files here. (C dependencies are automatically generated.)
+SRC =
+
+
+# List C++ source files here. (C dependencies are automatically generated.)
+CPPSRC = $(TARGET).cpp
+CPPSRC += Wmath.cpp
+#CPPSRC += DSM2_cyrf6936.cpp
+
+# List Assembler source files here.
+# Make them always end in a capital .S. Files ending in a lowercase .s
+# will not be considered source files but generated files (assembler
+# output from the compiler), and will be deleted upon "make clean"!
+# Even though the DOS/Win* filesystem matches both .s and .S the same,
+# it will preserve the spelling of the filenames, and gcc itself does
+# care about how the name is spelled on its command-line.
+ASRC =
+
+
+# Optimization level, can be [0, 1, 2, 3, s].
+# 0 = turn off optimization. s = optimize for size.
+# (Note: 3 is not always the best optimization level. See avr-libc FAQ.)
+OPT = s
+
+
+# Debugging format.
+# Native formats for AVR-GCC's -g are dwarf-2 [default] or stabs.
+# AVR Studio 4.10 requires dwarf-2.
+# AVR [Extended] COFF format requires stabs, plus an avr-objcopy run.
+#DEBUG = stabs
+DEBUG = dwarf-2
+
+
+# List any extra directories to look for include files here.
+# Each directory must be seperated by a space.
+# Use forward slashes for directory separators.
+# For a directory that has spaces, enclose it in quotes.
+EXTRAINCDIRS =
+
+
+# Compiler flag to set the C Standard level.
+# c89 = "ANSI" C
+# gnu89 = c89 plus GCC extensions
+# c99 = ISO C99 standard (not yet fully implemented)
+# gnu99 = c99 plus GCC extensions
+CSTANDARD = -std=gnu99
+
+
+# Place -D or -U options here for C sources
+CDEFS = -DF_CPU=$(F_CPU)UL
+
+
+# Place -D or -U options here for ASM sources
+ADEFS = -DF_CPU=$(F_CPU)
+
+
+# Place -D or -U options here for C++ sources
+CPPDEFS = -DF_CPU=$(F_CPU)UL
+#CPPDEFS += -D__STDC_LIMIT_MACROS
+#CPPDEFS += -D__STDC_CONSTANT_MACROS
+
+
+
+#---------------- Compiler Options C ----------------
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+CFLAGS = -g$(DEBUG)
+CFLAGS += $(CDEFS)
+CFLAGS += -O$(OPT)
+CFLAGS += -funsigned-char
+CFLAGS += -funsigned-bitfields
+CFLAGS += -fpack-struct
+CFLAGS += -fshort-enums
+CFLAGS += -Wall
+CFLAGS += -Wno-main
+CFLAGS += -Wstrict-prototypes
+#CFLAGS += -mshort-calls
+#CFLAGS += -fno-unit-at-a-time
+#CFLAGS += -Wundef
+#CFLAGS += -Wunreachable-code
+#CFLAGS += -Wsign-compare
+CFLAGS += -Wa,-adlns=$(<:%.c=$(OBJDIR)/%.lst)
+CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+CFLAGS += $(CSTANDARD)
+# Next line dumps rtl file
+#CFLAGS += -dr
+#CFLAGS += -Wa,-adhlns=$(<:%.c=$(OBJDIR)/%.lst)
+
+
+#---------------- Compiler Options C++ ----------------
+# -g*: generate debugging information
+# -O*: optimization level
+# -f...: tuning, see GCC manual and avr-libc documentation
+# -Wall...: warning level
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns...: create assembler listing
+CPPFLAGS = -g$(DEBUG)
+CPPFLAGS += $(CPPDEFS)
+CPPFLAGS += -O$(OPT)
+CPPFLAGS += -funsigned-char
+CPPFLAGS += -funsigned-bitfields
+CPPFLAGS += -fpack-struct
+CPPFLAGS += -fshort-enums
+CPPFLAGS += -fno-exceptions
+CPPFLAGS += -Wall
+CFLAGS += -Wundef
+#CPPFLAGS += -mshort-calls
+#CPPFLAGS += -fno-unit-at-a-time
+#CPPFLAGS += -Wstrict-prototypes
+#CPPFLAGS += -Wunreachable-code
+#CPPFLAGS += -Wsign-compare
+CPPFLAGS += -Wa,-adlns=$(<:%.cpp=$(OBJDIR)/%.lst)
+CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS))
+#CPPFLAGS += $(CSTANDARD)
+#CPPFLAGS += -Wa,-adhlns=$(<:%.cpp=$(OBJDIR)/%.lst)
+
+
+#---------------- Assembler Options ----------------
+# -Wa,...: tell GCC to pass this to the assembler.
+# -adhlns: create listing
+# -gstabs: have the assembler create line number information; note that
+# for use in COFF files, additional information about filenames
+# and function names needs to be present in the assembler source
+# files -- see avr-libc docs [FIXME: not yet described there]
+# -listing-cont-lines: Sets the maximum number of continuation lines of hex
+# dump that will be displayed for a given single line of source input.
+ASFLAGS = $(ADEFS) -Wa,-adhlns=$(<:%.S=$(OBJDIR)/%.lst),-gstabs,--listing-cont-lines=100
+
+
+#---------------- Library Options ----------------
+# Minimalistic printf version
+PRINTF_LIB_MIN = -Wl,-u,vfprintf -lprintf_min
+
+# Floating point printf version (requires MATH_LIB = -lm below)
+PRINTF_LIB_FLOAT = -Wl,-u,vfprintf -lprintf_flt
+
+# If this is left blank, then it will use the Standard printf version.
+PRINTF_LIB =
+#PRINTF_LIB = $(PRINTF_LIB_MIN)
+#PRINTF_LIB = $(PRINTF_LIB_FLOAT)
+
+
+# Minimalistic scanf version
+SCANF_LIB_MIN = -Wl,-u,vfscanf -lscanf_min
+
+# Floating point + %[ scanf version (requires MATH_LIB = -lm below)
+SCANF_LIB_FLOAT = -Wl,-u,vfscanf -lscanf_flt
+
+# If this is left blank, then it will use the Standard scanf version.
+SCANF_LIB =
+#SCANF_LIB = $(SCANF_LIB_MIN)
+#SCANF_LIB = $(SCANF_LIB_FLOAT)
+
+
+MATH_LIB = -lm
+
+
+# List any extra directories to look for libraries here.
+# Each directory must be seperated by a space.
+# Use forward slashes for directory separators.
+# For a directory that has spaces, enclose it in quotes.
+EXTRALIBDIRS =
+
+
+
+#---------------- External Memory Options ----------------
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# used for variables (.data/.bss) and heap (malloc()).
+#EXTMEMOPTS = -Wl,-Tdata=0x801100,--defsym=__heap_end=0x80ffff
+
+# 64 KB of external RAM, starting after internal RAM (ATmega128!),
+# only used for heap (malloc()).
+#EXTMEMOPTS = -Wl,--section-start,.data=0x801100,--defsym=__heap_end=0x80ffff
+
+EXTMEMOPTS =
+
+
+
+#---------------- Linker Options ----------------
+# -Wl,...: tell GCC to pass this to linker.
+# -Map: create map file
+# --cref: add cross reference to map file
+LDFLAGS = -Wl,-Map=$(TARGET).map,--cref
+LDFLAGS += $(EXTMEMOPTS)
+LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))
+LDFLAGS += $(PRINTF_LIB) $(SCANF_LIB) $(MATH_LIB)
+#LDFLAGS += -Wl,--section-start=.text=0x00D0
+#LDFLAGS += -Wl,--section-start=.vectors=0x0080
+#LDFLAGS += -T avr3-167.ld
+LDFLAGS += -N
+
+
+
+#---------------- Programming Options (avrdude) ----------------
+
+# Programming hardware: alf avr910 avrisp bascom bsd
+# dt006 pavr picoweb pony-stk200 sp12 stk200 stk500
+#
+# Type: avrdude -c ?
+# to get a full listing.
+#
+AVRDUDE_PROGRAMMER = stk500
+
+# com1 = serial port. Use lpt1 to connect to parallel port.
+AVRDUDE_PORT = com3
+
+AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex
+#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep
+
+
+# Uncomment the following if you want avrdude's erase cycle counter.
+# Note that this counter needs to be initialized first using -Yn,
+# see avrdude manual.
+#AVRDUDE_ERASE_COUNTER = -y
+
+# Uncomment the following if you do /not/ wish a verification to be
+# performed after programming the device.
+#AVRDUDE_NO_VERIFY = -V
+
+# Increase verbosity level. Please use this when submitting bug
+# reports about avrdude. See
+# to submit bug reports.
+#AVRDUDE_VERBOSE = -v -v
+
+AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER)
+AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY)
+AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE)
+AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER)
+
+
+
+#---------------- Debugging Options ----------------
+
+# For simulavr only - target MCU frequency.
+DEBUG_MFREQ = $(F_CPU)
+
+# Set the DEBUG_UI to either gdb or insight.
+# DEBUG_UI = gdb
+DEBUG_UI = insight
+
+# Set the debugging back-end to either avarice, simulavr.
+DEBUG_BACKEND = avarice
+#DEBUG_BACKEND = simulavr
+
+# GDB Init Filename.
+GDBINIT_FILE = __avr_gdbinit
+
+# When using avarice settings for the JTAG
+JTAG_DEV = /dev/com1
+
+# Debugging port used to communicate between GDB / avarice / simulavr.
+DEBUG_PORT = 4242
+
+# Debugging host used to communicate between GDB / avarice / simulavr, normally
+# just set to localhost unless doing some sort of crazy debugging when
+# avarice is running on a different computer.
+DEBUG_HOST = localhost
+
+
+
+#============================================================================
+
+
+# Define programs and commands.
+SHELL = sh
+CC = avr-gcc
+OBJCOPY = avr-objcopy
+OBJDUMP = avr-objdump
+SIZE = avr-size
+AR = avr-ar rcs
+NM = avr-nm
+AVRDUDE = avrdude
+REMOVE = rm -f
+REMOVEDIR = rm -rf
+COPY = cp
+WINSHELL = cmd
+
+
+# Define Messages
+# English
+MSG_ERRORS_NONE = Errors: none
+MSG_BEGIN = -------- begin --------
+MSG_END = -------- end --------
+MSG_SIZE_BEFORE = Size before:
+MSG_SIZE_AFTER = Size after:
+MSG_COFF = Converting to AVR COFF:
+MSG_EXTENDED_COFF = Converting to AVR Extended COFF:
+MSG_FLASH = Creating load file for Flash:
+MSG_EEPROM = Creating load file for EEPROM:
+MSG_EXTENDED_LISTING = Creating Extended Listing:
+MSG_SYMBOL_TABLE = Creating Symbol Table:
+MSG_LINKING = Linking:
+MSG_COMPILING = Compiling C:
+MSG_COMPILING_CPP = Compiling C++:
+MSG_ASSEMBLING = Assembling:
+MSG_CLEANING = Cleaning project:
+MSG_CREATING_LIBRARY = Creating library:
+
+
+
+
+# Define all object files.
+OBJ = $(SRC:%.c=$(OBJDIR)/%.o) $(CPPSRC:%.cpp=$(OBJDIR)/%.o) $(ASRC:%.S=$(OBJDIR)/%.o)
+
+# Define all listing files.
+LST = $(SRC:%.c=$(OBJDIR)/%.lst) $(CPPSRC:%.cpp=$(OBJDIR)/%.lst) $(ASRC:%.S=$(OBJDIR)/%.lst)
+
+
+# Compiler flags to generate dependency files.
+GENDEPFLAGS = -MMD -MP -MF .dep/$(@F).d
+
+
+# Combine all necessary flags and optional flags.
+# Add target processor to flags.
+ALL_CFLAGS = -mmcu=$(MCU) -I. $(CFLAGS) $(GENDEPFLAGS)
+ALL_CPPFLAGS = -mmcu=$(MCU) -I. -x c++ $(CPPFLAGS) $(GENDEPFLAGS)
+ALL_ASFLAGS = -mmcu=$(MCU) -I. -x assembler-with-cpp $(ASFLAGS)
+
+
+
+
+
+# Default target.
+all: begin gccversion sizebefore build sizeafter end
+
+# Change the build target to build a HEX file or a library.
+build: elf hex eep lss sym bin
+#build: lib
+
+
+elf: $(TARGET).elf
+hex: $(TARGET).hex
+bin: $(TARGET).bin
+eep: $(TARGET).eep
+lss: $(TARGET).lss
+sym: $(TARGET).sym
+LIBNAME=lib$(TARGET).a
+lib: $(LIBNAME)
+
+
+
+# Eye candy.
+# AVR Studio 3.x does not check make's exit code but relies on
+# the following magic strings to be generated by the compile job.
+begin:
+ @echo
+ @echo $(MSG_BEGIN)
+
+end:
+ @echo $(MSG_END)
+ @echo
+
+
+# Display size of file.
+HEXSIZE = $(SIZE) --target=$(FORMAT) $(TARGET).hex
+ELFSIZE = $(SIZE) --mcu=$(MCU) --format=avr $(TARGET).elf
+
+sizebefore:
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_BEFORE); $(ELFSIZE); \
+ 2>/dev/null; echo; fi
+
+sizeafter:
+ @if test -f $(TARGET).elf; then echo; echo $(MSG_SIZE_AFTER); $(ELFSIZE); \
+ 2>/dev/null; echo; fi
+
+
+
+# Display compiler version information.
+gccversion :
+ @$(CC) --version
+
+
+
+# Program the device.
+program: $(TARGET).hex $(TARGET).eep
+ $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM)
+
+
+# Generate avr-gdb config/init file which does the following:
+# define the reset signal, load the target file, connect to target, and set
+# a breakpoint at main().
+gdb-config:
+ @$(REMOVE) $(GDBINIT_FILE)
+ @echo define reset >> $(GDBINIT_FILE)
+ @echo SIGNAL SIGHUP >> $(GDBINIT_FILE)
+ @echo end >> $(GDBINIT_FILE)
+ @echo file $(TARGET).elf >> $(GDBINIT_FILE)
+ @echo target remote $(DEBUG_HOST):$(DEBUG_PORT) >> $(GDBINIT_FILE)
+ifeq ($(DEBUG_BACKEND),simulavr)
+ @echo load >> $(GDBINIT_FILE)
+endif
+ @echo break main >> $(GDBINIT_FILE)
+
+debug: gdb-config $(TARGET).elf
+ifeq ($(DEBUG_BACKEND), avarice)
+ @echo Starting AVaRICE - Press enter when "waiting to connect" message displays.
+ @$(WINSHELL) /c start avarice --jtag $(JTAG_DEV) --erase --program --file \
+ $(TARGET).elf $(DEBUG_HOST):$(DEBUG_PORT)
+ @$(WINSHELL) /c pause
+
+else
+ @$(WINSHELL) /c start simulavr --gdbserver --device $(MCU) --clock-freq \
+ $(DEBUG_MFREQ) --port $(DEBUG_PORT)
+endif
+ @$(WINSHELL) /c start avr-$(DEBUG_UI) --command=$(GDBINIT_FILE)
+
+
+
+
+# Convert ELF to COFF for use in debugging / simulating in AVR Studio or VMLAB.
+COFFCONVERT = $(OBJCOPY) --debugging
+COFFCONVERT += --change-section-address .data-0x800000
+COFFCONVERT += --change-section-address .bss-0x800000
+COFFCONVERT += --change-section-address .noinit-0x800000
+COFFCONVERT += --change-section-address .eeprom-0x810000
+
+
+
+coff: $(TARGET).elf
+ @echo
+ @echo $(MSG_COFF) $(TARGET).cof
+ $(COFFCONVERT) -O coff-avr $< $(TARGET).cof
+
+
+extcoff: $(TARGET).elf
+ @echo
+ @echo $(MSG_EXTENDED_COFF) $(TARGET).cof
+ $(COFFCONVERT) -O coff-ext-avr $< $(TARGET).cof
+
+
+
+# Create final output files (.hex, .eep) from ELF output file.
+%.hex: %.elf
+ @echo
+ @echo $(MSG_FLASH) $@
+ $(OBJCOPY) -O $(FORMAT) -R .eeprom $< $@
+
+%.bin: %.elf
+ $(OBJCOPY) -O binary $< $@
+
+%.eep: %.elf
+ @echo
+ @echo $(MSG_EEPROM) $@
+ -$(OBJCOPY) -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+ --change-section-lma .eeprom=0 --no-change-warnings -O $(FORMAT) $< $@ || exit 0
+
+# Create extended listing file from ELF output file.
+%.lss: %.elf
+ @echo
+ @echo $(MSG_EXTENDED_LISTING) $@
+ $(OBJDUMP) -h -S $< > $@
+
+# Create a symbol table from ELF output file.
+%.sym: %.elf
+ @echo
+ @echo $(MSG_SYMBOL_TABLE) $@
+ $(NM) -n $< > $@
+
+
+
+# Create library from object files.
+.SECONDARY : $(TARGET).a
+.PRECIOUS : $(OBJ)
+%.a: $(OBJ)
+ @echo
+ @echo $(MSG_CREATING_LIBRARY) $@
+ $(AR) $@ $(OBJ)
+
+
+# Link: create ELF output file from object files.
+.SECONDARY : $(TARGET).elf
+.PRECIOUS : $(OBJ)
+%.elf: $(OBJ)
+ @echo
+ @echo $(MSG_LINKING) $@
+ $(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS)
+
+
+# Compile: create object files from C source files.
+$(OBJDIR)/%.o : %.c
+ @echo
+ @echo $(MSG_COMPILING) $<
+ $(CC) -c $(ALL_CFLAGS) $< -o $@
+
+
+# Compile: create object files from C++ source files.
+$(OBJDIR)/%.o : %.cpp
+ @echo
+ @echo $(MSG_COMPILING_CPP) $<
+ $(CC) -c $(ALL_CPPFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C source files.
+%.s : %.c
+ $(CC) -S $(ALL_CFLAGS) $< -o $@
+
+
+# Compile: create assembler files from C++ source files.
+%.s : %.cpp
+ $(CC) -S $(ALL_CPPFLAGS) $< -o $@
+
+
+# Assemble: create object files from assembler source files.
+$(OBJDIR)/%.o : %.S
+ @echo
+ @echo $(MSG_ASSEMBLING) $<
+ $(CC) -c $(ALL_ASFLAGS) $< -o $@
+
+
+# Create preprocessed source for use in sending a bug report.
+%.i : %.c
+ $(CC) -E -mmcu=$(MCU) -I. $(CFLAGS) $< -o $@
+
+
+# Target: clean project.
+clean: begin clean_list end
+
+clean_list :
+ @echo
+ @echo $(MSG_CLEANING)
+ $(REMOVE) $(TARGET).hex
+ $(REMOVE) $(TARGET).eep
+ $(REMOVE) $(TARGET).cof
+ $(REMOVE) $(TARGET).elf
+ $(REMOVE) $(TARGET).map
+ $(REMOVE) $(TARGET).sym
+ $(REMOVE) $(TARGET).lss
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.o)
+ $(REMOVE) $(SRC:%.c=$(OBJDIR)/%.lst)
+ $(REMOVE) $(SRC:.c=.s)
+ $(REMOVE) $(SRC:.c=.d)
+ $(REMOVE) $(SRC:.c=.i)
+ $(REMOVEDIR) .dep
+
+
+# Create object files directory
+$(shell mkdir $(OBJDIR) 2>/dev/null)
+
+
+# Include the dependency files.
+-include $(shell mkdir .dep 2>/dev/null) $(wildcard .dep/*)
+
+
+# Listing of phony targets.
+.PHONY : all begin finish end sizebefore sizeafter gccversion \
+build elf hex eep lss sym coff extcoff \
+clean clean_list program debug gdb-config
+
+
+
+
diff --git a/Multiprotocol/MultiOrange.cpp.xmega b/Multiprotocol/MultiOrange.cpp.xmega
new file mode 100644
index 0000000..d9a916c
--- /dev/null
+++ b/Multiprotocol/MultiOrange.cpp.xmega
@@ -0,0 +1,162 @@
+#define ARDUINO_AVR_PRO 1
+//#define __AVR_ATmega328P__ 1
+
+#define XMEGA 1
+
+// For BLUE module use:
+//#define DSM_BLUE
+
+#include
+#include
+#include
+
+static void protocol_init(void) ;
+static void update_aux_flags(void) ;
+static uint32_t random_id(uint16_t adress, uint8_t create_new) ;
+static void update_serial_data(void) ;
+static void Mprotocol_serial_init(void) ;
+static void update_led_status(void) ;
+static void set_rx_tx_addr(uint32_t id) ;
+uint16_t limit_channel_100(uint8_t ch) ;
+void initTXSerial( uint8_t speed);
+void Serial_write(uint8_t data);
+
+extern void NRF24L01_Reset(void ) ;
+extern void A7105_Reset(void ) ;
+extern void CC2500_Reset(void ) ;
+extern uint8_t CYRF_Reset(void ) ;
+extern void CYRF_SetTxRxMode(uint8_t mode) ;
+
+extern void frskyUpdate(void) ;
+extern uint16_t initDsm2(void) ;
+extern uint16_t ReadDsm2(void) ;
+extern uint16_t DevoInit(void) ;
+extern uint16_t devo_callback(void) ;
+extern uint16_t initJ6Pro(void) ;
+extern uint16_t ReadJ6Pro(void) ;
+
+extern void randomSeed(unsigned int seed) ;
+extern long random(long howbig) ;
+extern long map(long x, long in_min, long in_max, long out_min, long out_max) ;
+
+extern uint32_t millis(void) ;
+extern uint32_t micros(void) ;
+extern void delayMicroseconds(uint16_t x) ;
+extern void delayMilliseconds(unsigned long ms) ;
+extern void init(void) ;
+
+extern void modules_reset() ;
+extern void Update_All() ;
+extern void tx_pause() ;
+extern void tx_resume() ;
+extern void TelemetryUpdate() ;
+extern uint16_t initDsm() ;
+extern uint16_t ReadDsm() ;
+
+#define yield()
+
+#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
+#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
+
+// the prescaler is set so that timer0 ticks every 64 clock cycles, and the
+// the overflow handler is called every 256 ticks.
+#define MICROSECONDS_PER_TIMER0_OVERFLOW (clockCyclesToMicroseconds(64 * 256))
+
+// the whole number of milliseconds per timer0 overflow
+#define MILLIS_INC (MICROSECONDS_PER_TIMER0_OVERFLOW / 1000)
+
+// the fractional number of milliseconds per timer0 overflow. we shift right
+// by three to fit these numbers into a byte. (for the clock speeds we care
+// about - 8 and 16 MHz - this doesn't lose precision.)
+#define FRACT_INC ((MICROSECONDS_PER_TIMER0_OVERFLOW % 1000) >> 3)
+#define FRACT_MAX (1000 >> 3)
+
+#ifndef cbi
+#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
+#endif
+#ifndef sbi
+#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
+#endif
+
+
+void init()
+{
+ // this needs to be called before setup() or some functions won't
+ // work there
+
+ // Enable external oscillator (16MHz)
+ OSC.XOSCCTRL = OSC_FRQRANGE_12TO16_gc | OSC_XOSCSEL_XTAL_256CLK_gc ;
+ OSC.CTRL |= OSC_XOSCEN_bm ;
+ while( ( OSC.STATUS & OSC_XOSCRDY_bm ) == 0 )
+ /* wait */ ;
+ // Enable PLL (*2 = 32MHz)
+ OSC.PLLCTRL = OSC_PLLSRC_XOSC_gc | 2 ;
+ OSC.CTRL |= OSC_PLLEN_bm ;
+ while( ( OSC.STATUS & OSC_PLLRDY_bm ) == 0 )
+ /* wait */ ;
+ // Switch to PLL clock
+ CPU_CCP = 0xD8 ;
+ CLK.CTRL = CLK_SCLKSEL_RC2M_gc ;
+ CPU_CCP = 0xD8 ;
+ CLK.CTRL = CLK_SCLKSEL_PLL_gc ;
+
+ PMIC.CTRL = 7 ; // Enable all interrupt levels
+ sei();
+
+#if defined(ADCSRA)
+ // set a2d prescale factor to 128
+ // 16 MHz / 128 = 125 KHz, inside the desired 50-200 KHz range.
+ // XXX: this will not work properly for other clock speeds, and
+ // this code should use F_CPU to determine the prescale factor.
+ sbi(ADCSRA, ADPS2);
+ sbi(ADCSRA, ADPS1);
+ sbi(ADCSRA, ADPS0);
+
+ // enable a2d conversions
+ sbi(ADCSRA, ADEN);
+#endif
+
+ // the bootloader connects pins 0 and 1 to the USART; disconnect them
+ // here so they can be used as normal digital i/o; they will be
+ // reconnected in Serial.begin()
+#if defined(UCSRB)
+ UCSRB = 0;
+#elif defined(UCSR0B)
+ UCSR0B = 0;
+#endif
+
+// Dip Switch inputs
+ PORTA.DIRCLR = 0xFF ;
+ PORTA.PIN0CTRL = 0x18 ;
+ PORTA.PIN1CTRL = 0x18 ;
+ PORTA.PIN2CTRL = 0x18 ;
+ PORTA.PIN3CTRL = 0x18 ;
+ PORTA.PIN4CTRL = 0x18 ;
+ PORTA.PIN5CTRL = 0x18 ;
+ PORTA.PIN6CTRL = 0x18 ;
+ PORTA.PIN7CTRL = 0x18 ;
+}
+
+#include "Multiprotocol.ino"
+#include "SPI.ino"
+#include "Convert.ino"
+#include "Arduino.ino"
+
+#include "cyrf6936_SPI.ino"
+#include "DSM_cyrf6936.ino"
+#include "Devo_cyrf6936.ino"
+#include "J6Pro_cyrf6936.ino"
+
+#include "Telemetry.ino"
+
+
+int main(void)
+{
+ init() ;
+ setup() ;
+ for(;;)
+ {
+ loop() ;
+ }
+}
+
diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h
new file mode 100644
index 0000000..672b922
--- /dev/null
+++ b/Multiprotocol/Multiprotocol.h
@@ -0,0 +1,485 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+// Check selected board type
+#ifndef XMEGA
+ #if not defined(ARDUINO_AVR_PRO) && not defined(ARDUINO_AVR_MINI) && not defined(ARDUINO_AVR_NANO)
+ #error You must select the board type "Arduino Pro or Pro Mini" or "Arduino Mini"
+ #endif
+ #if F_CPU != 16000000L || not defined(__AVR_ATmega328P__)
+ #error You must select the processor type "ATmega328(5V, 16MHz)"
+ #endif
+#endif
+
+//******************
+// Protocols
+//******************
+enum PROTOCOLS
+{
+ MODE_SERIAL = 0, // Serial commands
+ MODE_FLYSKY = 1, // =>A7105
+ MODE_HUBSAN = 2, // =>A7105
+ MODE_FRSKYD = 3, // =>CC2500
+ MODE_HISKY = 4, // =>NRF24L01
+ MODE_V2X2 = 5, // =>NRF24L01
+ MODE_DSM = 6, // =>CYRF6936
+ MODE_DEVO = 7, // =>CYRF6936
+ MODE_YD717 = 8, // =>NRF24L01
+ MODE_KN = 9, // =>NRF24L01
+ MODE_SYMAX = 10, // =>NRF24L01
+ MODE_SLT = 11, // =>NRF24L01
+ MODE_CX10 = 12, // =>NRF24L01
+ MODE_CG023 = 13, // =>NRF24L01
+ MODE_BAYANG = 14, // =>NRF24L01
+ MODE_FRSKYX = 15, // =>CC2500
+ MODE_ESKY = 16, // =>NRF24L01
+ MODE_MT99XX = 17, // =>NRF24L01
+ MODE_MJXQ = 18, // =>NRF24L01
+ MODE_SHENQI = 19, // =>NRF24L01
+ MODE_FY326 = 20, // =>NRF24L01
+ MODE_SFHSS = 21, // =>CC2500
+ MODE_J6PRO = 22, // =>CYRF6936
+ MODE_FQ777 = 23, // =>NRF24L01
+ MODE_ASSAN = 24, // =>NRF24L01
+ MODE_FRSKYV = 25, // =>CC2500
+ MODE_HONTAI = 26, // =>NRF24L01
+ MODE_OPENLRS = 27, // =>OpenLRS hardware
+};
+
+enum Flysky
+{
+ Flysky = 0,
+ V9X9 = 1,
+ V6X6 = 2,
+ V912 = 3
+};
+enum Hisky
+{
+ Hisky = 0,
+ HK310 = 1
+};
+enum DSM
+{
+ DSM2_22 = 0,
+ DSM2_11 = 1,
+ DSMX_22 = 2,
+ DSMX_11 = 3,
+ DSM_AUTO = 4
+};
+enum YD717
+{
+ YD717 = 0,
+ SKYWLKR = 1,
+ SYMAX4 = 2,
+ XINXUN = 3,
+ NIHUI = 4
+};
+enum KN
+{
+ WLTOYS = 0,
+ FEILUN = 1
+};
+enum SYMAX
+{
+ SYMAX = 0,
+ SYMAX5C = 1
+};
+enum CX10
+{
+ CX10_GREEN = 0,
+ CX10_BLUE = 1, // also compatible with CX10-A, CX12
+ DM007 = 2,
+ Q282 = 3,
+ JC3015_1 = 4,
+ JC3015_2 = 5,
+ MK33041 = 6,
+ Q242 = 7
+};
+enum CG023
+{
+ CG023 = 0,
+ YD829 = 1,
+ H8_3D = 2
+};
+enum MT99XX
+{
+ MT99 = 0,
+ H7 = 1,
+ YZ = 2,
+ LS = 3
+};
+enum MJXQ
+{
+ WLH08 = 0,
+ X600 = 1,
+ X800 = 2,
+ H26D = 3,
+ E010 = 4
+};
+enum FRSKYX
+{
+ CH_16 = 0,
+ CH_8 = 1,
+};
+enum HONTAI
+{
+ FORMAT_HONTAI = 0,
+ FORMAT_JJRCX1 = 1,
+ FORMAT_X5C1 = 2
+};
+
+#define NONE 0
+#define P_HIGH 1
+#define P_LOW 0
+#define AUTOBIND 1
+#define NO_AUTOBIND 0
+
+struct PPM_Parameters
+{
+ uint8_t protocol : 6;
+ uint8_t sub_proto : 3;
+ uint8_t rx_num : 4;
+ uint8_t power : 1;
+ uint8_t autobind : 1;
+ uint8_t option;
+};
+
+// Macros
+#define NOP() __asm__ __volatile__("nop")
+
+//*******************
+//*** Timer ***
+//*******************
+#ifdef XMEGA
+ #define TIFR1 TCC1.INTFLAGS
+ #define OCF1A_bm TC1_CCAIF_bm
+ #define OCR1A TCC1.CCA
+ #define TCNT1 TCC1.CNT
+ #define UDR0 USARTC0.DATA
+ #define OCF1B_bm TC1_CCBIF_bm
+ #define OCR1B TCC1.CCB
+ #define TIMSK1 TCC1.INTCTRLB
+ #define SET_TIMSK1_OCIE1B TIMSK1 = (TIMSK1 & 0xF3) | 0x04
+ #define CLR_TIMSK1_OCIE1B TIMSK1 &= 0xF3
+#else
+ #define OCF1A_bm _BV(OCF1A)
+ #define OCF1B_bm _BV(OCF1B)
+ #define SET_TIMSK1_OCIE1B TIMSK1 |= _BV(OCIE1B)
+ #define CLR_TIMSK1_OCIE1B TIMSK1 &=~_BV(OCIE1B)
+#endif
+
+//***************
+//*** Flags ***
+//***************
+#define RX_FLAG_on protocol_flags |= _BV(0)
+#define RX_FLAG_off protocol_flags &= ~_BV(0)
+#define IS_RX_FLAG_on ( ( protocol_flags & _BV(0) ) !=0 )
+//
+#define CHANGE_PROTOCOL_FLAG_on protocol_flags |= _BV(1)
+#define CHANGE_PROTOCOL_FLAG_off protocol_flags &= ~_BV(1)
+#define IS_CHANGE_PROTOCOL_FLAG_on ( ( protocol_flags & _BV(1) ) !=0 )
+//
+#define POWER_FLAG_on protocol_flags |= _BV(2)
+#define POWER_FLAG_off protocol_flags &= ~_BV(2)
+#define IS_POWER_FLAG_on ( ( protocol_flags & _BV(2) ) !=0 )
+//
+#define RANGE_FLAG_on protocol_flags |= _BV(3)
+#define RANGE_FLAG_off protocol_flags &= ~_BV(3)
+#define IS_RANGE_FLAG_on ( ( protocol_flags & _BV(3) ) !=0 )
+//
+#define AUTOBIND_FLAG_on protocol_flags |= _BV(4)
+#define AUTOBIND_FLAG_off protocol_flags &= ~_BV(4)
+#define IS_AUTOBIND_FLAG_on ( ( protocol_flags & _BV(4) ) !=0 )
+//
+#define BIND_BUTTON_FLAG_on protocol_flags |= _BV(5)
+#define BIND_BUTTON_FLAG_off protocol_flags &= ~_BV(5)
+#define IS_BIND_BUTTON_FLAG_on ( ( protocol_flags & _BV(5) ) !=0 )
+//PPM RX OK
+#define PPM_FLAG_off protocol_flags &= ~_BV(6)
+#define PPM_FLAG_on protocol_flags |= _BV(6)
+#define IS_PPM_FLAG_on ( ( protocol_flags & _BV(6) ) !=0 )
+//Bind flag
+#define BIND_IN_PROGRESS protocol_flags &= ~_BV(7)
+#define BIND_DONE protocol_flags |= _BV(7)
+#define IS_BIND_DONE_on ( ( protocol_flags & _BV(7) ) !=0 )
+//
+#define BAD_PROTO_off protocol_flags2 &= ~_BV(0)
+#define BAD_PROTO_on protocol_flags2 |= _BV(0)
+#define IS_BAD_PROTO_on ( ( protocol_flags2 & _BV(0) ) !=0 )
+//
+#define RX_DONOTUPDTAE_off protocol_flags2 &= ~_BV(1)
+#define RX_DONOTUPDTAE_on protocol_flags2 |= _BV(1)
+#define IS_RX_DONOTUPDTAE_on ( ( protocol_flags2 & _BV(1) ) !=0 )
+//
+#define RX_MISSED_BUFF_off protocol_flags2 &= ~_BV(2)
+#define RX_MISSED_BUFF_on protocol_flags2 |= _BV(2)
+#define IS_RX_MISSED_BUFF_on ( ( protocol_flags2 & _BV(2) ) !=0 )
+//TX Pause
+#define TX_MAIN_PAUSE_off protocol_flags2 &= ~_BV(3)
+#define TX_MAIN_PAUSE_on protocol_flags2 |= _BV(3)
+#define IS_TX_MAIN_PAUSE_on ( ( protocol_flags2 & _BV(3) ) !=0 )
+#define TX_RX_PAUSE_off protocol_flags2 &= ~_BV(4)
+#define TX_RX_PAUSE_on protocol_flags2 |= _BV(4)
+#define IS_TX_RX_PAUSE_on ( ( protocol_flags2 & _BV(4) ) !=0 )
+#define IS_TX_PAUSE_on ( ( protocol_flags2 & (_BV(4)|_BV(3)) ) !=0 )
+
+//********************
+//*** Blink timing ***
+//********************
+#define BLINK_BIND_TIME 100
+#define BLINK_SERIAL_TIME 500
+#define BLINK_BAD_PROTO_TIME_LOW 1000
+#define BLINK_BAD_PROTO_TIME_HIGH 50
+
+//*******************
+//*** AUX flags ***
+//*******************
+#define GET_FLAG(ch, mask) ( ch ? mask : 0)
+#define Servo_AUX1 Servo_AUX & _BV(0)
+#define Servo_AUX2 Servo_AUX & _BV(1)
+#define Servo_AUX3 Servo_AUX & _BV(2)
+#define Servo_AUX4 Servo_AUX & _BV(3)
+#define Servo_AUX5 Servo_AUX & _BV(4)
+#define Servo_AUX6 Servo_AUX & _BV(5)
+#define Servo_AUX7 Servo_AUX & _BV(6)
+#define Servo_AUX8 Servo_AUX & _BV(7)
+
+//************************
+//*** Power settings ***
+//************************
+enum {
+ TXPOWER_100uW,
+ TXPOWER_300uW,
+ TXPOWER_1mW,
+ TXPOWER_3mW,
+ TXPOWER_10mW,
+ TXPOWER_30mW,
+ TXPOWER_100mW,
+ TXPOWER_150mW
+};
+
+// A7105 power
+// Power amp is ~+16dBm so:
+enum A7105_POWER
+{
+ A7105_POWER_0 = 0x00<<3 | 0x00, // TXPOWER_100uW = -23dBm == PAC=0 TBG=0
+ A7105_POWER_1 = 0x00<<3 | 0x01, // TXPOWER_300uW = -20dBm == PAC=0 TBG=1
+ A7105_POWER_2 = 0x00<<3 | 0x02, // TXPOWER_1mW = -16dBm == PAC=0 TBG=2
+ A7105_POWER_3 = 0x00<<3 | 0x04, // TXPOWER_3mW = -11dBm == PAC=0 TBG=4
+ A7105_POWER_4 = 0x01<<3 | 0x05, // TXPOWER_10mW = -6dBm == PAC=1 TBG=5
+ A7105_POWER_5 = 0x02<<3 | 0x07, // TXPOWER_30mW = 0dBm == PAC=2 TBG=7
+ A7105_POWER_6 = 0x03<<3 | 0x07, // TXPOWER_100mW = 1dBm == PAC=3 TBG=7
+ A7105_POWER_7 = 0x03<<3 | 0x07 // TXPOWER_150mW = 1dBm == PAC=3 TBG=7
+};
+#define A7105_HIGH_POWER A7105_POWER_7
+#define A7105_LOW_POWER A7105_POWER_3
+#define A7105_RANGE_POWER A7105_POWER_0
+#define A7105_BIND_POWER A7105_POWER_0
+
+// NRF Power
+// Power setting is 0..3 for nRF24L01
+// Claimed power amp for nRF24L01 from eBay is 20dBm.
+enum NRF_POWER
+{ // Raw w 20dBm PA
+ NRF_POWER_0 = 0x00, // 0 : -18dBm (16uW) 2dBm (1.6mW)
+ NRF_POWER_1 = 0x01, // 1 : -12dBm (60uW) 8dBm (6mW)
+ NRF_POWER_2 = 0x02, // 2 : -6dBm (250uW) 14dBm (25mW)
+ NRF_POWER_3 = 0x03 // 3 : 0dBm (1mW) 20dBm (100mW)
+};
+#define NRF_HIGH_POWER NRF_POWER_2
+#define NRF_LOW_POWER NRF_POWER_1
+#define NRF_RANGE_POWER NRF_POWER_0
+#define NRF_BIND_POWER NRF_POWER_0
+
+// CC2500 power output from the chip itself
+// The numbers do not take into account any outside amplifier
+enum CC2500_POWER
+{
+ CC2500_POWER_0 = 0x00, // –55dbm or less
+ CC2500_POWER_1 = 0x50, // -30dbm
+ CC2500_POWER_2 = 0x44, // –28dbm
+ CC2500_POWER_3 = 0xC0, // –26dbm
+ CC2500_POWER_4 = 0x84, // –24dbm
+ CC2500_POWER_5 = 0x81, // –22dbm
+ CC2500_POWER_6 = 0x46, // –20dbm
+ CC2500_POWER_7 = 0x93, // –18dbm
+ CC2500_POWER_8 = 0x55, // –16dbm
+ CC2500_POWER_9 = 0x8D, // –14dbm
+ CC2500_POWER_10 = 0xC6, // -12dbm
+ CC2500_POWER_11 = 0x97, // -10dbm
+ CC2500_POWER_12 = 0x6E, // -8dbm
+ CC2500_POWER_13 = 0x7F, // -6dbm
+ CC2500_POWER_14 = 0xA9, // -4dbm
+ CC2500_POWER_15 = 0xBB, // -2dbm
+ CC2500_POWER_16 = 0xFE, // 0dbm
+ CC2500_POWER_17 = 0xFF // +1dbm
+};
+#define CC2500_HIGH_POWER CC2500_POWER_16
+#define CC2500_LOW_POWER CC2500_POWER_13
+#define CC2500_RANGE_POWER CC2500_POWER_1
+#define CC2500_BIND_POWER CC2500_POWER_1
+
+// CYRF power
+enum CYRF_POWER
+{
+ CYRF_POWER_0 = 0x00, // -35dbm
+ CYRF_POWER_1 = 0x01, // -30dbm
+ CYRF_POWER_2 = 0x02, // -24dbm
+ CYRF_POWER_3 = 0x03, // -18dbm
+ CYRF_POWER_4 = 0x04, // -13dbm
+ CYRF_POWER_5 = 0x05, // -5dbm
+ CYRF_POWER_6 = 0x06, // 0dbm
+ CYRF_POWER_7 = 0x07 // +4dbm
+};
+#define CYRF_HIGH_POWER CYRF_POWER_7
+#define CYRF_LOW_POWER CYRF_POWER_3
+#define CYRF_RANGE_POWER CYRF_POWER_1 // 1/30 of the full power distance
+#define CYRF_BIND_POWER CYRF_POWER_0
+
+enum TXRX_State {
+ TXRX_OFF,
+ TX_EN,
+ RX_EN
+};
+
+// Packet ack status values
+enum {
+ PKT_PENDING = 0,
+ PKT_ACKED,
+ PKT_TIMEOUT
+};
+
+// baudrate defines for serial
+#define SPEED_100K 0
+#define SPEED_9600 1
+#define SPEED_57600 2
+#define SPEED_125K 3
+
+//****************************************
+//*** MULTI protocol serial definition ***
+//****************************************
+/*
+**************************
+16 channels serial protocol
+**************************
+Serial: 100000 Baud 8e2 _ xxxx xxxx p --
+ Total of 26 bytes
+ Stream[0] = 0x55 sub_protocol values are 0..31
+ Stream[0] = 0x54 sub_protocol values are 32..63
+ header
+ Stream[1] = sub_protocol|BindBit|RangeCheckBit|AutoBindBit;
+ sub_protocol is 0..31 (bits 0..4), value should be added with 32 if Stream[0] = 0x54
+ => Reserved 0
+ Flysky 1
+ Hubsan 2
+ FrskyD 3
+ Hisky 4
+ V2x2 5
+ DSM 6
+ Devo 7
+ YD717 8
+ KN 9
+ SymaX 10
+ SLT 11
+ CX10 12
+ CG023 13
+ Bayang 14
+ FrskyX 15
+ ESky 16
+ MT99XX 17
+ MJXQ 18
+ SHENQI 19
+ FY326 20
+ SFHSS 21
+ J6PRO 22
+ FQ777 23
+ ASSAN 24
+ FrskyV 25
+ HONTAI 26
+ OpenLRS 27
+ BindBit=> 0x80 1=Bind/0=No
+ AutoBindBit=> 0x40 1=Yes /0=No
+ RangeCheck=> 0x20 1=Yes /0=No
+ Stream[2] = RxNum | Power | Type;
+ RxNum value is 0..15 (bits 0..3)
+ Type is 0..7 <<4 (bit 4..6)
+ sub_protocol==Flysky
+ Flysky 0
+ V9x9 1
+ V6x6 2
+ V912 3
+ sub_protocol==Hisky
+ Hisky 0
+ HK310 1
+ sub_protocol==DSM
+ DSM2_22 0
+ DSM2_11 1
+ DSMX_22 2
+ DSMX_11 3
+ sub_protocol==YD717
+ YD717 0
+ SKYWLKR 1
+ SYMAX4 2
+ XINXUN 3
+ NIHUI 4
+ sub_protocol==KN
+ WLTOYS 0
+ FEILUN 1
+ sub_protocol==SYMAX
+ SYMAX 0
+ SYMAX5C 1
+ sub_protocol==CX10
+ CX10_GREEN 0
+ CX10_BLUE 1 // also compatible with CX10-A, CX12
+ DM007 2
+ Q282 3
+ JC3015_1 4
+ JC3015_2 5
+ MK33041 6
+ Q242 7
+ sub_protocol==CG023
+ CG023 0
+ YD829 1
+ H8_3D 2
+ sub_protocol==MT99XX
+ MT99 0
+ H7 1
+ YZ 2
+ LS 3
+ sub_protocol==MJXQ
+ WLH08 0
+ X600 1
+ X800 2
+ H26D 3
+ E010 4
+ sub_protocol==FRSKYX
+ CH_16 0
+ CH_8 1
+ sub_protocol==HONTAI
+ FORMAT_HONTAI 0
+ FORMAT_JJRCX1 1
+ FORMAT_X5C1 2
+ Power value => 0x80 0=High/1=Low
+ Stream[3] = option_protocol;
+ option_protocol value is -127..127
+ Stream[4] to [25] = Channels
+ 16 Channels on 11 bits (0..2047)
+ 0 -125%
+ 204 -100%
+ 1024 0%
+ 1843 +100%
+ 2047 +125%
+ Channels bits are concatenated to fit in 22 bytes like in SBUS protocol
+*/
diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino
index 77036de..fe73f45 100644
--- a/Multiprotocol/Multiprotocol.ino
+++ b/Multiprotocol/Multiprotocol.ino
@@ -5,8 +5,13 @@
http://www.rcgroups.com/forums/showthread.php?t=2165676
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/edit/master/README.md
+<<<<<<< HEAD
Thanks to PhracturedBlue, Hexfet, Goebish and all protocol developers
Ported from deviation firmware
+=======
+ Thanks to PhracturedBlue, Hexfet, Goebish, Victzh and all protocol developers
+ Ported from deviation firmware
+>>>>>>> refs/remotes/pascallanger/master
This project is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -23,38 +28,64 @@
*/
#include
#include
+<<<<<<< HEAD
#include
+=======
+//#define DEBUG_TX
+#include "Pins.h"
+>>>>>>> refs/remotes/pascallanger/master
#include "Multiprotocol.h"
//Multiprotocol module configuration file
#include "_Config.h"
+<<<<<<< HEAD
+=======
+#include "TX_Def.h"
+
+#ifdef XMEGA
+ #undef ENABLE_PPM // Disable PPM for OrangeTX module
+ #undef A7105_INSTALLED // Disable A7105 for OrangeTX module
+ #undef CC2500_INSTALLED // Disable CC2500 for OrangeTX module
+ #undef NRF24L01_INSTALLED // Disable NRF for OrangeTX module
+ #define TELEMETRY // Enable telemetry
+ #define INVERT_TELEMETRY // Enable invert telemetry
+ #define DSM_TELEMETRY // Enable DSM telemetry
+#endif
+
+>>>>>>> refs/remotes/pascallanger/master
//Global constants/variables
uint32_t MProtocol_id;//tx id,
uint32_t MProtocol_id_master;
-uint32_t Model_fixed_id=0;
-uint32_t fixed_id;
-uint8_t cyrfmfg_id[6];//for dsm2 and devo
uint32_t blink=0;
//
uint16_t counter;
-uint8_t channel;
-uint8_t packet[40];
+uint8_t channel;
+uint8_t packet[40];
#define NUM_CHN 16
// Servo data
uint16_t Servo_data[NUM_CHN];
uint8_t Servo_AUX;
+<<<<<<< HEAD
const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4};
// Protocol variables
uint8_t rx_tx_addr[5];
uint8_t phase;
+=======
+uint16_t servo_max_100,servo_min_100,servo_max_125,servo_min_125;
+
+// Protocol variables
+uint8_t cyrfmfg_id[6];//for dsm2 and devo
+uint8_t rx_tx_addr[5];
+uint8_t phase;
+>>>>>>> refs/remotes/pascallanger/master
uint16_t bind_counter;
-uint8_t bind_phase;
-uint8_t binding_idx;
-uint32_t packet_counter;
+uint8_t bind_phase;
+uint8_t binding_idx;
uint16_t packet_period;
+<<<<<<< HEAD
uint8_t packet_count;
uint8_t packet_sent;
uint8_t packet_length;
@@ -69,6 +100,34 @@ uint16_t crc;
uint32_t state;
uint8_t len;
uint8_t RX_num;
+=======
+uint8_t packet_count;
+uint8_t packet_sent;
+uint8_t packet_length;
+uint8_t hopping_frequency[23];
+uint8_t *hopping_frequency_ptr;
+uint8_t hopping_frequency_no=0;
+uint8_t rf_ch_num;
+uint8_t throttle, rudder, elevator, aileron;
+uint8_t flags;
+uint16_t crc;
+uint8_t crc8;
+uint16_t seed;
+//
+uint16_t state;
+uint8_t len;
+uint8_t RX_num;
+
+#if defined(FRSKYX_CC2500_INO) || defined(SFHSS_CC2500_INO)
+ uint8_t calData[48];
+#endif
+
+//Channel mapping for protocols
+const uint8_t CH_AETR[]={AILERON, ELEVATOR, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4, AUX5, AUX6, AUX7, AUX8};
+const uint8_t CH_TAER[]={THROTTLE, AILERON, ELEVATOR, RUDDER, AUX1, AUX2, AUX3, AUX4, AUX5, AUX6, AUX7, AUX8};
+const uint8_t CH_RETA[]={RUDDER, ELEVATOR, THROTTLE, AILERON, AUX1, AUX2, AUX3, AUX4, AUX5, AUX6, AUX7, AUX8};
+const uint8_t CH_EATR[]={ELEVATOR, AILERON, THROTTLE, RUDDER, AUX1, AUX2, AUX3, AUX4, AUX5, AUX6, AUX7, AUX8};
+>>>>>>> refs/remotes/pascallanger/master
// Mode_select variables
uint8_t mode_select;
@@ -77,6 +136,7 @@ uint8_t protocol_flags=0,protocol_flags2=0;
// PPM variable
volatile uint16_t PPM_data[NUM_CHN];
+<<<<<<< HEAD
// Serial variables
#define RXBUFFER_SIZE 25
#define TXBUFFER_SIZE 12
@@ -84,20 +144,75 @@ volatile uint8_t rx_buff[RXBUFFER_SIZE];
volatile uint8_t rx_ok_buff[RXBUFFER_SIZE];
volatile uint8_t tx_buff[TXBUFFER_SIZE];
volatile uint8_t idx = 0;
+=======
+#ifndef XMEGA
+//Random variable
+volatile uint32_t gWDT_entropy=0;
+#endif
+>>>>>>> refs/remotes/pascallanger/master
//Serial protocol
uint8_t sub_protocol;
+uint8_t protocol;
uint8_t option;
-uint8_t cur_protocol[2];
-uint8_t prev_protocol=0;
+uint8_t cur_protocol[3];
+uint8_t prev_option;
+uint8_t prev_power=0xFD; // unused power value
+
+//Serial RX variables
+#define BAUD 100000
+#define RXBUFFER_SIZE 26
+volatile uint8_t rx_buff[RXBUFFER_SIZE];
+volatile uint8_t rx_ok_buff[RXBUFFER_SIZE];
+volatile uint8_t discard_frame = 0;
+
+//Make sure telemetry is selected correctly
+#ifndef TELEMETRY
+ #undef INVERT_TELEMETRY
+ #undef DSM_TELEMETRY
+ #undef SPORT_TELEMETRY
+ #undef HUB_TELEMETRY
+#else
+ #if not defined(CYRF6936_INSTALLED) || not defined(DSM_CYRF6936_INO)
+ #undef DSM_TELEMETRY
+ #endif
+ #if (not defined(CC2500_INSTALLED) || not defined(FRSKYD_CC2500_INO)) && (not defined(A7105_INSTALLED) || not defined(HUBSAN_A7105_INO))
+ #undef HUB_TELEMETRY
+ #endif
+ #if not defined(CC2500_INSTALLED) || not defined(FRSKYX_CC2500_INO)
+ #undef SPORT_TELEMETRY
+ #endif
+#endif
+#if not defined(DSM_TELEMETRY) && not defined(HUB_TELEMETRY) && not defined(SPORT_TELEMETRY)
+ #undef TELEMETRY
+ #undef INVERT_TELEMETRY
+#endif
// Telemetry
#define MAX_PKT 27
uint8_t pkt[MAX_PKT];//telemetry receiving packets
#if defined(TELEMETRY)
+<<<<<<< HEAD
uint8_t pktt[MAX_PKT];//telemetry receiving packets
volatile uint8_t tx_head;
volatile uint8_t tx_tail;
+=======
+ #ifdef INVERT_TELEMETRY
+ // enable bit bash for serial
+ #ifndef XMEGA
+ #define BASH_SERIAL 1
+ #endif
+ #define INVERT_SERIAL 1
+ #endif
+ uint8_t pass = 0;
+ uint8_t pktt[MAX_PKT];//telemetry receiving packets
+ #ifndef BASH_SERIAL
+ #define TXBUFFER_SIZE 32
+ volatile uint8_t tx_buff[TXBUFFER_SIZE];
+ volatile uint8_t tx_head=0;
+ volatile uint8_t tx_tail=0;
+ #endif // BASH_SERIAL
+>>>>>>> refs/remotes/pascallanger/master
uint8_t v_lipo;
int16_t RSSI_dBm;
//const uint8_t RSSI_offset=72;//69 71.72 values db
@@ -108,20 +223,68 @@ uint8_t pktt[MAX_PKT];//telemetry receiving packets
// Callback
typedef uint16_t (*void_function_t) (void);//pointer to a function with no parameters which return an uint16_t integer
void_function_t remote_callback = 0;
-static void CheckTimer(uint16_t (*cb)(void));
// Init
void setup()
{
- // General pinout
- DDRD = (1<>>>>>> refs/remotes/pascallanger/master
// Set servos positions
for(uint8_t i=0;i>>>>>> refs/remotes/pascallanger/master
//Protocol and interrupts initialization
if(mode_select != MODE_SERIAL)
{ // PPM
mode_select--;
+<<<<<<< HEAD
cur_protocol[0] = PPM_prot[mode_select].protocol;
+=======
+ protocol = PPM_prot[mode_select].protocol;
+ cur_protocol[1] = protocol;
+>>>>>>> refs/remotes/pascallanger/master
sub_protocol = PPM_prot[mode_select].sub_proto;
RX_num = PPM_prot[mode_select].rx_num;
MProtocol_id = RX_num + MProtocol_id_master;
@@ -178,6 +406,7 @@ void setup()
if(PPM_prot[mode_select].power) POWER_FLAG_on;
if(PPM_prot[mode_select].autobind) AUTOBIND_FLAG_on;
mode_select++;
+<<<<<<< HEAD
protocol_init();
@@ -186,19 +415,46 @@ void setup()
EIMSK |= (1<>>>>>> refs/remotes/pascallanger/master
#endif
}
else
+#endif //ENABLE_PPM
{ // Serial
- cur_protocol[0]=0;
- cur_protocol[1]=0;
- prev_protocol=0;
- Mprotocol_serial_init(); // Configure serial and enable RX interrupt
+ #ifdef ENABLE_SERIAL
+ for(uint8_t i=0;i<3;i++)
+ cur_protocol[i]=0;
+ protocol=0;
+ servo_max_100=SERIAL_MAX_100; servo_min_100=SERIAL_MIN_100;
+ servo_max_125=SERIAL_MAX_125; servo_min_125=SERIAL_MIN_125;
+ Mprotocol_serial_init(); // Configure serial and enable RX interrupt
+ #endif //ENABLE_SERIAL
}
}
// Main
+// Protocol scheduler
void loop()
+<<<<<<< HEAD
{
if(mode_select==MODE_SERIAL && IS_RX_FLAG_on) // Serial mode and something has been received
{
@@ -230,6 +486,98 @@ void loop()
#endif
if (remote_callback != 0)
CheckTimer(remote_callback);
+=======
+{
+ uint16_t next_callback,diff=0xFFFF;
+
+ while(1)
+ {
+ if(remote_callback==0 || diff>2*200)
+ {
+ do
+ {
+ Update_All();
+ }
+ while(remote_callback==0);
+ }
+ if( (TIFR1 & OCF1A_bm) != 0)
+ {
+ cli(); // Disable global int due to RW of 16 bits registers
+ OCR1A=TCNT1; // Callback should already have been called... Use "now" as new sync point.
+ sei(); // Enable global int
+ }
+ else
+ while((TIFR1 & OCF1A_bm) == 0); // Wait before callback
+ do
+ {
+ TX_MAIN_PAUSE_on;
+ tx_pause();
+ next_callback=remote_callback();
+ TX_MAIN_PAUSE_off;
+ tx_resume();
+ while(next_callback>4000)
+ { // start to wait here as much as we can...
+ next_callback-=2000; // We will wait below for 2ms
+ cli(); // Disable global int due to RW of 16 bits registers
+ OCR1A += 2000*2 ; // set compare A for callback
+ TIFR1=OCF1A_bm; // clear compare A=callback flag
+ sei(); // enable global int
+ Update_All();
+ if(IS_CHANGE_PROTOCOL_FLAG_on)
+ break; // Protocol has been changed
+ while((TIFR1 & OCF1A_bm) == 0); // wait 2ms...
+ }
+ // at this point we have a maximum of 4ms in next_callback
+ next_callback *= 2 ;
+ cli(); // Disable global int due to RW of 16 bits registers
+ OCR1A+= next_callback ; // set compare A for callback
+ TIFR1=OCF1A_bm; // clear compare A=callback flag
+ diff=OCR1A-TCNT1; // compare timer and comparator
+ sei(); // enable global int
+ }
+ while(diff&0x8000); // Callback did not took more than requested time for next callback
+ // so we can launch Update_All before next callback
+ }
+}
+
+void Update_All()
+{
+ #ifdef ENABLE_SERIAL
+ if(mode_select==MODE_SERIAL && IS_RX_FLAG_on) // Serial mode and something has been received
+ {
+ update_serial_data(); // Update protocol and data
+ update_aux_flags();
+ if(IS_CHANGE_PROTOCOL_FLAG_on)
+ { // Protocol needs to be changed
+ LED_off; //led off during protocol init
+ modules_reset(); //reset all modules
+ protocol_init(); //init new protocol
+ }
+ }
+ #endif //ENABLE_SERIAL
+ #ifdef ENABLE_PPM
+ if(mode_select!=MODE_SERIAL && IS_PPM_FLAG_on) // PPM mode and a full frame has been received
+ {
+ for(uint8_t i=0;iPPM_MAX_125) temp_ppm=PPM_MAX_125;
+ Servo_data[i]= temp_ppm ;
+ }
+ update_aux_flags();
+ PPM_FLAG_off; // wait for next frame before update
+ }
+ #endif //ENABLE_PPM
+ update_led_status();
+ #if defined(TELEMETRY)
+ if((protocol==MODE_FRSKYD) || (protocol==MODE_HUBSAN) || (protocol==MODE_FRSKYX) || (protocol==MODE_DSM) )
+ TelemetryUpdate();
+ #endif
+>>>>>>> refs/remotes/pascallanger/master
}
// Update Servo_AUX flags based on servo AUX positions
@@ -246,8 +594,13 @@ static void update_led_status(void)
{
if(blink>>>>>> refs/remotes/pascallanger/master
else
if(remote_callback == 0)
{ // Invalid protocol
@@ -258,6 +611,7 @@ static void update_led_status(void)
}
else
if(IS_BIND_DONE_on)
+<<<<<<< HEAD
LED_OFF; //bind completed -> led on
else
blink+=BLINK_BIND_TIME; //blink fastly during binding
@@ -297,6 +651,46 @@ static void CheckTimer(uint16_t (*cb)(void))
}
TIFR1=(1< led on
+ else
+ blink+=BLINK_BIND_TIME; //blink fastly during binding
+ LED_toggle;
+ }
+}
+
+inline void tx_pause()
+{
+ #ifdef TELEMETRY
+ #ifdef XMEGA
+ USARTC0.CTRLA &= ~0x03 ; // Pause telemetry by disabling transmitter interrupt
+ #else
+ #ifndef BASH_SERIAL
+ UCSR0B &= ~_BV(UDRIE0); // Pause telemetry by disabling transmitter interrupt
+ #endif
+ #endif
+ #endif
+}
+
+inline void tx_resume()
+{
+ #ifdef TELEMETRY
+ if(!IS_TX_PAUSE_on)
+ {
+ #ifdef XMEGA
+ cli() ;
+ USARTC0.CTRLA = (USARTC0.CTRLA & 0xFC) | 0x01 ; // Resume telemetry by enabling transmitter interrupt
+ sei() ;
+ #else
+ #ifndef BASH_SERIAL
+ UCSR0B |= _BV(UDRIE0); // Resume telemetry by enabling transmitter interrupt
+ #else
+ resumeBashSerial() ;
+ #endif
+ #endif
+ }
+ #endif
+>>>>>>> refs/remotes/pascallanger/master
}
// Protocol start
@@ -305,7 +699,17 @@ static void protocol_init()
uint16_t next_callback=0; // Default is immediate call back
remote_callback = 0;
- set_rx_tx_addr(MProtocol_id);
+ // reset telemetry
+ #ifdef TELEMETRY
+ tx_pause();
+ pass=0;
+ telemetry_link=0;
+ #ifndef BASH_SERIAL
+ tx_tail=0;
+ tx_head=0;
+ #endif
+ #endif
+
blink=millis();
if(IS_BIND_BUTTON_FLAG_on)
AUTOBIND_FLAG_on;
@@ -314,6 +718,7 @@ static void protocol_init()
else
BIND_DONE;
+<<<<<<< HEAD
CTRL1_on; //NRF24L01 antenna RF3 by default
CTRL2_off; //NRF24L01 antenna RF3 by default
@@ -529,21 +934,233 @@ static void protocol_init()
break;
#endif
}
+=======
+ PE1_on; //NRF24L01 antenna RF3 by default
+ PE2_off; //NRF24L01 antenna RF3 by default
+
+ switch(protocol) // Init the requested protocol
+ {
+ #ifdef A7105_INSTALLED
+ #if defined(FLYSKY_A7105_INO)
+ case MODE_FLYSKY:
+ PE1_off; //antenna RF1
+ next_callback = initFlySky();
+ remote_callback = ReadFlySky;
+ break;
+ #endif
+ #if defined(HUBSAN_A7105_INO)
+ case MODE_HUBSAN:
+ PE1_off; //antenna RF1
+ if(IS_BIND_BUTTON_FLAG_on) random_id(10,true); // Generate new ID if bind button is pressed.
+ next_callback = initHubsan();
+ remote_callback = ReadHubsan;
+ break;
+ #endif
+ #endif
+ #ifdef CC2500_INSTALLED
+ #if defined(FRSKYD_CC2500_INO)
+ case MODE_FRSKYD:
+ PE1_off; //antenna RF2
+ PE2_on;
+ next_callback = initFrSky_2way();
+ remote_callback = ReadFrSky_2way;
+ break;
+ #endif
+ #if defined(FRSKYV_CC2500_INO)
+ case MODE_FRSKYV:
+ PE1_off; //antenna RF2
+ PE2_on;
+ next_callback = initFRSKYV();
+ remote_callback = ReadFRSKYV;
+ break;
+ #endif
+ #if defined(FRSKYX_CC2500_INO)
+ case MODE_FRSKYX:
+ PE1_off; //antenna RF2
+ PE2_on;
+ next_callback = initFrSkyX();
+ remote_callback = ReadFrSkyX;
+ break;
+ #endif
+ #if defined(SFHSS_CC2500_INO)
+ case MODE_SFHSS:
+ PE1_off; //antenna RF2
+ PE2_on;
+ next_callback = initSFHSS();
+ remote_callback = ReadSFHSS;
+ break;
+ #endif
+ #endif
+ #ifdef CYRF6936_INSTALLED
+ #if defined(DSM_CYRF6936_INO)
+ case MODE_DSM:
+ PE2_on; //antenna RF4
+ next_callback = initDsm();
+ //Servo_data[2]=1500;//before binding
+ remote_callback = ReadDsm;
+ break;
+ #endif
+ #if defined(DEVO_CYRF6936_INO)
+ case MODE_DEVO:
+ #ifdef ENABLE_PPM
+ if(mode_select) //PPM mode
+ {
+ if(IS_BIND_BUTTON_FLAG_on)
+ {
+ eeprom_write_byte((uint8_t*)(30+mode_select),0x00); // reset to autobind mode for the current model
+ option=0;
+ }
+ else
+ {
+ option=eeprom_read_byte((uint8_t*)(30+mode_select)); // load previous mode: autobind or fixed id
+ if(option!=1) option=0; // if not fixed id mode then it should be autobind
+ }
+ }
+ #endif //ENABLE_PPM
+ PE2_on; //antenna RF4
+ next_callback = DevoInit();
+ remote_callback = devo_callback;
+ break;
+ #endif
+ #if defined(J6PRO_CYRF6936_INO)
+ case MODE_J6PRO:
+ PE2_on; //antenna RF4
+ next_callback = initJ6Pro();
+ remote_callback = ReadJ6Pro;
+ break;
+ #endif
+ #endif
+ #ifdef NRF24L01_INSTALLED
+ #if defined(HISKY_NRF24L01_INO)
+ case MODE_HISKY:
+ next_callback=initHiSky();
+ remote_callback = hisky_cb;
+ break;
+ #endif
+ #if defined(V2X2_NRF24L01_INO)
+ case MODE_V2X2:
+ next_callback = initV2x2();
+ remote_callback = ReadV2x2;
+ break;
+ #endif
+ #if defined(YD717_NRF24L01_INO)
+ case MODE_YD717:
+ next_callback=initYD717();
+ remote_callback = yd717_callback;
+ break;
+ #endif
+ #if defined(KN_NRF24L01_INO)
+ case MODE_KN:
+ next_callback = initKN();
+ remote_callback = kn_callback;
+ break;
+ #endif
+ #if defined(SYMAX_NRF24L01_INO)
+ case MODE_SYMAX:
+ next_callback = initSymax();
+ remote_callback = symax_callback;
+ break;
+ #endif
+ #if defined(SLT_NRF24L01_INO)
+ case MODE_SLT:
+ next_callback=initSLT();
+ remote_callback = SLT_callback;
+ break;
+ #endif
+ #if defined(CX10_NRF24L01_INO)
+ case MODE_CX10:
+ next_callback=initCX10();
+ remote_callback = CX10_callback;
+ break;
+ #endif
+ #if defined(CG023_NRF24L01_INO)
+ case MODE_CG023:
+ next_callback=initCG023();
+ remote_callback = CG023_callback;
+ break;
+ #endif
+ #if defined(BAYANG_NRF24L01_INO)
+ case MODE_BAYANG:
+ next_callback=initBAYANG();
+ remote_callback = BAYANG_callback;
+ break;
+ #endif
+ #if defined(ESKY_NRF24L01_INO)
+ case MODE_ESKY:
+ next_callback=initESKY();
+ remote_callback = ESKY_callback;
+ break;
+ #endif
+ #if defined(MT99XX_NRF24L01_INO)
+ case MODE_MT99XX:
+ next_callback=initMT99XX();
+ remote_callback = MT99XX_callback;
+ break;
+ #endif
+ #if defined(MJXQ_NRF24L01_INO)
+ case MODE_MJXQ:
+ next_callback=initMJXQ();
+ remote_callback = MJXQ_callback;
+ break;
+ #endif
+ #if defined(SHENQI_NRF24L01_INO)
+ case MODE_SHENQI:
+ next_callback=initSHENQI();
+ remote_callback = SHENQI_callback;
+ break;
+ #endif
+ #if defined(FY326_NRF24L01_INO)
+ case MODE_FY326:
+ next_callback=initFY326();
+ remote_callback = FY326_callback;
+ break;
+ #endif
+ #if defined(FQ777_NRF24L01_INO)
+ case MODE_FQ777:
+ next_callback=initFQ777();
+ remote_callback = FQ777_callback;
+ break;
+ #endif
+ #if defined(ASSAN_NRF24L01_INO)
+ case MODE_ASSAN:
+ next_callback=initASSAN();
+ remote_callback = ASSAN_callback;
+ break;
+ #endif
+ #if defined(HONTAI_NRF24L01_INO)
+ case MODE_HONTAI:
+ next_callback=initHONTAI();
+ remote_callback = HONTAI_callback;
+ break;
+ #endif
+ #endif
+ }
+>>>>>>> refs/remotes/pascallanger/master
if(next_callback>32000)
{ // next_callback should not be more than 32767 so we will wait here...
- delayMicroseconds(next_callback-2000);
- next_callback=2000;
+ uint16_t temp=(next_callback>>10)-2;
+ delayMilliseconds(temp);
+ next_callback-=temp<<10; // between 2-3ms left at this stage
}
+<<<<<<< HEAD
cli(); // disable global int
OCR1A=TCNT1+next_callback*2; // set compare A for callback
sei(); // enable global int
TIFR1=(1<>>>>>> refs/remotes/pascallanger/master
}
-static void update_serial_data()
+void update_serial_data()
{
+<<<<<<< HEAD
if(rx_ok_buff[0]&0x20) //check range
RANGE_FLAG_on;
else
@@ -558,9 +1175,28 @@ static void update_serial_data()
POWER_FLAG_on; //power high
option=rx_ok_buff[2];
+=======
+ RX_DONOTUPDTAE_on;
+ RX_FLAG_off; //data is being processed
+ if(rx_ok_buff[1]&0x20) //check range
+ RANGE_FLAG_on;
+ else
+ RANGE_FLAG_off;
+ if(rx_ok_buff[1]&0xC0) //check autobind(0x40) & bind(0x80) together
+ AUTOBIND_FLAG_on;
+ else
+ AUTOBIND_FLAG_off;
+ if(rx_ok_buff[2]&0x80) //if rx_ok_buff[2] ==1,power is low ,0-power high
+ POWER_FLAG_off; //power low
+ else
+ POWER_FLAG_on; //power high
+>>>>>>> refs/remotes/pascallanger/master
- if( ((rx_ok_buff[0]&0x5F) != (cur_protocol[0]&0x5F)) || ( (rx_ok_buff[1]&0x7F) != cur_protocol[1] ) )
+ option=rx_ok_buff[3];
+
+ if( (rx_ok_buff[0] != cur_protocol[0]) || ((rx_ok_buff[1]&0x5F) != (cur_protocol[1]&0x5F)) || ( (rx_ok_buff[2]&0x7F) != (cur_protocol[2]&0x7F) ) )
{ // New model has been selected
+<<<<<<< HEAD
prev_protocol=cur_protocol[0]&0x1F; //store previous protocol so we can reset the module
cur_protocol[1] = rx_ok_buff[1]&0x7F; //store current protocol
CHANGE_PROTOCOL_FLAG_on; //change protocol
@@ -576,11 +1212,33 @@ static void update_serial_data()
// decode channel values
volatile uint8_t *p=rx_ok_buff+2;
uint8_t dec=-3;
+=======
+ CHANGE_PROTOCOL_FLAG_on; //change protocol
+ protocol=(rx_ok_buff[0]==0x55?0:32) + (rx_ok_buff[1]&0x1F); //protocol no (0-63) bits 4-6 of buff[1] and bit 0 of buf[0]
+ sub_protocol=(rx_ok_buff[2]>>4)& 0x07; //subprotocol no (0-7) bits 4-6
+ RX_num=rx_ok_buff[2]& 0x0F; // rx_num bits 0---3
+ MProtocol_id=MProtocol_id_master+RX_num;//personalized RX bind + rx num
+ set_rx_tx_addr(MProtocol_id); //set rx_tx_addr
+ }
+ else
+ if( ((rx_ok_buff[1]&0x80)!=0) && ((cur_protocol[1]&0x80)==0) ) // Bind flag has been set
+ CHANGE_PROTOCOL_FLAG_on; //restart protocol with bind
+ else
+ CHANGE_PROTOCOL_FLAG_off; //no need to restart
+ //store current protocol values
+ for(uint8_t i=0;i<3;i++)
+ cur_protocol[i] = rx_ok_buff[i];
+
+ // decode channel values
+ volatile uint8_t *p=rx_ok_buff+3;
+ uint8_t dec=-3;
+>>>>>>> refs/remotes/pascallanger/master
for(uint8_t i=0;i=8)
{
+<<<<<<< HEAD
dec-=8;
p++;
}
@@ -613,60 +1271,109 @@ static void module_reset()
NRF24L01_Reset();
break;
}
+=======
+ dec-=8;
+ p++;
+ }
+ p++;
+ Servo_data[i]=((((*((uint32_t *)p))>>dec)&0x7FF)*5)/8+860; //value range 860<->2140 -125%<->+125%
}
+ RX_DONOTUPDTAE_off;
+ #ifdef XMEGA
+ cli();
+ #else
+ UCSR0B &= ~_BV(RXCIE0); // RX interrupt disable
+ #endif
+ if(IS_RX_MISSED_BUFF_on) // If the buffer is still valid
+ { memcpy((void*)rx_ok_buff,(const void*)rx_buff,RXBUFFER_SIZE);// Duplicate the buffer
+ RX_FLAG_on; // data to be processed next time...
+ RX_MISSED_BUFF_off;
+>>>>>>> refs/remotes/pascallanger/master
+ }
+ #ifdef XMEGA
+ sei();
+ #else
+ UCSR0B |= _BV(RXCIE0) ; // RX interrupt enable
+ #endif
}
-// Channel value is converted to 8bit values full scale
-uint8_t convert_channel_8b(uint8_t num)
+void modules_reset()
{
- return (uint8_t) (map(limit_channel_100(num),PPM_MIN_100,PPM_MAX_100,0,255));
+ #ifdef CC2500_INSTALLED
+ CC2500_Reset();
+ #endif
+ #ifdef A7105_INSTALLED
+ A7105_Reset();
+ #endif
+ #ifdef CYRF6936_INSTALLED
+ CYRF_Reset();
+ #endif
+ #ifdef NRF24L01_INSTALLED
+ NRF24L01_Reset();
+ #endif
+
+ //Wait for every component to reset
+ delayMilliseconds(100);
+ prev_power=0xFD; // unused power value
}
-// Channel value is converted to 8bit values to provided values scale
-uint8_t convert_channel_8b_scale(uint8_t num,uint8_t min,uint8_t max)
+void Mprotocol_serial_init()
{
- return (uint8_t) (map(limit_channel_100(num),PPM_MIN_100,PPM_MAX_100,min,max));
+ #ifdef XMEGA
+ PORTC.OUTSET = 0x08 ;
+ PORTC.DIRSET = 0x08 ;
+
+ USARTC0.BAUDCTRLA = 19 ;
+ USARTC0.BAUDCTRLB = 0 ;
+
+ USARTC0.CTRLB = 0x18 ;
+ USARTC0.CTRLA = (USARTC0.CTRLA & 0xCF) | 0x10 ;
+ USARTC0.CTRLC = 0x2B ;
+ UDR0 ;
+ #ifdef INVERT_TELEMETRY
+ PORTC.PIN3CTRL |= 0x40 ;
+ #endif
+ #else
+ #include
+ UBRR0H = UBRRH_VALUE;
+ UBRR0L = UBRRL_VALUE;
+ UCSR0A = 0 ; // Clear X2 bit
+ //Set frame format to 8 data bits, even parity, 2 stop bits
+ UCSR0C = _BV(UPM01)|_BV(USBS0)|_BV(UCSZ01)|_BV(UCSZ00);
+ while ( UCSR0A & (1 << RXC0) )//flush receive buffer
+ UDR0;
+ //enable reception and RC complete interrupt
+ UCSR0B = _BV(RXEN0)|_BV(RXCIE0);//rx enable and interrupt
+ #ifndef DEBUG_TX
+ #if defined(TELEMETRY)
+ initTXSerial( SPEED_100K ) ;
+ #endif //TELEMETRY
+ #endif //DEBUG_TX
+ #endif //XMEGA
}
-// Channel value is converted sign + magnitude 8bit values
-uint8_t convert_channel_s8b(uint8_t num)
-{
- uint8_t ch;
- ch = convert_channel_8b(num);
- return (ch < 128 ? 127-ch : ch);
-}
-
-// Channel value is converted to 10bit values
-uint16_t convert_channel_10b(uint8_t num)
-{
- return (uint16_t) (map(limit_channel_100(num),PPM_MIN_100,PPM_MAX_100,1,1023));
-}
-
-// Channel value is multiplied by 1.5
-uint16_t convert_channel_frsky(uint8_t num)
-{
- return Servo_data[num] + Servo_data[num]/2;
-}
-
-// Channel value is converted for HK310
-void convert_channel_HK310(uint8_t num, uint8_t *low, uint8_t *high)
-{
- uint16_t temp=0xFFFF-(4*Servo_data[num])/3;
- *low=(uint8_t)(temp&0xFF);
- *high=(uint8_t)(temp>>8);
-}
-
-// Channel value is limited to PPM_100
-uint16_t limit_channel_100(uint8_t ch)
+#if defined(TELEMETRY)
+void PPM_Telemetry_serial_init()
{
+<<<<<<< HEAD
if(Servo_data[ch]>PPM_MAX_100)
return PPM_MAX_100;
else
if (Servo_data[ch]>>>>>> refs/remotes/pascallanger/master
}
+#endif
+<<<<<<< HEAD
#if defined(TELEMETRY)
void Serial_write(uint8_t data)
{
@@ -676,11 +1383,31 @@ void Serial_write(uint8_t data)
tx_buff[tx_head]=data;
sei(); // enable global int
UCSR0B |= (1<> 24) & 0xFF;
+ rx_tx_addr[1] = (id >> 16) & 0xFF;
+ rx_tx_addr[2] = (id >> 8) & 0xFF;
+ rx_tx_addr[3] = (id >> 0) & 0xFF;
+ rx_tx_addr[4] = (rx_tx_addr[2]&0xF0)|(rx_tx_addr[3]&0x0F);
}
-#endif
-static void Mprotocol_serial_init()
+#ifndef XMEGA
+static void random_init(void)
{
+ cli(); // Temporarily turn off interrupts, until WDT configured
+ MCUSR = 0; // Use the MCU status register to reset flags for WDR, BOR, EXTR, and POWR
+ WDTCSR |= _BV(WDCE); // WDT control register, This sets the Watchdog Change Enable (WDCE) flag, which is needed to set the prescaler
+ WDTCSR = _BV(WDIE); // Watchdog interrupt enable (WDIE)
+ sei(); // Turn interupts on
+>>>>>>> refs/remotes/pascallanger/master
+}
+
+static uint32_t random_value(void)
+{
+<<<<<<< HEAD
#include
UBRR0H = UBRRH_VALUE;
UBRR0L = UBRRL_VALUE;
@@ -692,7 +1419,12 @@ static void Mprotocol_serial_init()
//enable reception and RC complete interrupt
UCSR0B = (1<>>>>>> refs/remotes/pascallanger/master
}
+#endif
#if defined(TELEMETRY)
static void PPM_Telemetry_serial_init()
@@ -722,23 +1454,21 @@ static uint32_t random_id(uint16_t adress, uint8_t create_new)
uint32_t id;
uint8_t txid[4];
- if (eeprom_read_byte((uint8_t*)(adress+10))==0xf0 && !create_new)
+ if(eeprom_read_byte((uint8_t*)(adress+10))==0xf0 && !create_new)
{ // TXID exists in EEPROM
eeprom_read_block((void*)txid,(const void*)adress,4);
id=(txid[0] | ((uint32_t)txid[1]<<8) | ((uint32_t)txid[2]<<16) | ((uint32_t)txid[3]<<24));
+ if(id!=0x2AD141A7) //ID with seed=0
+ return id;
}
- else
- { // if not generate a random ID
- randomSeed((uint32_t)analogRead(A6)<<10|analogRead(A7));//seed
- //
- id = random(0xfefefefe) + ((uint32_t)random(0xfefefefe) << 16);
- txid[0]= (id &0xFF);
- txid[1] = ((id >> 8) & 0xFF);
- txid[2] = ((id >> 16) & 0xFF);
- txid[3] = ((id >> 24) & 0xFF);
- eeprom_write_block((const void*)txid,(void*)adress,4);
- eeprom_write_byte((uint8_t*)(adress+10),0xf0);//write bind flag in eeprom.
- }
+ // Generate a random ID
+ id = random(0xfefefefe) + ((uint32_t)random(0xfefefefe) << 16);
+ txid[0]= (id &0xFF);
+ txid[1] = ((id >> 8) & 0xFF);
+ txid[2] = ((id >> 16) & 0xFF);
+ txid[3] = ((id >> 24) & 0xFF);
+ eeprom_write_block((const void*)txid,(void*)adress,4);
+ eeprom_write_byte((uint8_t*)(adress+10),0xf0);//write bind flag in eeprom.
return id;
}
@@ -749,31 +1479,43 @@ static uint32_t random_id(uint16_t adress, uint8_t create_new)
/**************************/
//PPM
+<<<<<<< HEAD
ISR(INT1_vect)
{ // Interrupt on PPM pin
static int8_t chan=-1;
static uint16_t Prev_TCNT1=0;
uint16_t Cur_TCNT1;
+=======
+#ifdef ENABLE_PPM
+ #ifdef XMEGA
+ #if PPM_pin == 2
+ ISR(PORTD_INT0_vect)
+ #else
+ ISR(PORTD_INT1_vect)
+ #endif
+ #else
+ #if PPM_pin == 2
+ ISR(INT0_vect, ISR_NOBLOCK)
+ #else
+ ISR(INT1_vect, ISR_NOBLOCK)
+ #endif
+ #endif
+ { // Interrupt on PPM pin
+ static int8_t chan=-1;
+ static uint16_t Prev_TCNT1=0;
+ uint16_t Cur_TCNT1;
+>>>>>>> refs/remotes/pascallanger/master
- Cur_TCNT1=TCNT1-Prev_TCNT1; // Capture current Timer1 value
- if(Cur_TCNT1<1000)
- chan=-1; // bad frame
- else
- if(Cur_TCNT1>4840)
- {
- chan=0; // start of frame
- PPM_FLAG_on; // full frame present (even at startup since PPM_data has been initialized)
- }
+ Cur_TCNT1 = TCNT1 - Prev_TCNT1 ; // Capture current Timer1 value
+ if(Cur_TCNT1<1000)
+ chan=-1; // bad frame
else
- if(chan!=-1) // need to wait for start of frame
- { //servo values between 500us and 2420us will end up here
- uint16_t a = Cur_TCNT1>>1;
- if(aPPM_MAX) a=PPM_MAX;
- PPM_data[chan]=a;
- if(chan++>=NUM_CHN)
- chan=-1; // don't accept any new channels
+ if(Cur_TCNT1>4840)
+ {
+ chan=0; // start of frame
+ PPM_FLAG_on; // full frame present (even at startup since PPM_data has been initialized)
}
+<<<<<<< HEAD
Prev_TCNT1+=Cur_TCNT1;
}
@@ -785,34 +1527,123 @@ ISR(USART_RX_vect)
if(idx==0)
{ // Let's try to sync at this point
if(UDR0==0x55) // If 1st byte is 0x55 it looks ok
+=======
+ else
+ if(chan!=-1) // need to wait for start of frame
+ { //servo values between 500us and 2420us will end up here
+ PPM_data[chan]= Cur_TCNT1>>1;;
+ if(chan++>=NUM_CHN)
+ chan=-1; // don't accept any new channels
+ }
+ Prev_TCNT1+=Cur_TCNT1;
+ }
+#endif //ENABLE_PPM
+
+//Serial RX
+#ifdef ENABLE_SERIAL
+ #ifdef XMEGA
+ ISR(USARTC0_RXC_vect)
+ #else
+ ISR(USART_RX_vect)
+ #endif
+ { // RX interrupt
+ static uint8_t idx=0;
+ #ifdef XMEGA
+ if((USARTC0.STATUS & 0x1C)==0) // Check frame error, data overrun and parity error
+ #else
+ UCSR0B &= ~_BV(RXCIE0) ; // RX interrupt disable
+ sei() ;
+ if((UCSR0A&0x1C)==0) // Check frame error, data overrun and parity error
+ #endif
+ { // received byte is ok to process
+ if(idx==0||discard_frame==1)
+ { // Let's try to sync at this point
+ idx=0;discard_frame=0;
+ RX_MISSED_BUFF_off; // If rx_buff was good it's not anymore...
+ rx_buff[0]=UDR0;
+ if((rx_buff[0]&0xFE)==0x54) // If 1st byte is 0x54 or 0x55 it looks ok
+ {
+ TX_RX_PAUSE_on;
+ tx_pause();
+ OCR1B = TCNT1+(6500L) ; // Full message should be received within timer of 3250us
+ TIFR1 = OCF1B_bm ; // clear OCR1B match flag
+ SET_TIMSK1_OCIE1B ; // enable interrupt on compare B match
+ idx++;
+ }
+ }
+ else
+>>>>>>> refs/remotes/pascallanger/master
{
- idx++;
- OCR1B=TCNT1+6500L; // Full message should be received within timer of 3250us
- TIFR1=(1<=RXBUFFER_SIZE)
+ { // A full frame has been received
+ if(!IS_RX_DONOTUPDTAE_on)
+ { //Good frame received and main is not working on the buffer
+ memcpy((void*)rx_ok_buff,(const void*)rx_buff,RXBUFFER_SIZE);// Duplicate the buffer
+ RX_FLAG_on; // flag for main to process servo data
+ }
+ else
+ RX_MISSED_BUFF_on; // notify that rx_buff is good
+ discard_frame=1; // start again
+ }
}
}
else
{
- rx_buff[(idx++)-1]=UDR0; // Store received byte
- if(idx>RXBUFFER_SIZE)
- { // A full frame has been received
- TIMSK1 &=~(1<= gWDT_buffer_SIZE)
+ {
+ // The following code is an implementation of Jenkin's one at a time hash
+ for(uint8_t gWDT_loop_counter = 0; gWDT_loop_counter < gWDT_buffer_SIZE; ++gWDT_loop_counter)
+ {
+ gWDT_entropy += gWDT_buffer[gWDT_loop_counter];
+ gWDT_entropy += (gWDT_entropy << 10);
+ gWDT_entropy ^= (gWDT_entropy >> 6);
}
+ gWDT_entropy += (gWDT_entropy << 3);
+ gWDT_entropy ^= (gWDT_entropy >> 11);
+ gWDT_entropy += (gWDT_entropy << 15);
+ WDTCSR = 0; // Disable Watchdog interrupt
}
}
- else
- {
- idx=UDR0; // Dummy read
- idx=0; // Error encountered discard full frame...
- }
+<<<<<<< HEAD
}
//Serial timer
@@ -836,4 +1667,6 @@ ISR(USART_UDRE_vect)
if (t == tx_head)
UCSR0B &= ~(1<>>>>>> refs/remotes/pascallanger/master
#endif
diff --git a/Multiprotocol/NRF24l01_SPI.ino b/Multiprotocol/NRF24l01_SPI.ino
index f95e86f..dc740c5 100644
--- a/Multiprotocol/NRF24l01_SPI.ino
+++ b/Multiprotocol/NRF24l01_SPI.ino
@@ -19,45 +19,6 @@
//---------------------------
#include "iface_nrf24l01.h"
-static void nrf_spi_write(uint8_t command)
-{
- uint8_t n=8;
-
- SCK_off;//SCK start low
- SDI_off;
- while(n--) {
- if(command&0x80)
- SDI_on;
- else
- SDI_off;
- SCK_on;
- NOP();
- SCK_off;
- command = command << 1;
- }
- SDI_on;
-}
-
-//VARIANT 2
-static uint8_t nrf_spi_read(void)
-{
- uint8_t result;
- uint8_t i;
- result=0;
- for(i=0;i<8;i++) {
- result<<=1;
- if(SDO_1) ///
- result|=0x01;
- SCK_on;
- NOP();
- SCK_off;
- NOP();
- }
- return result;
-}
-//--------------------------------------------
-
-
//---------------------------
// NRF24L01+ SPI Specific Functions
@@ -73,8 +34,8 @@ void NRF24L01_Initialize()
void NRF24L01_WriteReg(uint8_t reg, uint8_t data)
{
NRF_CSN_off;
- nrf_spi_write(W_REGISTER | (REGISTER_MASK & reg));
- nrf_spi_write(data);
+ SPI_Write(W_REGISTER | (REGISTER_MASK & reg));
+ SPI_Write(data);
NRF_CSN_on;
}
@@ -82,26 +43,26 @@ void NRF24L01_WriteRegisterMulti(uint8_t reg, uint8_t * data, uint8_t length)
{
NRF_CSN_off;
- nrf_spi_write(W_REGISTER | ( REGISTER_MASK & reg));
+ SPI_Write(W_REGISTER | ( REGISTER_MASK & reg));
for (uint8_t i = 0; i < length; i++)
- nrf_spi_write(data[i]);
+ SPI_Write(data[i]);
NRF_CSN_on;
}
void NRF24L01_WritePayload(uint8_t * data, uint8_t length)
{
NRF_CSN_off;
- nrf_spi_write(W_TX_PAYLOAD);
+ SPI_Write(W_TX_PAYLOAD);
for (uint8_t i = 0; i < length; i++)
- nrf_spi_write(data[i]);
+ SPI_Write(data[i]);
NRF_CSN_on;
}
uint8_t NRF24L01_ReadReg(uint8_t reg)
{
NRF_CSN_off;
- nrf_spi_write(R_REGISTER | (REGISTER_MASK & reg));
- uint8_t data = nrf_spi_read();
+ SPI_Write(R_REGISTER | (REGISTER_MASK & reg));
+ uint8_t data = SPI_Read();
NRF_CSN_on;
return data;
}
@@ -109,25 +70,35 @@ uint8_t NRF24L01_ReadReg(uint8_t reg)
/*static void NRF24L01_ReadRegisterMulti(uint8_t reg, uint8_t * data, uint8_t length)
{
NRF_CSN_off;
- nrf_spi_write(R_REGISTER | (REGISTER_MASK & reg));
+ SPI_Write(R_REGISTER | (REGISTER_MASK & reg));
for(uint8_t i = 0; i < length; i++)
- data[i] = nrf_spi_read();
+ data[i] = SPI_Read();
NRF_CSN_on;
}
*/
+
+static uint8_t __attribute__((unused)) NRF24L01_ReadPayloadLength()
+{
+ NRF_CSN_off;
+ SPI_Write(R_RX_PL_WID);
+ uint8_t len = SPI_Read();
+ NRF_CSN_on;
+ return len;
+}
+
static void NRF24L01_ReadPayload(uint8_t * data, uint8_t length)
{
NRF_CSN_off;
- nrf_spi_write(R_RX_PAYLOAD);
+ SPI_Write(R_RX_PAYLOAD);
for(uint8_t i = 0; i < length; i++)
- data[i] = nrf_spi_read();
+ data[i] = SPI_Read();
NRF_CSN_on;
}
static void NRF24L01_Strobe(uint8_t state)
{
NRF_CSN_off;
- nrf_spi_write(state);
+ SPI_Write(state);
NRF_CSN_on;
}
@@ -144,8 +115,8 @@ void NRF24L01_FlushRx()
void NRF24L01_Activate(uint8_t code)
{
NRF_CSN_off;
- nrf_spi_write(ACTIVATE);
- nrf_spi_write(code);
+ SPI_Write(ACTIVATE);
+ SPI_Write(code);
NRF_CSN_on;
}
@@ -189,25 +160,29 @@ void NRF24L01_SetPower()
if(IS_RANGE_FLAG_on)
power=NRF_POWER_0;
rf_setup = (rf_setup & 0xF9) | (power << 1);
- NRF24L01_WriteReg(NRF24L01_06_RF_SETUP, rf_setup);
+ if(prev_power != power)
+ {
+ NRF24L01_WriteReg(NRF24L01_06_RF_SETUP, rf_setup);
+ prev_power=power;
+ }
}
void NRF24L01_SetTxRxMode(enum TXRX_State mode)
{
if(mode == TX_EN) {
- NRF_CSN_off;
+ NRF_CE_off;
NRF24L01_WriteReg(NRF24L01_07_STATUS, (1 << NRF24L01_07_RX_DR) //reset the flag(s)
| (1 << NRF24L01_07_TX_DS)
| (1 << NRF24L01_07_MAX_RT));
NRF24L01_WriteReg(NRF24L01_00_CONFIG, (1 << NRF24L01_00_EN_CRC) // switch to TX mode
| (1 << NRF24L01_00_CRCO)
| (1 << NRF24L01_00_PWR_UP));
- _delay_us(130);
- NRF_CSN_on;
+ delayMicroseconds(130);
+ NRF_CE_on;
}
else
if (mode == RX_EN) {
- NRF_CSN_off;
+ NRF_CE_off;
NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // reset the flag(s)
NRF24L01_WriteReg(NRF24L01_00_CONFIG, 0x0F); // switch to RX mode
NRF24L01_WriteReg(NRF24L01_07_STATUS, (1 << NRF24L01_07_RX_DR) //reset the flag(s)
@@ -217,13 +192,13 @@ void NRF24L01_SetTxRxMode(enum TXRX_State mode)
| (1 << NRF24L01_00_CRCO)
| (1 << NRF24L01_00_PWR_UP)
| (1 << NRF24L01_00_PRIM_RX));
- _delay_us(130);
- NRF_CSN_on;
+ delayMicroseconds(130);
+ NRF_CE_on;
}
else
{
NRF24L01_WriteReg(NRF24L01_00_CONFIG, (1 << NRF24L01_00_EN_CRC)); //PowerDown
- NRF_CSN_off;
+ NRF_CE_off;
}
}
@@ -239,25 +214,31 @@ void NRF24L01_Reset()
NRF24L01_FlushTx();
NRF24L01_FlushRx();
NRF24L01_Strobe(0xff); // NOP
- NRF24L01_ReadReg(0x07);
+ NRF24L01_ReadReg(NRF24L01_07_STATUS);
NRF24L01_SetTxRxMode(TXRX_OFF);
- _delay_us(100);
+ delayMicroseconds(100);
}
uint8_t NRF24L01_packet_ack()
{
- switch (NRF24L01_ReadReg(NRF24L01_07_STATUS) & (BV(NRF24L01_07_TX_DS) | BV(NRF24L01_07_MAX_RT))) {
- case BV(NRF24L01_07_TX_DS):
+ switch (NRF24L01_ReadReg(NRF24L01_07_STATUS) & (_BV(NRF24L01_07_TX_DS) | _BV(NRF24L01_07_MAX_RT)))
+ {
+ case _BV(NRF24L01_07_TX_DS):
return PKT_ACKED;
- case BV(NRF24L01_07_MAX_RT):
+ case _BV(NRF24L01_07_MAX_RT):
return PKT_TIMEOUT;
}
return PKT_PENDING;
}
+
///////////////
// XN297 emulation layer
+<<<<<<< HEAD
uint8_t xn297_scramble_enabled;
+=======
+uint8_t xn297_scramble_enabled=XN297_SCRAMBLED; //enabled by default
+>>>>>>> refs/remotes/pascallanger/master
uint8_t xn297_addr_len;
uint8_t xn297_tx_addr[5];
uint8_t xn297_rx_addr[5];
@@ -270,6 +251,7 @@ static const uint8_t xn297_scramble[] = {
0x1b, 0x5d, 0x19, 0x10, 0x24, 0xd3, 0xdc, 0x3f,
0x8e, 0xc5, 0x2f};
+<<<<<<< HEAD
const uint16_t PROGMEM xn297_crc_xorout[] = {
0x0000, 0x3d5f, 0xa6f1, 0x3a23, 0xaa16, 0x1caf,
0x62b2, 0xe0eb, 0x0821, 0xbe07, 0x5f1a, 0xaf15,
@@ -277,6 +259,8 @@ const uint16_t PROGMEM xn297_crc_xorout[] = {
0x1852, 0xdf36, 0x129d, 0xb17c, 0xd5f5, 0x70d7,
0xb798, 0x5133, 0x67db, 0xd94e};
+=======
+>>>>>>> refs/remotes/pascallanger/master
const uint16_t PROGMEM xn297_crc_xorout_scrambled[] = {
0x0000, 0x3448, 0x9BA7, 0x8BBB, 0x85E1, 0x3E8C,
0x451E, 0x18E6, 0x6B24, 0xE7AB, 0x3828, 0x814B,
@@ -284,6 +268,13 @@ const uint16_t PROGMEM xn297_crc_xorout_scrambled[] = {
0x8B17, 0x2920, 0x8B5F, 0x61B1, 0xD391, 0x7401,
0x2138, 0x129F, 0xB3A0, 0x2988};
+const uint16_t PROGMEM xn297_crc_xorout[] = {
+ 0x0000, 0x3d5f, 0xa6f1, 0x3a23, 0xaa16, 0x1caf,
+ 0x62b2, 0xe0eb, 0x0821, 0xbe07, 0x5f1a, 0xaf15,
+ 0x4f0a, 0xad24, 0x5e48, 0xed34, 0x068c, 0xf2c9,
+ 0x1852, 0xdf36, 0x129d, 0xb17c, 0xd5f5, 0x70d7,
+ 0xb798, 0x5133, 0x67db, 0xd94e};
+
static uint8_t bit_reverse(uint8_t b_in)
{
uint8_t b_out = 0;
@@ -295,10 +286,9 @@ static uint8_t bit_reverse(uint8_t b_in)
return b_out;
}
+static const uint16_t polynomial = 0x1021;
static uint16_t crc16_update(uint16_t crc, uint8_t a)
{
- static const uint16_t polynomial = 0x1021;
-
crc ^= a << 8;
for (uint8_t i = 0; i < 8; ++i)
if (crc & 0x8000)
@@ -346,10 +336,21 @@ void XN297_SetRXAddr(const uint8_t* addr, uint8_t len)
void XN297_Configure(uint16_t flags)
{
+<<<<<<< HEAD
xn297_scramble_enabled = !(flags & BV(XN297_UNSCRAMBLED));
xn297_crc = !!(flags & BV(NRF24L01_00_EN_CRC));
flags &= ~(BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO));
NRF24L01_WriteReg(NRF24L01_00_CONFIG, flags & 0xFF);
+=======
+ xn297_crc = !!(flags & _BV(NRF24L01_00_EN_CRC));
+ flags &= ~(_BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO));
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, flags & 0xFF);
+}
+
+void XN297_SetScrambledMode(const u8 mode)
+{
+ xn297_scramble_enabled = mode;
+>>>>>>> refs/remotes/pascallanger/master
}
void XN297_WritePayload(uint8_t* msg, uint8_t len)
@@ -411,6 +412,7 @@ void XN297_ReadPayload(uint8_t* msg, uint8_t len)
// End of XN297 emulation
///////////////
+<<<<<<< HEAD
// LT8910 emulation layer
uint8_t LT8910_buffer[64];
uint8_t LT8910_buffer_start;
@@ -435,23 +437,62 @@ void LT8910_Config(uint8_t preamble_len, uint8_t trailer_len, uint8_t flags, uin
LT8910_Preamble_Len=preamble_len;
//Trailer 4 to 18 bits
LT8910_Tailer_Len=trailer_len;
+=======
+// LT8900 emulation layer
+uint8_t LT8900_buffer[64];
+uint8_t LT8900_buffer_start;
+uint16_t LT8900_buffer_overhead_bits;
+uint8_t LT8900_addr[8];
+uint8_t LT8900_addr_size;
+uint8_t LT8900_Preamble_Len;
+uint8_t LT8900_Tailer_Len;
+uint8_t LT8900_CRC_Initial_Data;
+uint8_t LT8900_Flags;
+#define LT8900_CRC_ON 6
+#define LT8900_SCRAMBLE_ON 5
+#define LT8900_PACKET_LENGTH_EN 4
+#define LT8900_DATA_PACKET_TYPE_1 3
+#define LT8900_DATA_PACKET_TYPE_0 2
+#define LT8900_FEC_TYPE_1 1
+#define LT8900_FEC_TYPE_0 0
+
+void LT8900_Config(uint8_t preamble_len, uint8_t trailer_len, uint8_t flags, uint8_t crc_init)
+{
+ //Preamble 1 to 8 bytes
+ LT8900_Preamble_Len=preamble_len;
+ //Trailer 4 to 18 bits
+ LT8900_Tailer_Len=trailer_len;
+>>>>>>> refs/remotes/pascallanger/master
//Flags
// CRC_ON: 1 on, 0 off
// SCRAMBLE_ON: 1 on, 0 off
// PACKET_LENGTH_EN: 1 1st byte of payload is payload size
// DATA_PACKET_TYPE: 00 NRZ, 01 Manchester, 10 8bit/10bit line code, 11 interleave data type
// FEC_TYPE: 00 No FEC, 01 FEC13, 10 FEC23, 11 reserved
+<<<<<<< HEAD
LT8910_Flags=flags;
//CRC init constant
LT8910_CRC_Initial_Data=crc_init;
}
void LT8910_SetChannel(uint8_t channel)
+=======
+ LT8900_Flags=flags;
+ //CRC init constant
+ LT8900_CRC_Initial_Data=crc_init;
+}
+
+void LT8900_SetChannel(uint8_t channel)
+>>>>>>> refs/remotes/pascallanger/master
{
NRF24L01_WriteReg(NRF24L01_05_RF_CH, channel +2); //NRF24L01 is 2400+channel but LT8900 is 2402+channel
}
+<<<<<<< HEAD
void LT8910_SetTxRxMode(enum TXRX_State mode)
+=======
+void LT8900_SetTxRxMode(enum TXRX_State mode)
+>>>>>>> refs/remotes/pascallanger/master
{
if(mode == TX_EN)
{
@@ -477,12 +518,17 @@ void LT8910_SetTxRxMode(enum TXRX_State mode)
NRF24L01_SetTxRxMode(TXRX_OFF);
}
+<<<<<<< HEAD
void LT8910_BuildOverhead()
+=======
+void LT8900_BuildOverhead()
+>>>>>>> refs/remotes/pascallanger/master
{
uint8_t pos;
//Build overhead
//preamble
+<<<<<<< HEAD
memset(LT8910_buffer,LT8910_addr[0]&0x01?0xAA:0x55,LT8910_Preamble_Len-1);
pos=LT8910_Preamble_Len-1;
//address
@@ -500,10 +546,30 @@ void LT8910_BuildOverhead()
}
void LT8910_SetAddress(uint8_t *address,uint8_t addr_size)
+=======
+ memset(LT8900_buffer,LT8900_addr[0]&0x01?0xAA:0x55,LT8900_Preamble_Len-1);
+ pos=LT8900_Preamble_Len-1;
+ //address
+ for(uint8_t i=0;i5?5:pos;
+}
+
+void LT8900_SetAddress(uint8_t *address,uint8_t addr_size)
+>>>>>>> refs/remotes/pascallanger/master
{
uint8_t addr[5];
//Address size (SyncWord) 2 to 8 bytes, 16/32/48/64 bits
+<<<<<<< HEAD
LT8910_addr_size=addr_size;
memcpy(LT8910_addr,address,LT8910_addr_size);
@@ -524,14 +590,44 @@ uint8_t LT8910_ReadPayload(uint8_t* msg, uint8_t len)
unsigned int crc=LT8910_CRC_Initial_Data,a;
pos=LT8910_buffer_overhead_bits/8-LT8910_buffer_start;
end=pos+len+(LT8910_Flags&_BV(LT8910_PACKET_LENGTH_EN)?1:0)+(LT8910_Flags&_BV(LT8910_CRC_ON)?2:0);
+=======
+ LT8900_addr_size=addr_size;
+ for (uint8_t i = 0; i < addr_size; i++)
+ LT8900_addr[i] = address[addr_size-1-i];
+
+ //Build overhead
+ LT8900_BuildOverhead();
+
+ //Set NRF RX&TX address based on overhead content
+ NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, LT8900_buffer_start-2);
+ for(uint8_t i=0;i>>>>>> refs/remotes/pascallanger/master
//Read payload
NRF24L01_ReadPayload(buffer,end+1);
//Check address + trail
for(i=0;i>>>>>> refs/remotes/pascallanger/master
for(i=pos;i>8)&0xFF;
}
//Check len
+<<<<<<< HEAD
if(LT8910_Flags&_BV(LT8910_PACKET_LENGTH_EN))
+=======
+ if(LT8900_Flags&_BV(LT8900_PACKET_LENGTH_EN))
+>>>>>>> refs/remotes/pascallanger/master
{
crc=crc16_update(crc,buffer[pos]);
if(bit_reverse(len)!=buffer[pos++])
@@ -552,7 +652,11 @@ uint8_t LT8910_ReadPayload(uint8_t* msg, uint8_t len)
msg[i]=bit_reverse(buffer[pos++]);
}
//Check CRC
+<<<<<<< HEAD
if(LT8910_Flags&_BV(LT8910_CRC_ON))
+=======
+ if(LT8900_Flags&_BV(LT8900_CRC_ON))
+>>>>>>> refs/remotes/pascallanger/master
{
if(buffer[pos++]!=((crc>>8)&0xFF)) return 0; // wrong CRC...
if(buffer[pos]!=(crc&0xFF)) return 0; // wrong CRC...
@@ -561,12 +665,21 @@ uint8_t LT8910_ReadPayload(uint8_t* msg, uint8_t len)
return 1;
}
+<<<<<<< HEAD
void LT8910_WritePayload(uint8_t* msg, uint8_t len)
{
unsigned int crc=LT8910_CRC_Initial_Data,a,mask;
uint8_t i, pos=0,tmp, buffer[64], pos_final,shift;
//Add packet len
if(LT8910_Flags&_BV(LT8910_PACKET_LENGTH_EN))
+=======
+void LT8900_WritePayload(uint8_t* msg, uint8_t len)
+{
+ unsigned int crc=LT8900_CRC_Initial_Data,a,mask;
+ uint8_t i, pos=0,tmp, buffer[64], pos_final,shift;
+ //Add packet len
+ if(LT8900_Flags&_BV(LT8900_PACKET_LENGTH_EN))
+>>>>>>> refs/remotes/pascallanger/master
{
tmp=bit_reverse(len);
buffer[pos++]=tmp;
@@ -580,12 +693,17 @@ void LT8910_WritePayload(uint8_t* msg, uint8_t len)
crc=crc16_update(crc,tmp);
}
//Add CRC
+<<<<<<< HEAD
if(LT8910_Flags&_BV(LT8910_CRC_ON))
+=======
+ if(LT8900_Flags&_BV(LT8900_CRC_ON))
+>>>>>>> refs/remotes/pascallanger/master
{
buffer[pos++]=crc>>8;
buffer[pos++]=crc;
}
//Shift everything to fit behind the trailer (4 to 18 bits)
+<<<<<<< HEAD
shift=LT8910_buffer_overhead_bits&0x7;
pos_final=LT8910_buffer_overhead_bits/8;
mask=~(0xFF<<(8-shift));
@@ -595,10 +713,27 @@ void LT8910_WritePayload(uint8_t* msg, uint8_t len)
a=buffer[i]<<(8-shift);
LT8910_buffer[pos_final+i]=(LT8910_buffer[pos_final+i]&mask>>8)|a>>8;
LT8910_buffer[pos_final+i+1]=(LT8910_buffer[pos_final+i+1]&mask)|a;
+=======
+ shift=LT8900_buffer_overhead_bits&0x7;
+ pos_final=LT8900_buffer_overhead_bits/8;
+ mask=~(0xFF<<(8-shift));
+ LT8900_buffer[pos_final+pos]=0xFF;
+ for(i=pos-1;i!=0xFF;i--)
+ {
+ a=buffer[i]<<(8-shift);
+ LT8900_buffer[pos_final+i]=(LT8900_buffer[pos_final+i]&mask>>8)|a>>8;
+ LT8900_buffer[pos_final+i+1]=(LT8900_buffer[pos_final+i+1]&mask)|a;
+>>>>>>> refs/remotes/pascallanger/master
}
if(shift)
pos++;
//Send everything
+<<<<<<< HEAD
NRF24L01_WritePayload(LT8910_buffer+LT8910_buffer_start,pos_final+pos-LT8910_buffer_start);
}
// End of LT8910 emulation
+=======
+ NRF24L01_WritePayload(LT8900_buffer+LT8900_buffer_start,pos_final+pos-LT8900_buffer_start);
+}
+// End of LT8900 emulation
+>>>>>>> refs/remotes/pascallanger/master
diff --git a/Multiprotocol/Pins.h b/Multiprotocol/Pins.h
new file mode 100644
index 0000000..463d395
--- /dev/null
+++ b/Multiprotocol/Pins.h
@@ -0,0 +1,209 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+//*******************
+//*** Pinouts ***
+//*******************
+
+// TX
+#define SERIAL_TX_pin 1 //PD1
+#define SERIAL_TX_port PORTD
+#define SERIAL_TX_ddr DDRD
+#define SERIAL_TX_output SERIAL_TX_ddr |= _BV(SERIAL_TX_pin)
+#define SERIAL_TX_on SERIAL_TX_port |= _BV(SERIAL_TX_pin)
+#define SERIAL_TX_off SERIAL_TX_port &= ~_BV(SERIAL_TX_pin)
+#ifdef DEBUG_TX
+ #define DEBUG_TX_on SERIAL_TX_ON
+ #define DEBUG_TX_off SERIAL_TX_OFF
+ #define DEBUG_TX_toggle SERIAL_TX_port ^= _BV(SERIAL_TX_pin)
+#else
+ #define DEBUG_TX_on
+ #define DEBUG_TX_off
+ #define DEBUG_TX_toggle
+#endif
+
+// Dial
+#define MODE_DIAL1_pin 2
+#define MODE_DIAL1_port PORTB
+#define MODE_DIAL1_ipr PINB
+#define MODE_DIAL2_pin 3
+#define MODE_DIAL2_port PORTB
+#define MODE_DIAL2_ipr PINB
+#define MODE_DIAL3_pin 4
+#define MODE_DIAL3_port PORTB
+#define MODE_DIAL3_ipr PINB
+#define MODE_DIAL4_pin 0
+#define MODE_DIAL4_port PORTC
+#define MODE_DIAL4_ipr PINC
+
+// PPM
+#define PPM_pin 3 //D3 = PD3
+#define PPM_port PORTD
+
+// SDIO
+#define SDI_pin 5 //D5 = PD5
+#define SDI_port PORTD
+#define SDI_ipr PIND
+#define SDI_ddr DDRD
+#ifdef XMEGA
+ #define SDI_on SDI_port.OUTSET = _BV(SDI_pin)
+ #define SDI_off SDI_port.OUTCLR = _BV(SDI_pin)
+#else
+ #define SDI_on SDI_port |= _BV(SDI_pin)
+ #define SDI_off SDI_port &= ~_BV(SDI_pin)
+ #define SDI_1 (SDI_ipr & _BV(SDI_pin))
+ #define SDI_0 (SDI_ipr & _BV(SDI_pin)) == 0x00
+#endif
+#define SDI_input SDI_ddr &= ~_BV(SDI_pin)
+#define SDI_output SDI_ddr |= _BV(SDI_pin)
+
+//SDO
+#define SDO_pin 6 //D6 = PD6
+#define SDO_port PORTD
+#define SDO_ipr PIND
+#ifdef XMEGA
+ #define SDO_1 (SDO_port.IN & _BV(SDO_pin))
+ #define SDO_0 (SDO_port.IN & _BV(SDO_pin)) == 0x00
+#else
+ #define SDO_1 (SDO_ipr & _BV(SDO_pin))
+ #define SDO_0 (SDO_ipr & _BV(SDO_pin)) == 0x00
+#endif
+
+// SCLK
+#define SCLK_port PORTD
+#define SCLK_ddr DDRD
+#ifdef XMEGA
+ #define SCLK_pin 7 //PD7
+ #define SCLK_on SCLK_port.OUTSET = _BV(SCLK_pin)
+ #define SCLK_off SCLK_port.OUTCLR = _BV(SCLK_pin)
+#else
+ #define SCLK_pin 4 //D4 = PD4
+ #define SCLK_output SCLK_ddr |= _BV(SCLK_pin)
+ #define SCLK_on SCLK_port |= _BV(SCLK_pin)
+ #define SCLK_off SCLK_port &= ~_BV(SCLK_pin)
+#endif
+
+// A7105
+#define A7105_CSN_pin 2 //D2 = PD2
+#define A7105_CSN_port PORTD
+#define A7105_CSN_ddr DDRD
+#define A7105_CSN_output A7105_CSN_ddr |= _BV(A7105_CSN_pin)
+#define A7105_CSN_on A7105_CSN_port |= _BV(A7105_CSN_pin)
+#define A7105_CSN_off A7105_CSN_port &= ~_BV(A7105_CSN_pin)
+
+// CC2500
+#define CC25_CSN_pin 7 //D7 = PD7
+#define CC25_CSN_port PORTD
+#define CC25_CSN_ddr DDRD
+#define CC25_CSN_output CC25_CSN_ddr |= _BV(CC25_CSN_pin)
+#define CC25_CSN_on CC25_CSN_port |= _BV(CC25_CSN_pin)
+#define CC25_CSN_off CC25_CSN_port &= ~_BV(CC25_CSN_pin)
+
+// NRF24L01
+#define NRF_CSN_pin 0 //D8 = PB0
+#define NRF_CSN_port PORTB
+#define NRF_CSN_ddr DDRB
+#define NRF_CSN_output NRF_CSN_ddr |= _BV(NRF_CSN_pin)
+#define NRF_CSN_on NRF_CSN_port |= _BV(NRF_CSN_pin)
+#define NRF_CSN_off NRF_CSN_port &= ~_BV(NRF_CSN_pin)
+#define NRF_CE_on
+#define NRF_CE_off
+
+// CYRF6936
+#ifdef XMEGA
+ #define CYRF_CSN_pin 4 //PD4
+ #define CYRF_CSN_port PORTD
+ #define CYRF_CSN_ddr DDRD
+ #define CYRF_CSN_on CYRF_CSN_port.OUTSET = _BV(CYRF_CSN_pin)
+ #define CYRF_CSN_off CYRF_CSN_port.OUTCLR = _BV(CYRF_CSN_pin)
+
+ #define CYRF_RST_pin 0 //PE0
+ #define CYRF_RST_port PORTE
+ #define CYRF_RST_ddr DDRE
+ #define CYRF_RST_HI CYRF_RST_port.OUTSET = _BV(CYRF_RST_pin)
+ #define CYRF_RST_LO CYRF_RST_port.OUTCLR = _BV(CYRF_RST_pin)
+#else
+ #define CYRF_CSN_pin 1 //D9 = PB1
+ #define CYRF_CSN_port PORTB
+ #define CYRF_CSN_ddr DDRB
+ #define CYRF_CSN_output CYRF_CSN_ddr |= _BV(CYRF_CSN_pin)
+ #define CYRF_CSN_on CYRF_CSN_port |= _BV(CYRF_CSN_pin)
+ #define CYRF_CSN_off CYRF_CSN_port &= ~_BV(CYRF_CSN_pin)
+
+ #define CYRF_RST_pin 5 //A5 = PC5
+ #define CYRF_RST_port PORTC
+ #define CYRF_RST_ddr DDRC
+ #define CYRF_RST_output CYRF_RST_ddr |= _BV(CYRF_RST_pin)
+ #define CYRF_RST_HI CYRF_RST_port |= _BV(CYRF_RST_pin)
+ #define CYRF_RST_LO CYRF_RST_port &= ~_BV(CYRF_RST_pin)
+#endif
+
+//RF Switch
+#ifdef XMEGA
+ #define PE1_on
+ #define PE1_off
+ #define PE2_on
+ #define PE2_off
+#else
+ #define PE1_pin 1 //A1 = PC1
+ #define PE1_port PORTC
+ #define PE1_ddr DDRC
+ #define PE1_output PE1_ddr |= _BV(PE1_pin)
+ #define PE1_on PE1_port |= _BV(PE1_pin)
+ #define PE1_off PE1_port &= ~_BV(PE1_pin)
+
+ #define PE2_pin 2 //A2 = PC2
+ #define PE2_port PORTC
+ #define PE2_ddr DDRC
+ #define PE2_output PE2_ddr |= _BV(PE2_pin)
+ #define PE2_on PE2_port |= _BV(PE2_pin)
+ #define PE2_off PE2_port &= ~_BV(PE2_pin)
+#endif
+
+// LED
+#ifdef XMEGA
+ #define LED_pin 1 //PD1
+ #define LED_port PORTD
+ #define LED_ddr DDRD
+ #define LED_on LED_port.OUTCLR = _BV(LED_pin)
+ #define LED_off LED_port.OUTSET = _BV(LED_pin)
+ #define LED_toggle LED_port.OUTTGL = _BV(LED_pin)
+ #define LED_output LED_port.DIRSET = _BV(LED_pin)
+ #define IS_LED_on (LED_port.OUT & _BV(LED_pin))
+#else
+ #define LED_pin 5 //D13 = PB5
+ #define LED_port PORTB
+ #define LED_ddr DDRB
+ #define LED_on LED_port |= _BV(LED_pin)
+ #define LED_off LED_port &= ~_BV(LED_pin)
+ #define LED_toggle LED_port ^= _BV(LED_pin)
+ #define LED_output LED_ddr |= _BV(LED_pin)
+ #define IS_LED_on (LED_port & _BV(LED_pin))
+#endif
+
+//BIND
+#ifdef XMEGA
+ #define BIND_pin 2 //PD2
+ #define BIND_port PORTD
+ #define IS_BIND_BUTTON_on ( (BIND_port.IN & _BV(BIND_pin)) == 0x00 )
+#else
+ #define BIND_pin 5 //D13 = PB5
+ #define BIND_port PORTB
+ #define BIND_ipr PINB
+ #define BIND_ddr DDRB
+ #define BIND_SET_INPUT BIND_ddr &= ~_BV(BIND_pin)
+ #define BIND_SET_OUTPUT BIND_ddr |= _BV(BIND_pin)
+ #define BIND_SET_PULLUP BIND_port |= _BV(BIND_pin)
+ #define IS_BIND_BUTTON_on ( (BIND_ipr & _BV(BIND_pin)) == 0x00 )
+#endif
diff --git a/Multiprotocol/SFHSS_cc2500.ino b/Multiprotocol/SFHSS_cc2500.ino
new file mode 100644
index 0000000..00ef2fe
--- /dev/null
+++ b/Multiprotocol/SFHSS_cc2500.ino
@@ -0,0 +1,247 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+// Last sync with main deviation/sfhss_cc2500.c dated 2016-03-23
+
+#if defined(SFHSS_CC2500_INO)
+
+#include "iface_cc2500.h"
+
+#define SFHSS_COARSE 0
+
+#define SFHSS_PACKET_LEN 13
+#define SFHSS_TX_ID_LEN 2
+
+uint8_t fhss_code; // 0-27
+
+enum {
+ SFHSS_START = 0x00,
+ SFHSS_CAL = 0x01,
+ SFHSS_DATA1 = 0x02, // do not change this value
+ SFHSS_DATA2 = 0x0B, // do not change this value
+ SFHSS_TUNE = 0x0F
+};
+
+#define SFHSS_FREQ0_VAL 0xC4
+
+// Some important initialization parameters, all others are either default,
+// or not important in the context of transmitter
+// IOCFG2 2F - GDO2_INV=0 GDO2_CFG=2F - HW0
+// IOCFG1 2E - GDO1_INV=0 GDO1_CFG=2E - High Impedance
+// IOCFG0 2F - GDO0 same as GDO2, TEMP_SENSOR_ENABLE=off
+// FIFOTHR 07 - 33 decimal TX threshold
+// SYNC1 D3
+// SYNC0 91
+// PKTLEN 0D - Packet length, 0D bytes
+// PKTCTRL1 04 - APPEND_STATUS on, all other are receive parameters - irrelevant
+// PKTCTRL0 0C - No whitening, use FIFO, CC2400 compatibility on, use CRC, fixed packet length
+// ADDR 29
+// CHANNR 10
+// FSCTRL1 06 - IF 152343.75Hz, see page 65
+// FSCTRL0 00 - zero freq offset
+// FREQ2 5C - synthesizer frequency 2399999633Hz for 26MHz crystal, ibid
+// FREQ1 4E
+// FREQ0 C4
+// MDMCFG4 7C - CHANBW_E - 01, CHANBW_M - 03, DRATE_E - 0C. Filter bandwidth = 232142Hz
+// MDMCFG3 43 - DRATE_M - 43. Data rate = 128143bps
+// MDMCFG2 83 - disable DC blocking, 2-FSK, no Manchester code, 15/16 sync bits detected (irrelevant for TX)
+// MDMCFG1 23 - no FEC, 4 preamble bytes, CHANSPC_E - 03
+// MDMCFG0 3B - CHANSPC_M - 3B. Channel spacing = 249938Hz (each 6th channel used, resulting in spacing of 1499628Hz)
+// DEVIATN 44 - DEVIATION_E - 04, DEVIATION_M - 04. Deviation = 38085.9Hz
+// MCSM2 07 - receive parameters, default, irrelevant
+// MCSM1 0C - no CCA (transmit always), when packet received stay in RX, when sent go to IDLE
+// MCSM0 08 - no autocalibration, PO_TIMEOUT - 64, no pin radio control, no forcing XTAL to stay in SLEEP
+// FOCCFG 1D - not interesting, Frequency Offset Compensation
+// FREND0 10 - PA_POWER = 0
+const PROGMEM uint8_t SFHSS_init_values[] = {
+ /* 00 */ 0x2F, 0x2E, 0x2F, 0x07, 0xD3, 0x91, 0x0D, 0x04,
+ /* 08 */ 0x0C, 0x29, 0x10, 0x06, 0x00, 0x5C, 0x4E, SFHSS_FREQ0_VAL + SFHSS_COARSE,
+ /* 10 */ 0x7C, 0x43, 0x83, 0x23, 0x3B, 0x44, 0x07, 0x0C,
+ /* 18 */ 0x08, 0x1D, 0x1C, 0x43, 0x40, 0x91, 0x57, 0x6B,
+ /* 20 */ 0xF8, 0xB6, 0x10, 0xEA, 0x0A, 0x11, 0x11
+};
+
+static void __attribute__((unused)) SFHSS_rf_init()
+{
+ CC2500_Strobe(CC2500_SIDLE);
+
+ for (uint8_t i = 0; i < 39; ++i)
+ CC2500_WriteReg(i, pgm_read_byte_near(&SFHSS_init_values[i]));
+
+ prev_option = option;
+ CC2500_WriteReg(CC2500_0C_FSCTRL0, option);
+
+ CC2500_SetTxRxMode(TX_EN);
+ CC2500_SetPower();
+}
+
+static void __attribute__((unused)) SFHSS_tune_chan()
+{
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, rf_ch_num*6+16);
+ CC2500_Strobe(CC2500_SCAL);
+}
+
+static void __attribute__((unused)) SFHSS_tune_chan_fast()
+{
+ CC2500_Strobe(CC2500_SIDLE);
+ CC2500_WriteReg(CC2500_0A_CHANNR, rf_ch_num*6+16);
+ CC2500_WriteReg(CC2500_25_FSCAL1, calData[rf_ch_num]);
+}
+
+static void __attribute__((unused)) SFHSS_tune_freq()
+{
+ if ( prev_option != option )
+ {
+ CC2500_WriteReg(CC2500_0C_FSCTRL0, option);
+ CC2500_WriteReg(CC2500_0F_FREQ0, SFHSS_FREQ0_VAL + SFHSS_COARSE);
+ prev_option = option ;
+ phase = SFHSS_START; // Restart the tune process if option is changed to get good tuned values
+ }
+}
+
+static void __attribute__((unused)) SFHSS_calc_next_chan()
+{
+ rf_ch_num += fhss_code + 2;
+ if (rf_ch_num > 29)
+ {
+ if (rf_ch_num < 31)
+ rf_ch_num += fhss_code + 2;
+ rf_ch_num -= 31;
+ }
+}
+
+// Channel values are 10-bit values between 86 and 906, 496 is the middle.
+// Values grow down and to the right, so we just revert every channel.
+static uint16_t __attribute__((unused)) SFHSS_convert_channel(uint8_t num)
+{
+ return (uint16_t) (map(limit_channel_100(num),servo_min_100,servo_max_100,906,86));
+}
+
+static void __attribute__((unused)) SFHSS_build_data_packet()
+{
+#define spacer1 0x02 //0b10
+#define spacer2 (spacer1 << 4)
+ uint8_t ch_offset = phase == SFHSS_DATA1 ? 0 : 4;
+ uint16_t ch1 = SFHSS_convert_channel(CH_AETR[ch_offset+0]);
+ uint16_t ch2 = SFHSS_convert_channel(CH_AETR[ch_offset+1]);
+ uint16_t ch3 = SFHSS_convert_channel(CH_AETR[ch_offset+2]);
+ uint16_t ch4 = SFHSS_convert_channel(CH_AETR[ch_offset+3]);
+
+ packet[0] = 0x81; // can be 80 or 81 for Orange, only 81 for XK
+ packet[1] = rx_tx_addr[0];
+ packet[2] = rx_tx_addr[1];
+ packet[3] = 0;
+ packet[4] = 0;
+ packet[5] = (rf_ch_num << 3) | spacer1 | ((ch1 >> 9) & 0x01);
+ packet[6] = (ch1 >> 1);
+ packet[7] = (ch1 << 7) | spacer2 | ((ch2 >> 5) & 0x1F /*0b11111*/);
+ packet[8] = (ch2 << 3) | spacer1 | ((ch3 >> 9) & 0x01);
+ packet[9] = (ch3 >> 1);
+ packet[10] = (ch3 << 7) | spacer2 | ((ch4 >> 5) & 0x1F /*0b11111*/);
+ packet[11] = (ch4 << 3) | ((fhss_code >> 2) & 0x07 /*0b111 */);
+ packet[12] = (fhss_code << 6) | phase;
+}
+
+static void __attribute__((unused)) SFHSS_send_packet()
+{
+ CC2500_WriteData(packet, SFHSS_PACKET_LEN);
+}
+
+uint16_t ReadSFHSS()
+{
+ switch(phase)
+ {
+ case SFHSS_START:
+ rf_ch_num = 0;
+ SFHSS_tune_chan();
+ phase = SFHSS_CAL;
+ return 2000;
+ case SFHSS_CAL:
+ calData[rf_ch_num]=CC2500_ReadReg(CC2500_25_FSCAL1);
+ if (++rf_ch_num < 30)
+ SFHSS_tune_chan();
+ else
+ {
+ rf_ch_num = 0;
+ phase = SFHSS_DATA1;
+ }
+ return 2000;
+
+ /* Work cycle, 6.8ms, second packet 1.65ms after first */
+ case SFHSS_DATA1:
+ SFHSS_build_data_packet();
+ SFHSS_send_packet();
+ phase = SFHSS_DATA2;
+ return 1650;
+ case SFHSS_DATA2:
+ SFHSS_build_data_packet();
+ SFHSS_send_packet();
+ SFHSS_calc_next_chan();
+ phase = SFHSS_TUNE;
+ return 2000;
+ case SFHSS_TUNE:
+ phase = SFHSS_DATA1;
+ SFHSS_tune_freq();
+ SFHSS_tune_chan_fast();
+ CC2500_SetPower();
+ return 3150;
+ }
+ return 0;
+}
+
+// Generate internal id
+static void __attribute__((unused)) SFHSS_get_tx_id()
+{
+ uint32_t fixed_id;
+ // Some receivers (Orange) behaves better if they tuned to id that has
+ // no more than 6 consecutive zeros and ones
+ uint8_t run_count = 0;
+ // add guard for bit count
+ fixed_id = 1 ^ (MProtocol_id & 1);
+ for (uint8_t i = 0; i < 16; ++i)
+ {
+ fixed_id = (fixed_id << 1) | (MProtocol_id & 1);
+ MProtocol_id >>= 1;
+ // If two LS bits are the same
+ if ((fixed_id & 3) == 0 || (fixed_id & 3) == 3)
+ {
+ if (++run_count > 6)
+ {
+ fixed_id ^= 1;
+ run_count = 0;
+ }
+ }
+ else
+ run_count = 0;
+ }
+ // fixed_id = 0xBC11;
+ rx_tx_addr[0] = fixed_id >> 8;
+ rx_tx_addr[1] = fixed_id;
+}
+
+uint16_t initSFHSS()
+{
+ BIND_DONE; // Not a TX bind protocol
+ SFHSS_get_tx_id();
+
+ fhss_code=rx_tx_addr[2]%28; // Initialize it to random 0-27 inclusive
+
+ SFHSS_rf_init();
+ phase = SFHSS_START;
+
+ return 10000;
+}
+
+#endif
\ No newline at end of file
diff --git a/Multiprotocol/SHENQI_nrf24l01.ino b/Multiprotocol/SHENQI_nrf24l01.ino
index 18d5037..b8ab94b 100644
--- a/Multiprotocol/SHENQI_nrf24l01.ino
+++ b/Multiprotocol/SHENQI_nrf24l01.ino
@@ -1,3 +1,21 @@
+<<<<<<< HEAD
+=======
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+
+>>>>>>> refs/remotes/pascallanger/master
#if defined(SHENQI_NRF24L01_INO)
#include "iface_nrf24l01.h"
@@ -24,10 +42,17 @@ void SHENQI_init()
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5 bytes rx/tx address
+<<<<<<< HEAD
LT8910_Config(4, 8, _BV(LT8910_CRC_ON)|_BV(LT8910_PACKET_LENGTH_EN), 0xAA);
LT8910_SetChannel(2);
LT8910_SetAddress((uint8_t *)"\x9A\x9A\x9A\x9A",4);
LT8910_SetTxRxMode(RX_EN);
+=======
+ LT8900_Config(4, 8, _BV(LT8900_CRC_ON)|_BV(LT8900_PACKET_LENGTH_EN), 0xAA);
+ LT8900_SetChannel(2);
+ LT8900_SetAddress((uint8_t *)"\x9A\x9A\x9A\x9A",4);
+ LT8900_SetTxRxMode(RX_EN);
+>>>>>>> refs/remotes/pascallanger/master
}
void SHENQI_send_packet()
@@ -36,6 +61,7 @@ void SHENQI_send_packet()
if(packet_count==0)
{
uint8_t bind_addr[4];
+<<<<<<< HEAD
bind_addr[0]=0x9A;
bind_addr[1]=0x9A;
bind_addr[2]=rx_tx_addr[2];
@@ -44,24 +70,48 @@ void SHENQI_send_packet()
LT8910_SetChannel(2);
packet[1]=rx_tx_addr[1];
packet[2]=rx_tx_addr[0];
+=======
+ bind_addr[0]=rx_tx_addr[0];
+ bind_addr[1]=rx_tx_addr[1];
+ bind_addr[2]=0x9A;
+ bind_addr[3]=0x9A;
+ LT8900_SetAddress(bind_addr,4);
+ LT8900_SetChannel(2);
+ packet[1]=rx_tx_addr[2];
+ packet[2]=rx_tx_addr[3];
+>>>>>>> refs/remotes/pascallanger/master
packet_period=2508;
}
else
{
+<<<<<<< HEAD
LT8910_SetAddress(rx_tx_addr,4);
packet[1]=255-convert_channel_8b(RUDDER);
packet[2]=255-convert_channel_8b_scale(THROTTLE,0x60,0xA0);
uint8_t freq=pgm_read_byte_near(&SHENQI_Freq[hopping_frequency_no])+(rx_tx_addr[1]&0x0F);
LT8910_SetChannel(freq);
+=======
+ LT8900_SetAddress(rx_tx_addr,4);
+ packet[1]=255-convert_channel_8b(RUDDER);
+ packet[2]=255-convert_channel_8b_scale(THROTTLE,0x60,0xA0);
+ uint8_t freq=pgm_read_byte_near(&SHENQI_Freq[hopping_frequency_no])+(rx_tx_addr[2]&0x0F);
+ LT8900_SetChannel(freq);
+>>>>>>> refs/remotes/pascallanger/master
hopping_frequency_no++;
if(hopping_frequency_no==60)
hopping_frequency_no=0;
packet_period=1750;
}
// Send packet + 1 retransmit - not sure why but needed (not present on original TX...)
+<<<<<<< HEAD
LT8910_WritePayload(packet,3);
while(NRF24L01_packet_ack()!=PKT_ACKED);
LT8910_WritePayload(packet,3);
+=======
+ LT8900_WritePayload(packet,3);
+ while(NRF24L01_packet_ack()!=PKT_ACKED);
+ LT8900_WritePayload(packet,3);
+>>>>>>> refs/remotes/pascallanger/master
packet_count++;
if(packet_count==7)
@@ -79,6 +129,7 @@ uint16_t SHENQI_callback()
SHENQI_send_packet();
else
{
+<<<<<<< HEAD
if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & BV(NRF24L01_07_RX_DR))
{
if(LT8910_ReadPayload(packet, 3))
@@ -87,6 +138,16 @@ uint16_t SHENQI_callback()
rx_tx_addr[3]=packet[1];
rx_tx_addr[2]=packet[2];
LT8910_SetTxRxMode(TX_EN);
+=======
+ if( NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_RX_DR))
+ {
+ if(LT8900_ReadPayload(packet, 3))
+ {
+ BIND_DONE;
+ rx_tx_addr[0]=packet[1];
+ rx_tx_addr[1]=packet[2];
+ LT8900_SetTxRxMode(TX_EN);
+>>>>>>> refs/remotes/pascallanger/master
packet_period=14000;
}
NRF24L01_FlushRx();
@@ -101,7 +162,11 @@ uint16_t initSHENQI()
SHENQI_init();
hopping_frequency_no = 0;
packet_count=0;
+<<<<<<< HEAD
packet_period=100;
+=======
+ packet_period=500;
+>>>>>>> refs/remotes/pascallanger/master
return 1000;
}
diff --git a/Multiprotocol/SLT_nrf24l01.ino b/Multiprotocol/SLT_nrf24l01.ino
index e97ae54..8d4e486 100644
--- a/Multiprotocol/SLT_nrf24l01.ino
+++ b/Multiprotocol/SLT_nrf24l01.ino
@@ -34,7 +34,7 @@ enum {
static void __attribute__((unused)) SLT_init()
{
NRF24L01_Initialize();
- NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO)); // 2-bytes CRC, radio off
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO)); // 2-bytes CRC, radio off
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknoledgement
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x01); // Enable data pipe 0
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x02); // 4-byte RX/TX address
@@ -93,7 +93,7 @@ static void __attribute__((unused)) SLT_set_tx_id(void)
static void __attribute__((unused)) SLT_wait_radio()
{
if (packet_sent)
- while (!(NRF24L01_ReadReg(NRF24L01_07_STATUS) & BV(NRF24L01_07_TX_DS))) ;
+ while (!(NRF24L01_ReadReg(NRF24L01_07_STATUS) & _BV(NRF24L01_07_TX_DS))) ;
packet_sent = 0;
}
@@ -101,7 +101,7 @@ static void __attribute__((unused)) SLT_send_data(uint8_t *data, uint8_t len)
{
SLT_wait_radio();
NRF24L01_FlushTx();
- NRF24L01_WriteReg(NRF24L01_07_STATUS, BV(NRF24L01_07_TX_DS) | BV(NRF24L01_07_RX_DR) | BV(NRF24L01_07_MAX_RT));
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, _BV(NRF24L01_07_TX_DS) | _BV(NRF24L01_07_RX_DR) | _BV(NRF24L01_07_MAX_RT));
NRF24L01_WritePayload(data, len);
//NRF24L01_PulseCE();
packet_sent = 1;
@@ -111,9 +111,8 @@ static void __attribute__((unused)) SLT_build_packet()
{
// aileron, elevator, throttle, rudder, gear, pitch
uint8_t e = 0; // byte where extension 2 bits for every 10-bit channel are packed
- const uint8_t ch[]={AILERON, ELEVATOR, THROTTLE, RUDDER};
for (uint8_t i = 0; i < 4; ++i) {
- uint16_t v = convert_channel_10b(ch[i]);
+ uint16_t v = convert_channel_10b(CH_AETR[i]);
packet[i] = v;
e = (e >> 2) | (uint8_t) ((v >> 2) & 0xC0);
}
diff --git a/Multiprotocol/SPI.ino b/Multiprotocol/SPI.ino
new file mode 100644
index 0000000..fcf2936
--- /dev/null
+++ b/Multiprotocol/SPI.ino
@@ -0,0 +1,86 @@
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+/********************/
+/** SPI routines **/
+/********************/
+#ifdef XMEGA
+ #define XNOP() NOP()
+#else
+ #define XNOP()
+#endif
+
+void SPI_Write(uint8_t command)
+{
+ uint8_t n=8;
+
+ SCLK_off;//SCK start low
+ XNOP();
+ SDI_off;
+ XNOP();
+ do
+ {
+ if(command&0x80)
+ SDI_on;
+ else
+ SDI_off;
+ XNOP();
+ SCLK_on;
+ XNOP();
+ XNOP();
+ command = command << 1;
+ SCLK_off;
+ XNOP();
+ }
+ while(--n) ;
+ SDI_on;
+}
+
+uint8_t SPI_Read(void)
+{
+ uint8_t result=0,i;
+ for(i=0;i<8;i++)
+ {
+ result=result<<1;
+ if(SDO_1)
+ result |= 0x01;
+ SCLK_on;
+ XNOP();
+ XNOP();
+ NOP();
+ SCLK_off;
+ XNOP();
+ XNOP();
+ }
+ return result;
+}
+
+#ifdef A7105_INSTALLED
+uint8_t SPI_SDIO_Read(void)
+{
+ uint8_t result=0;
+ SDI_input;
+ for(uint8_t i=0;i<8;i++)
+ {
+ result=result<<1;
+ if(SDI_1) ///if SDIO =1
+ result |= 0x01;
+ SCLK_on;
+ NOP();
+ SCLK_off;
+ }
+ SDI_output;
+ return result;
+}
+#endif
diff --git a/Multiprotocol/Symax_nrf24l01.ino b/Multiprotocol/Symax_nrf24l01.ino
index 266396b..db4cb34 100644
--- a/Multiprotocol/Symax_nrf24l01.ino
+++ b/Multiprotocol/Symax_nrf24l01.ino
@@ -161,7 +161,7 @@ static void __attribute__((unused)) SYMAX_send_packet(uint8_t bind)
NRF24L01_WritePayload(packet, packet_length);
- if (packet_counter++ % 2) // use each channel twice
+ if (packet_count++ % 2) // use each channel twice
hopping_frequency_no = (hopping_frequency_no + 1) % rf_ch_num;
NRF24L01_SetPower(); // Set tx_power
@@ -174,7 +174,7 @@ static void __attribute__((unused)) symax_init()
NRF24L01_SetTxRxMode(TX_EN);
//
NRF24L01_ReadReg(NRF24L01_07_STATUS);
- NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO));
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO));
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknoledgement
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x3F); // Enable all data pipes (even though not used?)
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5-byte RX/TX address
@@ -243,7 +243,7 @@ static void __attribute__((unused)) symax_init1()
memcpy(hopping_frequency, chans_bind, rf_ch_num);
}
hopping_frequency_no = 0;
- packet_counter = 0;
+ packet_count = 0;
}
// channels determined by last byte of tx address
@@ -292,7 +292,7 @@ static void __attribute__((unused)) symax_set_channels(uint8_t address)
static void __attribute__((unused)) symax_init2()
{
- uint8_t chans_data_x5c[] = {0x1d, 0x2f, 0x26, 0x3d, 0x15, 0x2b, 0x25, 0x24,
+static uint8_t chans_data_x5c[] = {0x1d, 0x2f, 0x26, 0x3d, 0x15, 0x2b, 0x25, 0x24,
0x27, 0x2c, 0x1c, 0x3e, 0x39, 0x2d, 0x22};
if (sub_protocol==SYMAX5C)
@@ -306,7 +306,7 @@ static void __attribute__((unused)) symax_init2()
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, 5);
}
hopping_frequency_no = 0;
- packet_counter = 0;
+ packet_count = 0;
}
uint16_t symax_callback()
@@ -345,7 +345,7 @@ uint16_t symax_callback()
uint16_t initSymax()
{
- packet_counter = 0;
+ packet_count = 0;
flags = 0;
BIND_IN_PROGRESS; // autobind protocol
symax_init();
diff --git a/Multiprotocol/TX_Def.h b/Multiprotocol/TX_Def.h
new file mode 100644
index 0000000..08e131a
--- /dev/null
+++ b/Multiprotocol/TX_Def.h
@@ -0,0 +1,261 @@
+// Turnigy PPM and channels
+#if defined(TX_ER9X)
+ #define PPM_MAX_100 2012 // 100%
+ #define PPM_MIN_100 988 // 100%
+ #define PPM_MAX_125 2140 // 125%
+ #define PPM_MIN_125 860 // 125%
+#endif
+
+// Devo PPM and channels
+#if defined(TX_DEVO7)
+ #define PPM_MAX_100 1920 // 100%
+ #define PPM_MIN_100 1120 // 100%
+ #define PPM_MAX_125 2100 // 125%
+ #define PPM_MIN_125 900 // 125%
+#endif
+
+// SPEKTRUM PPM and channels
+#if defined(TX_SPEKTRUM)
+ #define PPM_MAX_100 1900 // 100%
+ #define PPM_MIN_100 1100 // 100%
+ #define PPM_MAX_125 2000 // 125%
+ #define PPM_MIN_125 1000 // 125%
+#endif
+
+// HISKY
+#if defined(TX_HISKY)
+ #define PPM_MAX_100 1900 // 100%
+ #define PPM_MIN_100 1100 // 100%
+ #define PPM_MAX_125 2000 // 125%
+ #define PPM_MIN_125 1000 // 125%
+#endif
+
+// Multiplex MC2020
+#if defined(TX_MPX)
+ #define PPM_MAX_100 1950 // 100%
+ #define PPM_MIN_100 1250 // 100%
+ #define PPM_MAX_125 2050 // 125%
+ #define PPM_MIN_125 1150 // 125%
+#endif
+
+//Serial MIN MAX values
+#define SERIAL_MAX_100 2012 // 100%
+#define SERIAL_MIN_100 988 // 100%
+#define SERIAL_MAX_125 2140 // 125%
+#define SERIAL_MIN_125 860 // 125%
+
+//PPM values used to compare
+#define PPM_MIN_COMMAND 1250
+#define PPM_SWITCH 1550
+#define PPM_MAX_COMMAND 1750
+
+//Channel definitions
+#ifdef AETR
+enum {
+ AILERON =0,
+ ELEVATOR,
+ THROTTLE,
+ RUDDER,
+};
+#endif
+#ifdef AERT
+enum {
+ AILERON =0,
+ ELEVATOR,
+ RUDDER,
+ THROTTLE,
+};
+#endif
+#ifdef ARET
+enum {
+ AILERON =0,
+ RUDDER,
+ ELEVATOR,
+ THROTTLE,
+};
+#endif
+#ifdef ARTE
+enum {
+ AILERON =0,
+ RUDDER,
+ THROTTLE,
+ ELEVATOR,
+};
+#endif
+#ifdef ATRE
+enum {
+ AILERON =0,
+ THROTTLE,
+ RUDDER,
+ ELEVATOR,
+};
+#endif
+#ifdef ATER
+enum {
+ AILERON =0,
+ THROTTLE,
+ ELEVATOR,
+ RUDDER,
+};
+#endif
+
+#ifdef EATR
+enum {
+ ELEVATOR =0,
+ AILERON,
+ THROTTLE,
+ RUDDER,
+};
+#endif
+#ifdef EART
+enum {
+ ELEVATOR =0,
+ AILERON,
+ RUDDER,
+ THROTTLE,
+};
+#endif
+#ifdef ERAT
+enum {
+ ELEVATOR =0,
+ RUDDER,
+ AILERON,
+ THROTTLE,
+};
+#endif
+#ifdef ERTA
+enum {
+ ELEVATOR =0,
+ RUDDER,
+ THROTTLE,
+ AILERON,
+};
+#endif
+#ifdef ETRA
+enum {
+ ELEVATOR =0,
+ THROTTLE,
+ RUDDER,
+ AILERON,
+};
+#endif
+#ifdef ETAR
+enum {
+ ELEVATOR =0,
+ THROTTLE,
+ AILERON,
+ RUDDER,
+};
+#endif
+
+#ifdef TEAR
+enum {
+ THROTTLE =0,
+ ELEVATOR,
+ AILERON,
+ RUDDER,
+};
+#endif
+#ifdef TERA
+enum {
+ THROTTLE =0,
+ ELEVATOR,
+ RUDDER,
+ AILERON,
+};
+#endif
+#ifdef TREA
+enum {
+ THROTTLE =0,
+ RUDDER,
+ ELEVATOR,
+ AILERON,
+};
+#endif
+#ifdef TRAE
+enum {
+ THROTTLE =0,
+ RUDDER,
+ AILERON,
+ ELEVATOR,
+};
+#endif
+#ifdef TARE
+enum {
+ THROTTLE =0,
+ AILERON,
+ RUDDER,
+ ELEVATOR,
+};
+#endif
+#ifdef TAER
+enum {
+ THROTTLE =0,
+ AILERON,
+ ELEVATOR,
+ RUDDER,
+};
+#endif
+
+#ifdef RETA
+enum {
+ RUDDER =0,
+ ELEVATOR,
+ THROTTLE,
+ AILERON,
+};
+#endif
+#ifdef REAT
+enum {
+ RUDDER =0,
+ ELEVATOR,
+ AILERON,
+ THROTTLE,
+};
+#endif
+#ifdef RAET
+enum {
+ RUDDER =0,
+ AILERON,
+ ELEVATOR,
+ THROTTLE,
+};
+#endif
+#ifdef RATE
+enum {
+ RUDDER =0,
+ AILERON,
+ THROTTLE,
+ ELEVATOR,
+};
+#endif
+#ifdef RTAE
+enum {
+ RUDDER =0,
+ THROTTLE,
+ AILERON,
+ ELEVATOR,
+};
+#endif
+#ifdef RTEA
+enum {
+ RUDDER =0,
+ THROTTLE,
+ ELEVATOR,
+ AILERON,
+};
+#endif
+
+#define AUX1 4
+#define AUX2 5
+#define AUX3 6
+#define AUX4 7
+#define AUX5 8
+#define AUX6 9
+#define AUX7 10
+#define AUX8 11
+#define AUX9 12
+#define AUX10 13
+#define AUX11 14
+#define AUX12 15
+#define AUX13 16
diff --git a/Multiprotocol/Telemetry.ino b/Multiprotocol/Telemetry.ino
index 50553b4..ad5e419 100644
--- a/Multiprotocol/Telemetry.ino
+++ b/Multiprotocol/Telemetry.ino
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
//*************************************
// FrSky Telemetry serial code *
// By Midelic on RCGroups *
@@ -171,6 +172,240 @@
100K 8E2 normal-multiprotocol
-every 12ms-
1 2 3 4 5 6 7 8 9 CRC DESCR
+=======
+/*
+ This project is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Multiprotocol is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Multiprotocol. If not, see .
+ */
+//**************************
+// Telemetry serial code *
+//**************************
+#if defined TELEMETRY
+
+#if defined SPORT_TELEMETRY
+ #define SPORT_TIME 12000
+ #define FRSKY_SPORT_PACKET_SIZE 8
+ uint32_t last = 0;
+ uint8_t sport_counter=0;
+ uint8_t RxBt = 0;
+ uint8_t rssi;
+ uint8_t sport = 0;
+#endif
+#if defined HUB_TELEMETRY
+ #define USER_MAX_BYTES 6
+ uint8_t prev_index;
+#endif
+
+#define START_STOP 0x7e
+#define BYTESTUFF 0x7d
+#define STUFF_MASK 0x20
+#define MAX_PKTX 10
+uint8_t pktx[MAX_PKTX];
+uint8_t pktx1[MAX_PKTX];
+uint8_t index;
+uint8_t frame[18];
+
+#ifdef BASH_SERIAL
+// For bit-bashed serial output
+ struct t_serial_bash
+ {
+ uint8_t head ;
+ uint8_t tail ;
+ uint8_t data[64] ;
+ uint8_t busy ;
+ uint8_t speed ;
+ } SerialControl ;
+#endif
+
+#if defined DSM_TELEMETRY
+void DSM_frame()
+{
+ Serial_write(0xAA); // Telemetry packet
+ for (uint8_t i = 0; i < 17; i++) // RSSI value followed by 16 bytes of telemetry data
+ Serial_write(pkt[i]);
+}
+#endif
+
+void frskySendStuffed()
+{
+ Serial_write(START_STOP);
+ for (uint8_t i = 0; i < 9; i++)
+ {
+ if ((frame[i] == START_STOP) || (frame[i] == BYTESTUFF))
+ {
+ Serial_write(BYTESTUFF);
+ frame[i] ^= STUFF_MASK;
+ }
+ Serial_write(frame[i]);
+ }
+ Serial_write(START_STOP);
+}
+
+void compute_RSSIdbm()
+{
+
+ RSSI_dBm = (((uint16_t)(pktt[len-2])*18)>>4);
+ if(pktt[len-2] >=128)
+ RSSI_dBm -= 164;
+ else
+ RSSI_dBm += 130;
+}
+
+void frsky_check_telemetry(uint8_t *pkt,uint8_t len)
+{
+ if(pkt[1] == rx_tx_addr[3] && pkt[2] == rx_tx_addr[2] && len ==(pkt[0] + 3))
+ {
+ for (uint8_t i=3;i> 4 & 0x0f) == 0x08)
+ {
+ seq_last_sent = 8;
+ seq_last_rcvd = 0;
+ pass=0;
+ }
+ else
+ {
+ if ((pktt[5] >> 4 & 0x03) == (seq_last_rcvd + 1) % 4)
+ seq_last_rcvd = (seq_last_rcvd + 1) % 4;
+ else
+ pass=0;//reset if sequence wrong
+ }
+ }
+#endif
+ }
+}
+
+void frsky_link_frame()
+{
+ frame[0] = 0xFE;
+ if (protocol==MODE_FRSKYD)
+ {
+ compute_RSSIdbm();
+ frame[1] = pktt[3];
+ frame[2] = pktt[4];
+ frame[3] = pktt[5];
+ frame[4] = (uint8_t)RSSI_dBm;
+ }
+ else
+ if (protocol==MODE_HUBSAN)
+ {
+ frame[1] = v_lipo*2; //v_lipo; common 0x2A=42/10=4.2V
+ frame[2] = frame[1];
+ frame[3] = 0x00;
+ frame[4] = (uint8_t)RSSI_dBm;
+ }
+ frame[5] = frame[6] = frame[7] = frame[8] = 0;
+ frskySendStuffed();
+}
+
+#if defined HUB_TELEMETRY
+void frsky_user_frame()
+{
+ uint8_t indexx = 0, j=8, i;
+ //uint8_t c=0, n=0;
+
+ if(pktt[6]>0 && pktt[6]<=10)
+ {//only valid hub frames
+ frame[0] = 0xFD;
+ frame[2] = pktt[7];
+ switch(pass)
+ {
+ case 0:
+ indexx=pktt[6];
+ for(i=0;i>>>>>> refs/remotes/pascallanger/master
7E 98 10 05 F1 20 23 0F 00 A6 SWR_ID
7E 98 10 01 F1 33 00 00 00 C9 RSSI_ID
7E 98 10 04 F1 58 00 00 00 A1 BATT_ID
@@ -182,14 +417,24 @@
7E BA 10 03 F1 E2 00 00 00 18 ADC2_ID
+<<<<<<< HEAD
Telemetry frames(RF) SPORT info 15 bytes
SPORT frame 6+3 bytes
+=======
+ Telemetry frames(RF) SPORT info
+ 15 bytes payload
+ SPORT frame valid 6+3 bytes
+>>>>>>> refs/remotes/pascallanger/master
[00] PKLEN 0E 0E 0E 0E
[01] TXID1 DD DD DD DD
[02] TXID2 6D 6D 6D 6D
[03] CONST 02 02 02 02
[04] RS/RB 2C D0 2C CE //D0;CE=2*RSSI;....2C = RX battery voltage(5V from Bec)
+<<<<<<< HEAD
[05] ????? 03 10 21 32 //TX/RX telemetry hand-shake bytes
+=======
+ [05] HD-SK 03 10 21 32 //TX/RX telemetry hand-shake bytes
+>>>>>>> refs/remotes/pascallanger/master
[06] NO.BT 00 00 06 03 //No.of valid SPORT frame bytes in the frame
[07] STRM1 00 00 7E 00
[08] STRM2 00 00 1A 00
@@ -197,6 +442,7 @@
[10] STRM4 03 03 03 03
[11] STRM5 F1 F1 F1 F1
[12] STRM6 D1 D1 D0 D0
+<<<<<<< HEAD
[13] CHKSUM1
[14] CHKSUM2
*/
@@ -334,4 +580,573 @@
#endif
}
-#endif
\ No newline at end of file
+#endif
+=======
+ [13] CHKSUM1 --|2 CRC bytes sent by RX (calculated on RX side crc16/table)
+ [14] CHKSUM2 --|
+ +2 appended bytes automatically RSSI and LQI/CRC bytes(len=0x0E+3);
+
+0x06 0x06 0x06 0x06 0x06
+
+0x7E 0x00 0x03 0x7E 0x00
+0x1A 0x00 0xF1 0x1A 0x00
+0x10 0x00 0xD7 0x10 0x00
+0x03 0x7E 0x00 0x03 0x7E
+0xF1 0x1A 0x00 0xF1 0x1A
+0xD7 0x10 0x00 0xD7 0x10
+
+0xE1 0x1C 0xD0 0xEE 0x33
+0x34 0x0A 0xC3 0x56 0xF3
+
+ */
+void sportSend(uint8_t *p)
+{
+ uint16_t crc_s = 0;
+ Serial_write(START_STOP);//+9
+ Serial_write(p[0]) ;
+ for (uint8_t i = 1; i < 9; i++)
+ {
+ if (i == 8)
+ p[i] = 0xff - crc_s;
+
+ if ((p[i] == START_STOP) || (p[i] == BYTESTUFF))
+ {
+ Serial_write(BYTESTUFF);//stuff again
+ Serial_write(STUFF_MASK ^ p[i]);
+ }
+ else
+ Serial_write(p[i]);
+
+ if (i>0)
+ {
+ crc_s += p[i]; //0-1FF
+ crc_s += crc_s >> 8; //0-100
+ crc_s &= 0x00ff;
+ }
+ }
+}
+
+void sportIdle()
+{
+ Serial_write(START_STOP);
+}
+
+void sportSendFrame()
+{
+ uint8_t i;
+ sport_counter = (sport_counter + 1) %36;
+
+ if(sport_counter<6)
+ {
+ frame[0] = 0x98;
+ frame[1] = 0x10;
+ for (i=5;i<8;i++)
+ frame[i]=0;
+ }
+ switch (sport_counter)
+ {
+ case 0:
+ frame[2] = 0x05;
+ frame[3] = 0xf1;
+ frame[4] = 0x02 ;//dummy values if swr 20230f00
+ frame[5] = 0x23;
+ frame[6] = 0x0F;
+ break;
+ case 2: // RSSI
+ frame[2] = 0x01;
+ frame[3] = 0xf1;
+ frame[4] = rssi;
+ break;
+ case 4: //BATT
+ frame[2] = 0x04;
+ frame[3] = 0xf1;
+ frame[4] = RxBt;//a1;
+ break;
+ default:
+ if(sport)
+ {
+ for (i=0;i= FRSKY_SPORT_PACKET_SIZE)
+ {//8 bytes no crc
+ if ( sport )
+ {
+ // overrun!
+ }
+ else
+ {
+ uint8_t i ;
+ for ( i = 0 ; i < FRSKY_SPORT_PACKET_SIZE ; i += 1 )
+ {
+ pktx1[i] = pktx[i] ; // Double buffer
+ }
+ sport = 1;//ok to send
+ }
+ pass = 0;//reset
+ }
+}
+
+#endif
+
+void TelemetryUpdate()
+{
+#if defined SPORT_TELEMETRY
+ if (protocol==MODE_FRSKYX)
+ { // FrSkyX
+ if(telemetry_link)
+ {
+ if(pktt[4] & 0x80)
+ rssi=pktt[4] & 0x7F ;
+ else
+ RxBt = (pktt[4]<<1) + 1 ;
+ for (uint8_t i=0; i < pktt[6]; i++)
+ proces_sport_data(pktt[7+i]);
+ telemetry_link=0;
+ }
+ }
+#endif
+
+ // check for space in tx buffer
+
+#ifdef BASH_SERIAL
+ uint8_t h ;
+ uint8_t t ;
+ h = SerialControl.head ;
+ t = SerialControl.tail ;
+ if ( h >= t )
+ {
+ t += 64 - h ;
+ }
+ else
+ {
+ t -= h ;
+ }
+ if ( t < 32 )
+ {
+ return ;
+ }
+
+#else
+ uint8_t h ;
+ uint8_t t ;
+ h = tx_head ;
+ t = tx_tail ;
+ if ( h >= t )
+ {
+ t += TXBUFFER_SIZE - h ;
+ }
+ else
+ {
+ t -= h ;
+ }
+ if ( t < 16 )
+ {
+ return ;
+ }
+#endif
+
+ #if defined DSM_TELEMETRY
+ if(telemetry_link && protocol == MODE_DSM )
+ { // DSM
+ DSM_frame();
+ telemetry_link=0;
+ return;
+ }
+ #endif
+ if(telemetry_link && protocol != MODE_FRSKYX )
+ { // FrSky + Hubsan
+ frsky_link_frame();
+ telemetry_link=0;
+ return;
+ }
+ #if defined HUB_TELEMETRY
+ if(!telemetry_link && protocol == MODE_FRSKYD)
+ { // FrSky
+ frsky_user_frame();
+ return;
+ }
+ #endif
+ #if defined SPORT_TELEMETRY
+ if (protocol==MODE_FRSKYX)
+ { // FrSkyX
+ uint32_t now = micros();
+ if ((now - last) > SPORT_TIME)
+ {
+ sportSendFrame();
+ last += SPORT_TIME ;
+ }
+ }
+ #endif
+}
+
+
+/**************************/
+/**************************/
+/** Serial TX routines **/
+/**************************/
+/**************************/
+
+#ifndef BASH_SERIAL
+// Routines for normal serial output
+void Serial_write(uint8_t data)
+{
+ uint8_t nextHead ;
+ nextHead = tx_head + 1 ;
+ if ( nextHead >= TXBUFFER_SIZE )
+ nextHead = 0 ;
+ tx_buff[nextHead]=data;
+ tx_head = nextHead ;
+ tx_resume();
+}
+
+void initTXSerial( uint8_t speed)
+{
+ #ifdef ENABLE_PPM
+ if(speed==SPEED_9600)
+ { // 9600
+ #ifdef XMEGA
+ USARTC0.BAUDCTRLA = 207 ;
+ USARTC0.BAUDCTRLB = 0 ;
+ USARTC0.CTRLB = 0x18 ;
+ USARTC0.CTRLA = (USARTC0.CTRLA & 0xCF) | 0x10 ;
+ USARTC0.CTRLC = 0x03 ;
+ #else
+ //9600 bauds
+ UBRR0H = 0x00;
+ UBRR0L = 0x67;
+ UCSR0A = 0 ; // Clear X2 bit
+ //Set frame format to 8 data bits, none, 1 stop bit
+ UCSR0C = (1<=TXBUFFER_SIZE)//head
+ tx_tail=0;
+ UDR0=tx_buff[tx_tail];
+ }
+ if (tx_tail == tx_head)
+ tx_pause(); // Check if all data is transmitted . if yes disable transmitter UDRE interrupt
+}
+
+#else //BASH_SERIAL
+// Routines for bit-bashed serial output
+
+// Speed is 0 for 100K and 1 for 9600
+void initTXSerial( uint8_t speed)
+{
+ TIMSK0 = 0 ; // Stop all timer 0 interrupts
+ #ifdef INVERT_SERIAL
+ SERIAL_TX_off;
+ #else
+ SERIAL_TX_on;
+ #endif
+ UCSR0B &= ~(1<>= 7 ; // Top bit
+ if ( SerialControl.speed == SPEED_100K )
+ {
+ #ifdef INVERT_SERIAL
+ byteLo |= 0x02 ; // Parity bit
+ #else
+ byteLo |= 0xFC ; // Stop bits
+ #endif
+ // calc parity
+ temp = byte ;
+ temp >>= 4 ;
+ temp = byte ^ temp ;
+ temp1 = temp ;
+ temp1 >>= 2 ;
+ temp = temp ^ temp1 ;
+ temp1 = temp ;
+ temp1 <<= 1 ;
+ temp ^= temp1 ;
+ temp &= 0x02 ;
+ #ifdef INVERT_SERIAL
+ byteLo ^= temp ;
+ #else
+ byteLo |= temp ;
+ #endif
+ }
+ else
+ {
+ byteLo |= 0xFE ; // Stop bit
+ }
+ byte <<= 1 ;
+ #ifdef INVERT_SERIAL
+ byte |= 1 ; // Start bit
+ #endif
+ uint8_t next = (SerialControl.head + 2) & 0x3f ;
+ if ( next != SerialControl.tail )
+ {
+ SerialControl.data[SerialControl.head] = byte ;
+ SerialControl.data[SerialControl.head+1] = byteLo ;
+ SerialControl.head = next ;
+ }
+ if(!IS_TX_PAUSE_on)
+ tx_resume();
+}
+
+void resumeBashSerial()
+{
+ cli() ;
+ if ( SerialControl.busy == 0 )
+ {
+ sei() ;
+ // Start the transmission here
+ #ifdef INVERT_SERIAL
+ GPIOR2 = 0 ;
+ #else
+ GPIOR2 = 0x01 ;
+ #endif
+ if ( SerialControl.speed == SPEED_100K )
+ {
+ GPIOR1 = 1 ;
+ OCR0B = TCNT0 + 40 ;
+ OCR0A = OCR0B + 210 ;
+ TIFR0 = (1<>= 1
+ GPIOR0 = byte ;
+ if ( --GPIOR1 == 0 )
+ {
+ TIMSK0 &= ~(1<>= 1
+ GPIOR2 = byte ;
+ if ( --GPIOR1 == 0 )
+ {
+ if ( IS_TX_PAUSE_on )
+ {
+ SerialControl.busy = 0 ;
+ TIMSK0 &= ~(1<head != ptr->tail )
+ {
+ GPIOR0 = ptr->data[ptr->tail] ;
+ GPIOR2 = ptr->data[ptr->tail+1] ;
+ ptr->tail = ( ptr->tail + 2 ) & 0x3F ;
+ GPIOR1 = 8 ;
+ OCR0A = OCR0B + 40 ;
+ OCR0B = OCR0A + 8 * 20 ;
+ TIMSK0 |= (1< 2 )
+ {
+ byte = GPIOR0 ;
+ }
+ else
+ {
+ byte = GPIOR2 ;
+ }
+ if ( byte & 0x01 )
+ SERIAL_TX_on;
+ else
+ SERIAL_TX_off;
+ byte /= 2 ; // Generates shorter code than byte >>= 1
+ if ( GPIOR1 > 2 )
+ {
+ GPIOR0 = byte ;
+ }
+ else
+ {
+ GPIOR2 = byte ;
+ }
+ if ( --GPIOR1 == 0 )
+ {
+ // prepare next byte
+ struct t_serial_bash *ptr = &SerialControl ;
+ if ( ptr->head != ptr->tail )
+ {
+ GPIOR0 = ptr->data[ptr->tail] ;
+ GPIOR2 = ptr->data[ptr->tail+1] ;
+ ptr->tail = ( ptr->tail + 2 ) & 0x3F ;
+ GPIOR1 = 10 ;
+ }
+ else
+ {
+ SerialControl.busy = 0 ;
+ TIMSK0 &= ~(1<>>>>>> refs/remotes/pascallanger/master
diff --git a/Multiprotocol/V2X2_nrf24l01.ino b/Multiprotocol/V2X2_nrf24l01.ino
index 887e60e..8f88c21 100644
--- a/Multiprotocol/V2X2_nrf24l01.ino
+++ b/Multiprotocol/V2X2_nrf24l01.ino
@@ -80,7 +80,7 @@ static void __attribute__((unused)) v202_init()
NRF24L01_Initialize();
// 2-bytes CRC, radio off
- NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO));
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO));
NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // No Auto Acknoledgement
NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x3F); // Enable all data pipes
NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5-byte RX/TX address
@@ -116,7 +116,7 @@ static void __attribute__((unused)) V202_init2()
// Turn radio power on
NRF24L01_SetTxRxMode(TX_EN);
- //Done by TX_EN??? => NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_CRCO) | BV(NRF24L01_00_PWR_UP));
+ //Done by TX_EN??? => NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_CRCO) | _BV(NRF24L01_00_PWR_UP));
}
static void __attribute__((unused)) V2X2_set_tx_id(void)
diff --git a/Multiprotocol/WMath.cpp.xmega b/Multiprotocol/WMath.cpp.xmega
new file mode 100644
index 0000000..42731e4
--- /dev/null
+++ b/Multiprotocol/WMath.cpp.xmega
@@ -0,0 +1,60 @@
+/* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */
+
+/*
+ Part of the Wiring project - http://wiring.org.co
+ Copyright (c) 2004-06 Hernando Barragan
+ Modified 13 August 2006, David A. Mellis for Arduino - http://www.arduino.cc/
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General
+ Public License along with this library; if not, write to the
+ Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ Boston, MA 02111-1307 USA
+
+ $Id$
+*/
+
+extern "C" {
+ #include "stdlib.h"
+}
+
+void randomSeed(unsigned int seed)
+{
+ if (seed != 0) {
+ srandom(seed);
+ }
+}
+
+long random(long howbig)
+{
+ if (howbig == 0) {
+ return 0;
+ }
+ return random() % howbig;
+}
+
+//long random(long howsmall, long howbig)
+//{
+// if (howsmall >= howbig) {
+// return howsmall;
+// }
+// long diff = howbig - howsmall;
+// return random(diff) + howsmall;
+//}
+
+long map(long x, long in_min, long in_max, long out_min, long out_max)
+{
+ return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
+}
+
+unsigned int makeWord(unsigned int w) { return w; }
+unsigned int makeWord(unsigned char h, unsigned char l) { return (h << 8) | l; }
\ No newline at end of file
diff --git a/Multiprotocol/YD717_nrf24l01.ino b/Multiprotocol/YD717_nrf24l01.ino
index 1d9ffbe..e3a3756 100644
--- a/Multiprotocol/YD717_nrf24l01.ino
+++ b/Multiprotocol/YD717_nrf24l01.ino
@@ -34,6 +34,7 @@
#define YD717_PAYLOADSIZE 8 // receive data pipes set to this size, but unused
+<<<<<<< HEAD
enum {
YD717_INIT1 = 0,
YD717_BIND2,
@@ -41,6 +42,8 @@ enum {
YD717_DATA
};
+=======
+>>>>>>> refs/remotes/pascallanger/master
static void __attribute__((unused)) yd717_send_packet(uint8_t bind)
{
uint8_t rudder_trim, elevator_trim, aileron_trim;
@@ -108,7 +111,7 @@ static void __attribute__((unused)) yd717_send_packet(uint8_t bind)
}
// clear packet status bits and TX FIFO
- NRF24L01_WriteReg(NRF24L01_07_STATUS, (BV(NRF24L01_07_TX_DS) | BV(NRF24L01_07_MAX_RT)));
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, (_BV(NRF24L01_07_TX_DS) | _BV(NRF24L01_07_MAX_RT)));
NRF24L01_FlushTx();
if( sub_protocol == YD717 )
@@ -131,54 +134,41 @@ static void __attribute__((unused)) yd717_init()
// CRC, radio on
NRF24L01_SetTxRxMode(TX_EN);
- NRF24L01_WriteReg(NRF24L01_00_CONFIG, BV(NRF24L01_00_EN_CRC) | BV(NRF24L01_00_PWR_UP));
- NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x3F); // Auto Acknoledgement on all data pipes
- NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x3F); // Enable all data pipes
- NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5-byte RX/TX address
- NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0x1A); // 500uS retransmit t/o, 10 tries
+ NRF24L01_WriteReg(NRF24L01_00_CONFIG, _BV(NRF24L01_00_EN_CRC) | _BV(NRF24L01_00_PWR_UP));
+ NRF24L01_WriteReg(NRF24L01_01_EN_AA, 0x00); // Disable Acknoledgement on all data pipes
+ NRF24L01_WriteReg(NRF24L01_02_EN_RXADDR, 0x00); // Disable all data pipes
+ NRF24L01_WriteReg(NRF24L01_03_SETUP_AW, 0x03); // 5-byte RX/TX address
+ NRF24L01_WriteReg(NRF24L01_04_SETUP_RETR, 0x00); // No retransmit
NRF24L01_WriteReg(NRF24L01_05_RF_CH, YD717_RF_CHANNEL); // Channel 3C
- NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
+ NRF24L01_SetBitrate(NRF24L01_BR_1M); // 1Mbps
NRF24L01_SetPower();
- NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
- NRF24L01_WriteReg(NRF24L01_0C_RX_ADDR_P2, 0xC3); // LSB byte of pipe 2 receive address
- NRF24L01_WriteReg(NRF24L01_0D_RX_ADDR_P3, 0xC4);
- NRF24L01_WriteReg(NRF24L01_0E_RX_ADDR_P4, 0xC5);
- NRF24L01_WriteReg(NRF24L01_0F_RX_ADDR_P5, 0xC6);
- NRF24L01_WriteReg(NRF24L01_11_RX_PW_P0, YD717_PAYLOADSIZE); // bytes of data payload for pipe 1
- NRF24L01_WriteReg(NRF24L01_12_RX_PW_P1, YD717_PAYLOADSIZE);
- NRF24L01_WriteReg(NRF24L01_13_RX_PW_P2, YD717_PAYLOADSIZE);
- NRF24L01_WriteReg(NRF24L01_14_RX_PW_P3, YD717_PAYLOADSIZE);
- NRF24L01_WriteReg(NRF24L01_15_RX_PW_P4, YD717_PAYLOADSIZE);
- NRF24L01_WriteReg(NRF24L01_16_RX_PW_P5, YD717_PAYLOADSIZE);
- NRF24L01_WriteReg(NRF24L01_17_FIFO_STATUS, 0x00); // Just in case, no real bits to write here
+ NRF24L01_WriteReg(NRF24L01_07_STATUS, 0x70); // Clear data ready, data sent, and retransmit
- NRF24L01_Activate(0x73); // Activate feature register
- NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x3F); // Enable dynamic payload length on all pipes
- NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x07); // Set feature bits on
+ NRF24L01_Activate(0x73); // Activate feature register
+ NRF24L01_WriteReg(NRF24L01_1C_DYNPD, 0x3F); // Enable dynamic payload length on all pipes
+ NRF24L01_WriteReg(NRF24L01_1D_FEATURE, 0x07); // Set feature bits on
NRF24L01_Activate(0x73);
- // set tx id
- NRF24L01_WriteRegisterMulti(NRF24L01_0A_RX_ADDR_P0, rx_tx_addr, 5);
- NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, 5);
-}
-
+<<<<<<< HEAD
static void __attribute__((unused)) YD717_init1()
{
+=======
+>>>>>>> refs/remotes/pascallanger/master
// for bind packets set address to prearranged value known to receiver
uint8_t bind_rx_tx_addr[] = {0x65, 0x65, 0x65, 0x65, 0x65};
- uint8_t i;
+
if( sub_protocol==SYMAX4 )
- for(i=0; i < 5; i++)
+ for(uint8_t i=0; i < 5; i++)
bind_rx_tx_addr[i] = 0x60;
else
if( sub_protocol==NIHUI )
- for(i=0; i < 5; i++)
+ for(uint8_t i=0; i < 5; i++)
bind_rx_tx_addr[i] = 0x64;
- NRF24L01_WriteRegisterMulti(NRF24L01_0A_RX_ADDR_P0, bind_rx_tx_addr, 5);
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, bind_rx_tx_addr, 5);
}
+<<<<<<< HEAD
static void __attribute__((unused)) YD717_init2()
{
// set rx/tx address for data phase
@@ -186,65 +176,38 @@ static void __attribute__((unused)) YD717_init2()
NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, 5);
}
+=======
+>>>>>>> refs/remotes/pascallanger/master
uint16_t yd717_callback()
{
- switch (phase)
+ if(IS_BIND_DONE_on)
+ yd717_send_packet(0);
+ else
{
- case YD717_INIT1:
- yd717_send_packet(0); // receiver doesn't re-enter bind mode if connection lost...check if already bound
- phase = YD717_BIND3;
- break;
- case YD717_BIND2:
- if (counter == 0)
- {
- if (NRF24L01_packet_ack() == PKT_PENDING)
- return YD717_PACKET_CHKTIME; // packet send not yet complete
- YD717_init2(); // change to data phase rx/tx address
- yd717_send_packet(0);
- phase = YD717_BIND3;
- }
- else
- {
- if (NRF24L01_packet_ack() == PKT_PENDING)
- return YD717_PACKET_CHKTIME; // packet send not yet complete;
- yd717_send_packet(1);
- counter--;
- }
- break;
- case YD717_BIND3:
- switch (NRF24L01_packet_ack())
- {
- case PKT_PENDING:
- return YD717_PACKET_CHKTIME; // packet send not yet complete
- case PKT_ACKED:
- phase = YD717_DATA;
- BIND_DONE; // bind complete
- break;
- case PKT_TIMEOUT:
- YD717_init1(); // change to bind rx/tx address
- counter = YD717_BIND_COUNT;
- phase = YD717_BIND2;
- yd717_send_packet(1);
- }
- break;
- case YD717_DATA:
- if (NRF24L01_packet_ack() == PKT_PENDING)
- return YD717_PACKET_CHKTIME; // packet send not yet complete
+ if (bind_counter == 0)
+ {
+ NRF24L01_WriteRegisterMulti(NRF24L01_10_TX_ADDR, rx_tx_addr, 5); // set address
yd717_send_packet(0);
- break;
- }
+ BIND_DONE; // bind complete
+ }
+ else
+ {
+ yd717_send_packet(1);
+ bind_counter--;
+ }
+ }
return YD717_PACKET_PERIOD; // Packet every 8ms
}
uint16_t initYD717()
{
- rx_tx_addr[4] = 0xC1; // always uses first data port
+ BIND_IN_PROGRESS; // autobind protocol
+ rx_tx_addr[4] = 0xC1; // always uses first data port
yd717_init();
- phase = YD717_INIT1;
- BIND_IN_PROGRESS; // autobind protocol
+ bind_counter = YD717_BIND_COUNT;
// Call callback in 50ms
return YD717_INITIAL_WAIT;
}
-#endif
+#endif
\ No newline at end of file
diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h
index e0d4da0..17c740a 100644
--- a/Multiprotocol/_Config.h
+++ b/Multiprotocol/_Config.h
@@ -13,6 +13,7 @@
along with Multiprotocol. If not, see .
*/
+<<<<<<< HEAD
/** Multiprotocol module configuration file ***/
//Uncomment your TX type
@@ -90,6 +91,150 @@ const PPM_Parameters PPM_prot[15]= {
/* 7 */ {MODE_DEVO , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
/* 8 */ {MODE_YD717 , YD717 , 0 , P_HIGH , NO_AUTOBIND , 0 },
/* 9 */ {MODE_KN , FEILUN , 0 , P_HIGH , AUTOBIND , 0 },
+=======
+/**********************************************/
+/** Multiprotocol module configuration file ***/
+/**********************************************/
+
+/*******************/
+/*** TX SETTINGS ***/
+/*******************/
+//Modify the channel order based on your TX: AETR, TAER, RETA...
+//Examples: Flysky & DEVO is AETR, JR/Spektrum radio is TAER, Multiplex is AERT...
+//Default is AETR.
+#define AETR
+
+
+/**************************/
+/*** RF CHIPS INSTALLED ***/
+/**************************/
+//There are 4 RF components supported. If one of them is not installed you must comment it using "//".
+//If a chip is not installed all associated protocols are disabled.
+//4-in-1 modules have all RF chips installed
+//!!!If a RF chip is present it MUST be marked as installed!!! or weird things will happen you have been warned.
+#define A7105_INSTALLED
+#define CYRF6936_INSTALLED
+#define CC2500_INSTALLED
+#define NRF24L01_INSTALLED
+
+
+/****************************/
+/*** PROTOCOLS TO INCLUDE ***/
+/****************************/
+//In this section select the protocols you want to be accessible when using the module.
+//All the protocols will not fit in the module so you need to pick and choose.
+//Comment the protocols you are not using with "//" to save Flash space.
+
+//The protocols below need an A7105 to be installed
+#define FLYSKY_A7105_INO
+#define HUBSAN_A7105_INO
+
+//The protocols below need a CYRF6936 to be installed
+#define DEVO_CYRF6936_INO
+#define DSM_CYRF6936_INO
+#define J6PRO_CYRF6936_INO
+
+//The protocols below need a CC2500 to be installed
+#define FRSKYD_CC2500_INO
+#define FRSKYV_CC2500_INO
+#define FRSKYX_CC2500_INO
+#define SFHSS_CC2500_INO
+
+//The protocols below need a NRF24L01 to be installed
+#define BAYANG_NRF24L01_INO
+#define CG023_NRF24L01_INO
+#define CX10_NRF24L01_INO
+#define ESKY_NRF24L01_INO
+#define HISKY_NRF24L01_INO
+#define KN_NRF24L01_INO
+#define SLT_NRF24L01_INO
+#define SYMAX_NRF24L01_INO
+#define V2X2_NRF24L01_INO
+#define YD717_NRF24L01_INO
+#define MT99XX_NRF24L01_INO
+#define MJXQ_NRF24L01_INO
+#define SHENQI_NRF24L01_INO
+#define FY326_NRF24L01_INO
+#define FQ777_NRF24L01_INO
+#define ASSAN_NRF24L01_INO
+#define HONTAI_NRF24L01_INO
+
+
+/**************************/
+/*** TELEMETRY SETTINGS ***/
+/**************************/
+//In this section you can configure the telemetry.
+
+//If you do not plan using the telemetry comment this global setting using "//" and skip to the next section.
+#define TELEMETRY
+
+//Uncomment to invert the polarity of the telemetry serial signal.
+//For ER9X and ERSKY9X it must be commented. For OpenTX it must be uncommented.
+//#define INVERT_TELEMETRY
+
+//Comment a line to disable a protocol telemetry
+#define DSM_TELEMETRY
+#define SPORT_TELEMETRY
+#define HUB_TELEMETRY
+
+
+/****************************/
+/*** SERIAL MODE SETTINGS ***/
+/****************************/
+//In this section you can configure the serial mode.
+//The serial mode enables full editing of all the parameters in the GUI of the radio.
+//This is available natively for ER9X and ERSKY9X. It is available for OpenTX on Taranis with a special version.
+
+//If you do not plan to use the Serial mode comment this line using "//" to save Flash space
+#define ENABLE_SERIAL
+
+
+/*************************/
+/*** PPM MODE SETTINGS ***/
+/*************************/
+//In this section you can configure all details about PPM.
+//If you do not plan to use the PPM mode comment this line using "//" to save Flash space, you don't need to configure anything below in this case
+#define ENABLE_PPM
+
+/*** TX END POINTS ***/
+//It is important for the module to know the endpoints of your radio.
+//Below are some standard transmitters already preconfigured.
+//Uncomment only the one which matches your transmitter.
+#define TX_ER9X //ER9X/ERSKY9X/OpenTX ( 988<->2012µs)
+//#define TX_DEVO7 //DEVO (1120<->1920µs)
+//#define TX_SPEKTRUM //Spektrum (1100<->1900µs)
+//#define TX_HISKY //HISKY (1100<->1900µs)
+//#define TX_MPX //Multiplex MC2020 (1250<->1950µs)
+//#define TX_CUSTOM //Custom
+
+// The lines below are used to set the end points in microseconds (µs) if you have selected TX_CUSTOM.
+// A few things to considered:
+// - If you put too big values compared to your TX you won't be able to reach the extremes which is bad for throttle as an example
+// - If you put too low values you won't be able to use your full stick range, it will be maxed out before reaching the end
+// - Centered stick value is usually 1500. It should match the middle between MIN and MAX, ie Center=(MAX-MIN)/2+MIN. If your TX is not centered you can adjust the value MIN or MAX.
+// - 100% is the value when the model is by default, 125% is the value when you extend the servo travel which is only used by some protocols
+#if defined(TX_CUSTOM)
+ #define PPM_MAX_100 1900 // 100%
+ #define PPM_MIN_100 1100 // 100%
+ #define PPM_MAX_125 2000 // 125%
+ #define PPM_MIN_125 1000 // 125%
+#endif
+
+//The table below indicates which protocol to run when a specific position on the dial has been selected.
+//All fields and values are explained below. Everything is configurable from here like in the Serial mode.
+//Example: You can associate multiple times the same protocol to different dial positions to take advantage of the model match (RX_Num)
+const PPM_Parameters PPM_prot[15]= {
+// Dial Protocol Sub protocol RX_Num Power Auto Bind Option
+/* 1 */ {MODE_FLYSKY, Flysky , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 2 */ {MODE_HUBSAN, 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 3 */ {MODE_FRSKYD, 0 , 0 , P_HIGH , NO_AUTOBIND , 40 }, // option=fine freq tuning
+/* 4 */ {MODE_HISKY , Hisky , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 5 */ {MODE_V2X2 , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 6 */ {MODE_DSM , DSM2_22 , 0 , P_HIGH , NO_AUTOBIND , 6 }, // option=number of channels
+/* 7 */ {MODE_DEVO , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 8 */ {MODE_YD717 , YD717 , 0 , P_HIGH , NO_AUTOBIND , 0 },
+/* 9 */ {MODE_KN , WLTOYS , 0 , P_HIGH , NO_AUTOBIND , 0 },
+>>>>>>> refs/remotes/pascallanger/master
/* 10 */ {MODE_SYMAX , SYMAX , 0 , P_HIGH , NO_AUTOBIND , 0 },
/* 11 */ {MODE_SLT , 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
/* 12 */ {MODE_CX10 , CX10_BLUE , 0 , P_HIGH , NO_AUTOBIND , 0 },
@@ -97,7 +242,11 @@ const PPM_Parameters PPM_prot[15]= {
/* 14 */ {MODE_BAYANG, 0 , 0 , P_HIGH , NO_AUTOBIND , 0 },
/* 15 */ {MODE_SYMAX , SYMAX5C , 0 , P_HIGH , NO_AUTOBIND , 0 }
};
+<<<<<<< HEAD
/* Available protocols and associated sub protocols:
+=======
+/* Available protocols and associated sub protocols to pick and choose from
+>>>>>>> refs/remotes/pascallanger/master
MODE_FLYSKY
Flysky
V9X9
@@ -105,16 +254,28 @@ const PPM_Parameters PPM_prot[15]= {
V912
MODE_HUBSAN
NONE
+<<<<<<< HEAD
MODE_FRSKY
+=======
+ MODE_FRSKYD
+>>>>>>> refs/remotes/pascallanger/master
NONE
MODE_HISKY
Hisky
HK310
MODE_V2X2
NONE
+<<<<<<< HEAD
MODE_DSM2
DSM2
DSMX
+=======
+ MODE_DSM
+ DSM2_22
+ DSM2_11
+ DSMX_22
+ DSMX_11
+>>>>>>> refs/remotes/pascallanger/master
MODE_DEVO
NONE
MODE_YD717
@@ -147,18 +308,28 @@ const PPM_Parameters PPM_prot[15]= {
MODE_BAYANG
NONE
MODE_FRSKYX
+<<<<<<< HEAD
NONE
+=======
+ CH_16
+ CH_8
+>>>>>>> refs/remotes/pascallanger/master
MODE_ESKY
NONE
MODE_MT99XX
MT99
H7
YZ
+<<<<<<< HEAD
+=======
+ LS
+>>>>>>> refs/remotes/pascallanger/master
MODE_MJXQ
WLH08
X600
X800
H26D
+<<<<<<< HEAD
MODE_SHENQI
NONE
MODE_FY326
@@ -267,3 +438,38 @@ enum chan_orders{
//Uncoment the desired serial speed
#define BAUD 100000
//#define BAUD 125000
+=======
+ E010
+ MODE_SHENQI
+ NONE
+ MODE_FY326
+ NONE
+ MODE_SFHSS
+ NONE
+ MODE_J6PRO
+ NONE
+ MODE_FQ777
+ NONE
+ MODE_ASSAN
+ NONE
+ MODE_FRSKYV
+ NONE
+ MODE_HONTAI
+ FORMAT_HONTAI
+ FORMAT_JJRCX1
+ FORMAT_X5C1
+*/
+
+// RX_Num is used for model match. Using RX_Num values different for each receiver will prevent starting a model with the false config loaded...
+// RX_Num value is between 0 and 15.
+
+// Power P_HIGH or P_LOW: High or low power setting for the transmission.
+// For indoor P_LOW is more than enough.
+
+// Auto Bind AUTOBIND or NO_AUTOBIND
+// For protocols which does not require binding at each power up (like Flysky, FrSky...), you might still want a bind to be initiated each time you power up the TX.
+// As an exxample, it's usefull for the WLTOYS F929/F939/F949/F959 (all using the Flysky protocol) which requires a bind at each power up.
+
+// Option: the value is between -127 and +127.
+// The option value is only valid for some protocols, read this page for more information: https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Protocols_Details.md
+>>>>>>> refs/remotes/pascallanger/master
diff --git a/Multiprotocol/iface_nrf24l01.h b/Multiprotocol/iface_nrf24l01.h
index 92ff9e1..6aab6c1 100644
--- a/Multiprotocol/iface_nrf24l01.h
+++ b/Multiprotocol/iface_nrf24l01.h
@@ -103,6 +103,13 @@ enum {
//#define NOP 0xFF
// XN297 emulation layer
+<<<<<<< HEAD
#define XN297_UNSCRAMBLED 8
+=======
+enum {
+ XN297_UNSCRAMBLED = 0,
+ XN297_SCRAMBLED
+};
+>>>>>>> refs/remotes/pascallanger/master
#endif
\ No newline at end of file
diff --git a/Multiprotocol/multiprotocol.h b/Multiprotocol/multiprotocol.h
index 12883c3..672b922 100644
--- a/Multiprotocol/multiprotocol.h
+++ b/Multiprotocol/multiprotocol.h
@@ -14,8 +14,13 @@
*/
// Check selected board type
-#if F_CPU != 16000000L || not defined(__AVR_ATmega328P__)
- #error You must select the processor type "ATmega328(5V, 16MHz)"
+#ifndef XMEGA
+ #if not defined(ARDUINO_AVR_PRO) && not defined(ARDUINO_AVR_MINI) && not defined(ARDUINO_AVR_NANO)
+ #error You must select the board type "Arduino Pro or Pro Mini" or "Arduino Mini"
+ #endif
+ #if F_CPU != 16000000L || not defined(__AVR_ATmega328P__)
+ #error You must select the processor type "ATmega328(5V, 16MHz)"
+ #endif
#endif
//******************
@@ -23,133 +28,116 @@
//******************
enum PROTOCOLS
{
- MODE_HM830=40, // =>NRF24L01
- MODE_CFLIE=41, // =>NRF24L01
- MODE_JOYSWAY = 42, // =>A7105
- MODE_J6PRO = 43, // =>CYRF6936
- MODE_H377=44, // =>NRF24L01
- MODE_WK2x01 = 45, // =>CYRF6936
- MODE_ESKY150=46, // =>NRF24L01
- MODE_BlueFly=47, // =>NRF24L01
- MODE_HonTai=48, // =>NRF24L01
- MODE_UDI=49, // =>NRF24L01
- MODE_NE260=50, // =>NRF24L01
- MODE_FBL100=51, // =>NRF24L01
- MODE_SKYARTEC=52, // =>CC2500
-
- MODE_SERIAL = 0, // Serial commands
- MODE_FLYSKY = 1, // =>A7105
- MODE_HUBSAN = 2, // =>A7105
- MODE_FRSKY = 3, // =>CC2500
- MODE_HISKY = 4, // =>NRF24L01
- MODE_V2X2 = 5, // =>NRF24L01
- MODE_DSM2 = 6, // =>CYRF6936
- MODE_DEVO =7, // =>CYRF6936
- MODE_YD717 = 8, // =>NRF24L01
- MODE_KN = 9, // =>NRF24L01
- MODE_SYMAX = 10, // =>NRF24L01
- MODE_SLT = 11, // =>NRF24L01
- MODE_CX10 = 12, // =>NRF24L01
- MODE_CG023 = 13, // =>NRF24L01
- MODE_BAYANG = 14, // =>NRF24L01
- MODE_FRSKYX = 15, // =>CC2500
- MODE_ESKY = 16, // =>NRF24L01
- MODE_MT99XX=17, // =>NRF24L01
- MODE_MJXQ=18, // =>NRF24L01
- MODE_SHENQI=19, // =>NRF24L01
- MODE_FY326=20 // =>NRF24L01
+ MODE_SERIAL = 0, // Serial commands
+ MODE_FLYSKY = 1, // =>A7105
+ MODE_HUBSAN = 2, // =>A7105
+ MODE_FRSKYD = 3, // =>CC2500
+ MODE_HISKY = 4, // =>NRF24L01
+ MODE_V2X2 = 5, // =>NRF24L01
+ MODE_DSM = 6, // =>CYRF6936
+ MODE_DEVO = 7, // =>CYRF6936
+ MODE_YD717 = 8, // =>NRF24L01
+ MODE_KN = 9, // =>NRF24L01
+ MODE_SYMAX = 10, // =>NRF24L01
+ MODE_SLT = 11, // =>NRF24L01
+ MODE_CX10 = 12, // =>NRF24L01
+ MODE_CG023 = 13, // =>NRF24L01
+ MODE_BAYANG = 14, // =>NRF24L01
+ MODE_FRSKYX = 15, // =>CC2500
+ MODE_ESKY = 16, // =>NRF24L01
+ MODE_MT99XX = 17, // =>NRF24L01
+ MODE_MJXQ = 18, // =>NRF24L01
+ MODE_SHENQI = 19, // =>NRF24L01
+ MODE_FY326 = 20, // =>NRF24L01
+ MODE_SFHSS = 21, // =>CC2500
+ MODE_J6PRO = 22, // =>CYRF6936
+ MODE_FQ777 = 23, // =>NRF24L01
+ MODE_ASSAN = 24, // =>NRF24L01
+ MODE_FRSKYV = 25, // =>CC2500
+ MODE_HONTAI = 26, // =>NRF24L01
+ MODE_OPENLRS = 27, // =>OpenLRS hardware
};
+
enum Flysky
{
- Flysky=0,
- V9X9=1,
- V6X6=2,
- V912=3
+ Flysky = 0,
+ V9X9 = 1,
+ V6X6 = 2,
+ V912 = 3
};
enum Hisky
{
- Hisky=0,
- HK310=1
+ Hisky = 0,
+ HK310 = 1
};
-enum DSM2{
- DSM2=0,
- DSMX=1
+enum DSM
+{
+ DSM2_22 = 0,
+ DSM2_11 = 1,
+ DSMX_22 = 2,
+ DSMX_11 = 3,
+ DSM_AUTO = 4
};
enum YD717
{
- YD717=0,
- SKYWLKR=1,
- SYMAX4=2,
- XINXUN=3,
- NIHUI=4
+ YD717 = 0,
+ SKYWLKR = 1,
+ SYMAX4 = 2,
+ XINXUN = 3,
+ NIHUI = 4
};
enum KN
{
- WLTOYS=0,
- FEILUN=1
+ WLTOYS = 0,
+ FEILUN = 1
};
enum SYMAX
{
- SYMAX=0,
- SYMAX5C=1
+ SYMAX = 0,
+ SYMAX5C = 1
};
enum CX10
{
- CX10_GREEN = 0,
- CX10_BLUE=1, // also compatible with CX10-A, CX12
- DM007=2,
- Q282=3,
- JC3015_1=4,
- JC3015_2=5,
- MK33041=6,
- Q242=7
+ CX10_GREEN = 0,
+ CX10_BLUE = 1, // also compatible with CX10-A, CX12
+ DM007 = 2,
+ Q282 = 3,
+ JC3015_1 = 4,
+ JC3015_2 = 5,
+ MK33041 = 6,
+ Q242 = 7
};
enum CG023
{
- CG023 = 0,
- YD829 = 1,
- H8_3D = 2
+ CG023 = 0,
+ YD829 = 1,
+ H8_3D = 2
};
enum MT99XX
{
MT99 = 0,
H7 = 1,
- YZ = 2
+ YZ = 2,
+ LS = 3
};
enum MJXQ
{
WLH08 = 0,
X600 = 1,
X800 = 2,
- H26D = 3
+ H26D = 3,
+ E010 = 4
};
-
-enum WK2X01
+enum FRSKYX
{
- WK2801 = 0,
- WK2601 = 1,
- WK2401 = 2
-};
-enum FY326
-{
- FY326 = 0,
- FY319 = 1
+ CH_16 = 0,
+ CH_8 = 1,
};
enum HONTAI
{
- HONTAI = 0,
- JJRCX1 = 1
-};
-enum UDI
-{
- U816_V1 = 0,
- U816_V2,
- U839_2014
-};
-enum FBL100
-{
- FBL100 = 0,
- HP100
+ FORMAT_HONTAI = 0,
+ FORMAT_JJRCX1 = 1,
+ FORMAT_X5C1 = 2
};
#define NONE 0
@@ -160,7 +148,7 @@ enum FBL100
struct PPM_Parameters
{
- uint8_t protocol : 5;
+ uint8_t protocol : 6;
uint8_t sub_proto : 3;
uint8_t rx_num : 4;
uint8_t power : 1;
@@ -168,83 +156,39 @@ struct PPM_Parameters
uint8_t option;
};
-//*******************
-//*** Pinouts ***
-//*******************
-//#define BIND_pin 13
-#define LED_pin 13 //Promini original led on B5
-//
-#define PPM_pin 3 //PPM -D3
-#define SDI_pin 5 //SDIO-D5
-#define SCLK_pin 4 //SCK-D4
-#define CS_pin 2 //CS-D2
-#define SDO_pin 6 //D6
-//
-#define CTRL1 1 //C1 (A1)
-#define CTRL2 2 //C2 (A2)
-//
-#define CTRL1_on PORTC |= _BV(1)
-#define CTRL1_off PORTC &= ~_BV(1)
-//
-#define CTRL2_on PORTC |= _BV(2)
-#define CTRL2_off PORTC &= ~_BV(2)
-//
-#define CS_on PORTD |= _BV(2) //D2
-#define CS_off PORTD &= ~_BV(2) //D2
-//
-#define SCK_on PORTD |= _BV(4) //D4
-#define SCK_off PORTD &= ~_BV(4) //D4
-//
-#define SDI_on PORTD |= _BV(5) //D5
-#define SDI_off PORTD &= ~_BV(5) //D5
-
-#define SDI_1 (PIND & (1< Reserved 0
Flysky 1
Hubsan 2
- Frsky 3
+ FrskyD 3
Hisky 4
V2x2 5
- DSM2 6
+ DSM 6
Devo 7
YD717 8
KN 9
@@ -463,6 +402,13 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
MJXQ 18
SHENQI 19
FY326 20
+ SFHSS 21
+ J6PRO 22
+ FQ777 23
+ ASSAN 24
+ FrskyV 25
+ HONTAI 26
+ OpenLRS 27
BindBit=> 0x80 1=Bind/0=No
AutoBindBit=> 0x40 1=Yes /0=No
RangeCheck=> 0x20 1=Yes /0=No
@@ -470,28 +416,30 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
RxNum value is 0..15 (bits 0..3)
Type is 0..7 <<4 (bit 4..6)
sub_protocol==Flysky
- Flysky 0
- V9x9 1
- V6x6 2
- V912 3
+ Flysky 0
+ V9x9 1
+ V6x6 2
+ V912 3
sub_protocol==Hisky
- Hisky 0
- HK310 1
- sub_protocol==DSM2
- DSM2 0
- DSMX 1
+ Hisky 0
+ HK310 1
+ sub_protocol==DSM
+ DSM2_22 0
+ DSM2_11 1
+ DSMX_22 2
+ DSMX_11 3
sub_protocol==YD717
- YD717 0
- SKYWLKR 1
- SYMAX4 2
- XINXUN 3
- NIHUI 4
+ YD717 0
+ SKYWLKR 1
+ SYMAX4 2
+ XINXUN 3
+ NIHUI 4
sub_protocol==KN
- WLTOYS 0
- FEILUN 1
+ WLTOYS 0
+ FEILUN 1
sub_protocol==SYMAX
- SYMAX 0
- SYMAX5C 1
+ SYMAX 0
+ SYMAX5C 1
sub_protocol==CX10
CX10_GREEN 0
CX10_BLUE 1 // also compatible with CX10-A, CX12
@@ -509,14 +457,20 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
MT99 0
H7 1
YZ 2
+ LS 3
sub_protocol==MJXQ
WLH08 0
X600 1
X800 2
H26D 3
- sub_protocol==FY326
- FY326 0
- FY319 1
+ E010 4
+ sub_protocol==FRSKYX
+ CH_16 0
+ CH_8 1
+ sub_protocol==HONTAI
+ FORMAT_HONTAI 0
+ FORMAT_JJRCX1 1
+ FORMAT_X5C1 2
Power value => 0x80 0=High/1=Low
Stream[3] = option_protocol;
option_protocol value is -127..127
@@ -529,4 +483,3 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
2047 +125%
Channels bits are concatenated to fit in 22 bytes like in SBUS protocol
*/
-
diff --git a/PCB v2.3d/Multipro-txV2-3d-cache.lib b/PCB v2.3d/Multipro-txV2-3d-cache.lib
new file mode 100644
index 0000000..907ee9d
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d-cache.lib
@@ -0,0 +1,412 @@
+EESchema-LIBRARY Version 2.3 Date: 05/02/2016 16:56:43
+#encoding utf-8
+#
+# +5V
+#
+DEF +5V #PWR 0 40 Y Y 1 F P
+F0 "#PWR" 0 90 20 H I C CNN
+F1 "+5V" 0 90 30 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+X +5V 1 0 0 0 U 20 20 0 0 W N
+C 0 50 20 0 1 0 N
+P 4 0 1 0 0 0 0 30 0 30 0 30 N
+ENDDRAW
+ENDDEF
+#
+# +BATT
+#
+DEF +BATT #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 -50 20 H I C CNN
+F1 "+BATT" 0 100 30 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+X +BATT 1 0 0 0 U 20 20 0 0 w N
+C 0 60 20 0 1 0 N
+P 3 0 1 0 0 0 0 40 0 40 N
+ENDDRAW
+ENDDEF
+#
+# 3V3
+#
+DEF 3V3 #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 100 40 H I C CNN
+F1 "3V3" 0 125 40 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+X 3V3 1 0 0 0 U 30 30 0 0 W N
+P 2 0 1 0 0 60 0 0 N
+P 6 0 1 0 0 60 20 40 0 90 -20 40 0 60 0 60 N
+ENDDRAW
+ENDDEF
+#
+# A7105
+#
+DEF A7105 U 0 40 Y Y 1 F N
+F0 "U" 500 650 60 H V C CNN
+F1 "A7105" 0 800 60 H V C CNN
+F2 "~" 0 -400 60 H V C CNN
+F3 "~" 0 -400 60 H V C CNN
+DRAW
+S 400 -800 -350 700 0 1 0 N
+X 3V3 1 -650 550 300 R 70 70 1 1 I
+X SCS 2 -650 400 300 R 70 70 1 1 I
+X GND 3 -650 250 300 R 70 70 1 1 I
+X SCK 4 -650 100 300 R 70 70 1 1 I
+X SDIO 5 -650 -50 300 R 70 70 1 1 I
+X GIO1 6 -650 -200 300 R 70 70 1 1 I
+X GIO2 7 -650 -350 300 R 70 70 1 1 O
+X RXEN 8 -650 -500 300 R 70 70 1 1 I
+X TXEN 9 -650 -650 300 R 70 70 1 1 O
+ENDDRAW
+ENDDEF
+#
+# ATMEGA168A-A
+#
+DEF ATMEGA168A-A IC 0 40 Y Y 1 F N
+F0 "IC" -750 1250 40 H V L BNN
+F1 "ATMEGA168A-A" 400 -1400 40 H V L BNN
+F2 "TQFP32" 0 0 30 H V C CIN
+F3 "~" 0 0 60 H V C CNN
+ALIAS ATMEGA48A-A ATMEGA48PA-A ATMEGA88A-A ATMEGA88PA-A ATMEGA168PA-A ATMEGA328-A ATMEGA328P-A
+DRAW
+S -750 1200 850 -1300 0 1 10 f
+X (PCINT19/OC2B/INT1)PD3 1 1000 -800 150 L 40 40 1 1 B
+X (PCINT20/XCK/T0)PD4 2 1000 -900 150 L 40 40 1 1 B
+X GND 3 -900 -1200 150 R 40 40 1 1 W
+X VCC 4 -900 1100 150 R 40 40 1 1 W
+X GND 5 -900 -1100 150 R 40 40 1 1 W
+X VCC 6 -900 1000 150 R 40 40 1 1 W
+X (PCINT6/XTAL1/TOSC1)PB6 7 1000 500 150 L 40 40 1 1 B
+X (PCINT7/XTAL2/TOSC2)PB7 8 1000 400 150 L 40 40 1 1 B
+X (PCINT21/OC0B/T1)PD5 9 1000 -1000 150 L 40 40 1 1 B
+X (PCINT22/OC0A/AIN0)PD6 10 1000 -1100 150 L 40 40 1 1 B
+X AREF 20 -900 500 150 R 40 40 1 1 B
+X (PCINT16/RXD)PD0 30 1000 -500 150 L 40 40 1 1 B
+X (PCINT23/AIN1)PD7 11 1000 -1200 150 L 40 40 1 1 B
+X GND 21 -900 -1000 150 R 40 40 1 1 W
+X (PCINT17/TXD)PD1 31 1000 -600 150 L 40 40 1 1 B
+X (PCINT0/CLKO/ICP1)PB0 12 1000 1100 150 L 40 40 1 1 B
+X ADC7 22 -900 -350 150 R 40 40 1 1 N
+X (PCINT18/INT0)PD2 32 1000 -700 150 L 40 40 1 1 B
+X (PCINT1/OC1A)PB1 13 1000 1000 150 L 40 40 1 1 B
+X (PCINT8/ADC0)PC0 23 1000 250 150 L 40 40 1 1 B
+X (PCINT2/OC1B/~SS~)PB2 14 1000 900 150 L 40 40 1 1 B
+X (PCINT9/ADC1)PC1 24 1000 150 150 L 40 40 1 1 B
+X (PCINT3/OC2A/MOSI)PB3 15 1000 800 150 L 40 40 1 1 B
+X (PCINT10/ADC2)PC2 25 1000 50 150 L 40 40 1 1 B
+X (PCINT4/MISO)PB4 16 1000 700 150 L 40 40 1 1 B
+X (PCINT11/ADC3)PC3 26 1000 -50 150 L 40 40 1 1 B
+X (PCINT5/SCK)PB5 17 1000 600 150 L 40 40 1 1 B
+X (PCINT12/SDA/ADC4)PC4 27 1000 -150 150 L 40 40 1 1 B
+X AVCC 18 -900 800 150 R 40 40 1 1 W
+X (PCINT14/SCL/ADC5)PC5 28 1000 -250 150 L 40 40 1 1 B
+X ADC6 19 -900 -250 150 R 40 40 1 1 N
+X (PCINT14/~RESET~)PC6 29 1000 -350 150 L 40 40 1 1 B
+ENDDRAW
+ENDDEF
+#
+# C
+#
+DEF C C 0 10 N Y 1 F N
+F0 "C" 0 100 40 H V L CNN
+F1 "C" 6 -85 40 H V L CNN
+F2 "~" 38 -150 30 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+$FPLIST
+ SM*
+ C?
+ C1-1
+$ENDFPLIST
+DRAW
+P 2 0 1 20 -80 -30 80 -30 N
+P 2 0 1 20 -80 30 80 30 N
+X ~ 1 0 200 170 D 40 40 1 1 P
+X ~ 2 0 -200 170 U 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+# CC2500
+#
+DEF CC2500 U 0 40 Y Y 1 F N
+F0 "U" 500 600 60 H V C CNN
+F1 "CC2500" 0 700 60 H V C CNN
+F2 "~" 0 -400 60 H V C CNN
+F3 "~" 0 -400 60 H V C CNN
+DRAW
+S 400 -900 -350 650 0 1 0 N
+X 3V3 1 -650 550 300 R 70 70 1 1 I
+X SI 2 -650 400 300 R 70 70 1 1 I
+X SCLK 3 -650 250 300 R 70 70 1 1 I
+X SO 4 -650 100 300 R 70 70 1 1 I
+X GDO2 5 -650 -50 300 R 70 70 1 1 I
+X GND 6 -650 -200 300 R 70 70 1 1 I
+X GDOo 7 -650 -350 300 R 70 70 1 1 I
+X CSn 8 -650 -500 300 R 70 70 1 1 I
+X PA_EN 9 -650 -650 300 R 70 70 1 1 I
+X LNA_EN 10 -650 -800 300 R 70 70 1 1 I
+ENDDRAW
+ENDDEF
+#
+# CONN_2
+#
+DEF CONN_2 P 0 40 Y N 1 F N
+F0 "P" -50 0 40 V V C CNN
+F1 "CONN_2" 50 0 40 V V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+S -100 150 100 -150 0 1 0 N
+X P1 1 -350 100 250 R 60 60 1 1 P I
+X PM 2 -350 -100 250 R 60 60 1 1 P I
+ENDDRAW
+ENDDEF
+#
+# CONN_3X2
+#
+DEF CONN_3X2 P 0 40 Y N 1 F N
+F0 "P" 0 250 50 H V C CNN
+F1 "CONN_3X2" 0 50 40 V V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+S -100 200 100 -100 0 1 0 N
+X 1 1 -400 150 300 R 60 60 1 1 P I
+X 2 2 400 150 300 L 60 60 1 1 P I
+X 3 3 -400 50 300 R 60 60 1 1 P I
+X 4 4 400 50 300 L 60 60 1 1 P I
+X 5 5 -400 -50 300 R 60 60 1 1 P I
+X 6 6 400 -50 300 L 60 60 1 1 P I
+ENDDRAW
+ENDDEF
+#
+# CONN_5
+#
+DEF CONN_5 P 0 40 Y Y 1 F N
+F0 "P" -50 0 50 V V C CNN
+F1 "CONN_5" 50 0 50 V V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+S -100 250 100 -250 0 1 0 f
+X ~ 1 -400 200 300 R 60 60 1 1 P I
+X ~ 2 -400 100 300 R 60 60 1 1 P I
+X ~ 3 -400 0 300 R 60 60 1 1 P I
+X ~ 4 -400 -100 300 R 60 60 1 1 P I
+X ~ 5 -400 -200 300 R 60 60 1 1 P I
+ENDDRAW
+ENDDEF
+#
+# CP1
+#
+DEF CP1 C 0 10 N N 1 F N
+F0 "C" 50 100 50 H V L CNN
+F1 "CP1" 50 -100 50 H V L CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+$FPLIST
+ CP*
+ SM*
+$ENDFPLIST
+DRAW
+T 0 -50 100 80 0 0 0 + Normal 0 C C
+A 0 -200 180 563 1236 0 1 15 N 100 -50 -100 -50
+P 4 0 1 15 -100 50 100 50 50 50 50 50 N
+X ~ 1 0 200 150 D 40 40 1 1 P
+X ~ 2 0 -200 180 U 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+# CRYSTAL
+#
+DEF CRYSTAL X 0 40 N N 1 F N
+F0 "X" 0 150 60 H V C CNN
+F1 "CRYSTAL" 0 -150 60 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+P 2 0 1 16 -100 100 -100 -100 N
+P 2 0 1 16 100 100 100 -100 N
+P 5 0 1 12 -50 50 50 50 50 -50 -50 -50 -50 50 f
+X 1 1 -300 -50 200 R 40 40 1 1 P
+X 2 2 -300 50 200 R 40 40 1 1 P
+X 3 3 300 50 200 L 40 40 1 1 P
+X 4 4 300 -50 200 L 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+# CYRF6936
+#
+DEF CYRF6936 U 0 40 Y Y 1 F N
+F0 "U" 0 1000 60 H V C CNN
+F1 "CYRF6936" 0 800 60 H V C CNN
+F2 "~" 0 -400 60 H V C CNN
+F3 "~" 0 -400 60 H V C CNN
+DRAW
+S 400 -800 -350 700 0 1 0 N
+X 5.0V 1 -650 500 300 R 70 70 1 1 I
+X NCS 2 -650 350 300 R 70 70 1 1 I
+X SCK 4 -650 200 300 R 70 70 1 1 I
+X GND 5 -650 50 300 R 70 70 1 1 I
+X GND 6 -650 -100 300 R 70 70 1 1 I
+X MOSI 8 -650 -250 300 R 70 70 1 1 I
+X RST 9 -650 -400 300 R 70 70 1 1 I
+X MISO 10 -650 -600 300 R 70 70 1 1 I
+ENDDRAW
+ENDDEF
+#
+# GND
+#
+DEF ~GND #PWR 0 0 Y Y 1 F P
+F0 "#PWR" 0 0 30 H I C CNN
+F1 "GND" 0 -70 30 H I C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N
+X GND 1 0 0 0 U 30 30 1 1 W N
+ENDDRAW
+ENDDEF
+#
+# HEX_DIP
+#
+DEF HEX_DIP SW 0 40 Y Y 1 F N
+F0 "SW" 0 -350 60 H V C CNN
+F1 "HEX_DIP" 0 350 60 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+S -200 250 200 -250 0 1 0 N
+P 4 0 1 0 50 50 -50 0 50 -100 50 50 F
+X 1 1 500 -150 300 L 50 50 1 1 O
+X C 2 500 0 300 L 50 50 1 1 P
+X 4 3 500 150 300 L 50 50 1 1 O
+X 2 4 -500 150 300 R 50 50 1 1 O
+X C 5 -500 0 300 R 50 50 1 1 P
+X 8 6 -500 -150 300 R 50 50 1 1 O
+ENDDRAW
+ENDDEF
+#
+# JUMPER
+#
+DEF JUMPER JP 0 30 Y N 1 F N
+F0 "JP" 0 150 60 H V C CNN
+F1 "JUMPER" 0 -80 40 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+A 0 -26 125 1426 373 0 1 0 N -98 50 99 50
+C -100 0 35 0 1 0 N
+C 100 0 35 0 1 0 N
+X 1 1 -300 0 165 R 60 60 0 1 P
+X 2 2 300 0 165 L 60 60 0 1 P
+ENDDRAW
+ENDDEF
+#
+# LED
+#
+DEF LED D 0 40 Y N 1 F N
+F0 "D" 0 100 50 H V C CNN
+F1 "LED" 0 -100 50 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+$FPLIST
+ LED-3MM
+ LED-5MM
+ LED-10MM
+ LED-0603
+ LED-0805
+ LED-1206
+ LEDV
+$ENDFPLIST
+DRAW
+P 2 0 1 0 50 50 50 -50 N
+P 3 0 1 0 -50 50 50 0 -50 -50 F
+P 3 0 1 0 65 -40 110 -80 105 -55 N
+P 3 0 1 0 80 -25 125 -65 120 -40 N
+X A 1 -200 0 150 R 40 40 1 1 P
+X K 2 200 0 150 L 40 40 1 1 P
+ENDDRAW
+ENDDEF
+#
+# NCP1117ST50T3G
+#
+DEF NCP1117ST50T3G U 0 30 Y Y 1 F N
+F0 "U" 150 -196 40 H V C CNN
+F1 "NCP1117ST50T3G" 0 200 40 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+ALIAS NCP1117ST12T3G NCP1117ST15T3G NCP1117ST18T3G NCP1117ST20T3G NCP1117ST25T3G NCP1117ST285T3G NCP1117ST33T3G
+$FPLIST
+ SOT223
+$ENDFPLIST
+DRAW
+S -250 -150 250 150 0 1 10 f
+X GND 1 0 -250 100 U 40 40 1 1 W
+X VO 2 400 50 150 L 40 40 1 1 w
+X VI 3 -400 50 150 R 40 40 1 1 W
+ENDDRAW
+ENDDEF
+#
+# NRF24L01
+#
+DEF NRF24L01 U 0 40 Y Y 1 F N
+F0 "U" 500 650 60 H V C CNN
+F1 "NRF24L01" 0 800 60 H V C CNN
+F2 "~" 0 -400 60 H V C CNN
+F3 "~" 0 -400 60 H V C CNN
+DRAW
+S 400 -650 -350 700 0 1 0 N
+X GND 1 -650 550 300 R 70 70 1 1 I
+X 3V3 2 -650 400 300 R 70 70 1 1 I
+X CE 3 -650 250 300 R 70 70 1 1 I
+X CSN 4 -650 100 300 R 70 70 1 1 I
+X SCK 5 -650 -50 300 R 70 70 1 1 I
+X MOSI 6 -650 -200 300 R 70 70 1 1 I
+X MISO 7 -650 -350 300 R 70 70 1 1 I
+X IRQ 8 -650 -500 300 R 70 70 1 1 N
+ENDDRAW
+ENDDEF
+#
+# R
+#
+DEF R R 0 0 N Y 1 F N
+F0 "R" 80 0 40 V V C CNN
+F1 "R" 7 1 40 V V C CNN
+F2 "~" -70 0 30 V V C CNN
+F3 "~" 0 0 30 H V C CNN
+$FPLIST
+ R?
+ SM0603
+ SM0805
+ R?-*
+ SM1206
+$ENDFPLIST
+DRAW
+S -40 150 40 -150 0 1 12 N
+X ~ 1 0 250 100 D 60 60 1 1 P
+X ~ 2 0 -250 100 U 60 60 1 1 P
+ENDDRAW
+ENDDEF
+#
+# SW_PUSH_4_Pin
+#
+DEF SW_PUSH_4_Pin SW 0 40 N N 1 F N
+F0 "SW" 150 110 50 H V C CNN
+F1 "SW_PUSH_4_Pin" 0 -200 50 H V C CNN
+F2 "~" 0 0 60 H V C CNN
+F3 "~" 0 0 60 H V C CNN
+DRAW
+S -170 50 170 60 0 1 0 N
+P 4 0 1 0 -40 60 -30 90 30 90 40 60 N
+X 1 1 -300 0 200 R 60 60 0 1 P I
+X 3 3 300 0 200 L 60 60 0 1 P I
+X 2 2 -300 -100 200 R 50 50 1 1 I I
+X 4 4 300 -100 200 L 50 50 1 1 I I
+ENDDRAW
+ENDDEF
+#
+#End Library
diff --git a/PCB v2.3d/Multipro-txV2-3d.cmp b/PCB v2.3d/Multipro-txV2-3d.cmp
new file mode 100644
index 0000000..f43c236
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d.cmp
@@ -0,0 +1,248 @@
+Cmp-Mod V01 Created by CvPcb (2013-07-07 BZR 4022)-stable date = 05/02/2016 14:40:56
+
+BeginCmp
+TimeStamp = /53C2AE5B;
+Reference = C1;
+ValeurCmp = 22uF;
+IdModule = c_tant_B;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC5DA8;
+Reference = C2;
+ValeurCmp = 0.1uF;
+IdModule = SM0603_Capa;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2AE76;
+Reference = C3;
+ValeurCmp = 22uF;
+IdModule = c_tant_B;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC62F4;
+Reference = C4;
+ValeurCmp = 18pF;
+IdModule = SM0603_Capa;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC631E;
+Reference = C5;
+ValeurCmp = 18pF;
+IdModule = SM0603_Capa;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2B150;
+Reference = C6;
+ValeurCmp = 22uF;
+IdModule = c_tant_B;
+EndCmp
+
+BeginCmp
+TimeStamp = /54845FE2;
+Reference = C7;
+ValeurCmp = 0.1uF;
+IdModule = SM0603_Capa;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC617C;
+Reference = D1;
+ValeurCmp = LED;
+IdModule = LED-0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2D9F8;
+Reference = D2;
+ValeurCmp = LED;
+IdModule = LED-0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC5C99;
+Reference = IC1;
+ValeurCmp = ATMEGA328-A;
+IdModule = TQFP32;
+EndCmp
+
+BeginCmp
+TimeStamp = /53FE5887;
+Reference = JP1;
+ValeurCmp = JUMPER;
+IdModule = c_0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /53FE5896;
+Reference = JP2;
+ValeurCmp = JUMPER;
+IdModule = c_0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4E4E1;
+Reference = JP3;
+ValeurCmp = JUMPER;
+IdModule = c_0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4EFD5;
+Reference = JP4;
+ValeurCmp = JUMPER;
+IdModule = c_0603;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2DBCC;
+Reference = P1;
+ValeurCmp = ISP;
+IdModule = pin_array_3x2;
+EndCmp
+
+BeginCmp
+TimeStamp = /53FE5423;
+Reference = P2;
+ValeurCmp = CONN_5;
+IdModule = MOLEX_4455_N2X5;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4E4CA;
+Reference = P3;
+ValeurCmp = CONN_2;
+IdModule = PIN_ARRAY_2X1;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC5FEA;
+Reference = R1;
+ValeurCmp = 10K;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2B990;
+Reference = R2;
+ValeurCmp = 2K2;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2B99F;
+Reference = R3;
+ValeurCmp = 1K;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC6125;
+Reference = R4;
+ValeurCmp = 1K;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2B787;
+Reference = R5;
+ValeurCmp = 2K2;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2D8C4;
+Reference = R6;
+ValeurCmp = 1K;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /54DCE006;
+Reference = R7;
+ValeurCmp = 2K2;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4E6D8;
+Reference = R8;
+ValeurCmp = 470;
+IdModule = SM0603_Resistor;
+EndCmp
+
+BeginCmp
+TimeStamp = /54394777;
+Reference = SW1;
+ValeurCmp = HEX_DIP;
+IdModule = DIP-6__300;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4EC6E;
+Reference = SW2;
+ValeurCmp = BIND;
+IdModule = SW_PUSH_6x4.5MM;
+EndCmp
+
+BeginCmp
+TimeStamp = /56B4EC7B;
+Reference = SW3;
+ValeurCmp = RESET;
+IdModule = Switch_SMT5mm;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2ACE9;
+Reference = U1;
+ValeurCmp = NCP1117ST50T3G;
+IdModule = SOT223;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2AD08;
+Reference = U2;
+ValeurCmp = NCP1117ST33T3G;
+IdModule = SOT223;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2BF57;
+Reference = U3;
+ValeurCmp = CYRF6936;
+IdModule = CYRF6936;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2C184;
+Reference = U4;
+ValeurCmp = A7105;
+IdModule = XL7105-D03B;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2C24E;
+Reference = U5;
+ValeurCmp = NRF24L01;
+IdModule = NRF24L01;
+EndCmp
+
+BeginCmp
+TimeStamp = /53C2C3F4;
+Reference = U6;
+ValeurCmp = CC2500;
+IdModule = header_10_2mm;
+EndCmp
+
+BeginCmp
+TimeStamp = /53BC62D3;
+Reference = X1;
+ValeurCmp = 16MHz;
+IdModule = crystal_FA238-TSX3225;
+EndCmp
+
+EndListe
diff --git a/PCB v2.3d/Multipro-txV2-3d.kicad_pcb b/PCB v2.3d/Multipro-txV2-3d.kicad_pcb
new file mode 100644
index 0000000..9e0c533
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d.kicad_pcb
@@ -0,0 +1,3253 @@
+(kicad_pcb (version 3) (host pcbnew "(2013-07-07 BZR 4022)-stable")
+
+ (general
+ (links 101)
+ (no_connects 0)
+ (area 105.584144 58.5 183.200001 116.700001)
+ (thickness 1.6)
+ (drawings 18)
+ (tracks 492)
+ (zones 0)
+ (modules 38)
+ (nets 39)
+ )
+
+ (page A)
+ (layers
+ (15 F.Cu signal)
+ (0 B.Cu signal)
+ (16 B.Adhes user)
+ (17 F.Adhes user)
+ (18 B.Paste user)
+ (19 F.Paste user)
+ (20 B.SilkS user)
+ (21 F.SilkS user)
+ (22 B.Mask user)
+ (23 F.Mask user)
+ (24 Dwgs.User user)
+ (25 Cmts.User user)
+ (26 Eco1.User user)
+ (27 Eco2.User user)
+ (28 Edge.Cuts user)
+ )
+
+ (setup
+ (last_trace_width 0.254)
+ (user_trace_width 0.4)
+ (user_trace_width 0.6)
+ (user_trace_width 1)
+ (trace_clearance 0.254)
+ (zone_clearance 0.25)
+ (zone_45_only no)
+ (trace_min 0.254)
+ (segment_width 0.4)
+ (edge_width 0.1)
+ (via_size 0.889)
+ (via_drill 0.635)
+ (via_min_size 0.254)
+ (via_min_drill 0.127)
+ (user_via 0.254 0.127)
+ (user_via 0.381 0.254)
+ (uvia_size 0.254)
+ (uvia_drill 0.127)
+ (uvias_allowed yes)
+ (uvia_min_size 0.254)
+ (uvia_min_drill 0.127)
+ (pcb_text_width 0.3)
+ (pcb_text_size 1.5 1.5)
+ (mod_edge_width 0.15)
+ (mod_text_size 1 1)
+ (mod_text_width 0.15)
+ (pad_size 1.69926 1.69926)
+ (pad_drill 1)
+ (pad_to_mask_clearance 0)
+ (aux_axis_origin 0 0)
+ (visible_elements 7FFFFFBF)
+ (pcbplotparams
+ (layerselection 284983297)
+ (usegerberextensions true)
+ (excludeedgelayer true)
+ (linewidth 0.150000)
+ (plotframeref false)
+ (viasonmask false)
+ (mode 1)
+ (useauxorigin false)
+ (hpglpennumber 1)
+ (hpglpenspeed 20)
+ (hpglpendiameter 15)
+ (hpglpenoverlay 2)
+ (psnegative false)
+ (psa4output false)
+ (plotreference true)
+ (plotvalue true)
+ (plotothertext true)
+ (plotinvisibletext false)
+ (padsonsilk false)
+ (subtractmaskfromsilk true)
+ (outputformat 1)
+ (mirror false)
+ (drillshape 0)
+ (scaleselection 1)
+ (outputdirectory "Gerber Files/"))
+ )
+
+ (net 0 "")
+ (net 1 +5V)
+ (net 2 /A0)
+ (net 3 /A7105_CSN)
+ (net 4 /BATT)
+ (net 5 /CC25_CSN)
+ (net 6 /CC25_LANEN)
+ (net 7 /CC25_PAEN)
+ (net 8 /CYRF_CSN)
+ (net 9 /CYRF_RST)
+ (net 10 /D10)
+ (net 11 /D11)
+ (net 12 /D12)
+ (net 13 /D3)
+ (net 14 /MISO)
+ (net 15 /MOSI)
+ (net 16 /NRF_CE)
+ (net 17 /NRF_CSN)
+ (net 18 /PB5)
+ (net 19 /PPM_IN)
+ (net 20 /RESET)
+ (net 21 /RX)
+ (net 22 /SCK)
+ (net 23 /TX)
+ (net 24 /xtl1)
+ (net 25 /xtl2)
+ (net 26 3V3)
+ (net 27 GND)
+ (net 28 N-0000012)
+ (net 29 N-0000013)
+ (net 30 N-0000019)
+ (net 31 N-000002)
+ (net 32 N-0000020)
+ (net 33 N-0000021)
+ (net 34 N-0000022)
+ (net 35 N-0000023)
+ (net 36 N-0000025)
+ (net 37 N-0000034)
+ (net 38 N-0000043)
+
+ (net_class Default "This is the default net class."
+ (clearance 0.254)
+ (trace_width 0.254)
+ (via_dia 0.889)
+ (via_drill 0.635)
+ (uvia_dia 0.254)
+ (uvia_drill 0.127)
+ (add_net "")
+ (add_net +5V)
+ (add_net /A0)
+ (add_net /A7105_CSN)
+ (add_net /BATT)
+ (add_net /CC25_CSN)
+ (add_net /CC25_LANEN)
+ (add_net /CC25_PAEN)
+ (add_net /CYRF_CSN)
+ (add_net /CYRF_RST)
+ (add_net /D10)
+ (add_net /D11)
+ (add_net /D12)
+ (add_net /D3)
+ (add_net /MISO)
+ (add_net /MOSI)
+ (add_net /NRF_CE)
+ (add_net /NRF_CSN)
+ (add_net /PB5)
+ (add_net /PPM_IN)
+ (add_net /RESET)
+ (add_net /RX)
+ (add_net /SCK)
+ (add_net /TX)
+ (add_net /xtl1)
+ (add_net /xtl2)
+ (add_net 3V3)
+ (add_net GND)
+ (add_net N-0000012)
+ (add_net N-0000013)
+ (add_net N-0000019)
+ (add_net N-000002)
+ (add_net N-0000020)
+ (add_net N-0000021)
+ (add_net N-0000022)
+ (add_net N-0000023)
+ (add_net N-0000025)
+ (add_net N-0000034)
+ (add_net N-0000043)
+ )
+
+ (module MOLEX_4455_N2X5 (layer F.Cu) (tedit 56B4BA39) (tstamp 53FE56C1)
+ (at 178.1 108.5 270)
+ (descr "Double rangee de contacts 2 x 5 pins")
+ (tags CONN)
+ (path /53FE5423)
+ (fp_text reference P2 (at 0 -2.54 270) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value CONN_5 (at 0.254 8.128 270) (layer F.SilkS) hide
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_line (start -6.35 -1.524) (end -6.35 6.6548) (layer F.SilkS) (width 0.3048))
+ (fp_line (start 6.35 -1.524) (end 6.35 6.6548) (layer F.SilkS) (width 0.3048))
+ (fp_line (start -6.35 -1.524) (end 6.35 -1.524) (layer F.SilkS) (width 0.3048))
+ (fp_line (start 6.35 6.6548) (end -6.35 6.6548) (layer F.SilkS) (width 0.3048))
+ (pad 1 thru_hole rect (at -5.08 3.81 270) (size 1.778 1.778) (drill 1.0668)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 19 /PPM_IN)
+ )
+ (pad 2 thru_hole circle (at -2.54 3.81 270) (size 1.778 1.778) (drill 1.0668)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 36 N-0000025)
+ )
+ (pad 3 thru_hole circle (at 0 3.81 270) (size 1.778 1.778) (drill 1.0668)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 4 /BATT)
+ )
+ (pad 4 thru_hole circle (at 2.54 3.81 270) (size 1.778 1.778) (drill 1.0668)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 5 thru_hole circle (at 5.08 3.81 270) (size 1.778 1.778) (drill 1.0668)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 32 N-0000020)
+ )
+ (pad "" np_thru_hole circle (at 0 0 270) (size 1.778 1.778) (drill 1.778)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad "" np_thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 1.778)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad "" np_thru_hole circle (at 5.08 0 270) (size 1.778 1.778) (drill 1.778)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad "" np_thru_hole circle (at -2.54 0 270) (size 1.778 1.778) (drill 1.778)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad "" np_thru_hole circle (at -5.08 0 270) (size 1.778 1.778) (drill 1.778)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (model pin_array/pins_array_5x1.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SOT223 (layer F.Cu) (tedit 54BBF448) (tstamp 5489DFE1)
+ (at 169 96 270)
+ (descr "module CMS SOT223 4 pins")
+ (tags "CMS SOT")
+ (path /53C2ACE9)
+ (attr smd)
+ (fp_text reference U1 (at -3.1 -6.65 360) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value NCP1117ST50T3G (at 0 0.762 270) (layer F.SilkS)
+ (effects (font (size 0.5 0.5) (thickness 0.125)))
+ )
+ (fp_line (start -3.556 1.524) (end -3.556 4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 4.572) (end 3.556 4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 3.556 4.572) (end 3.556 1.524) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 -1.524) (end -3.556 -2.286) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 -2.286) (end -2.032 -4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -2.032 -4.572) (end 2.032 -4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 2.032 -4.572) (end 3.556 -2.286) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 3.556 -2.286) (end 3.556 -1.524) (layer F.SilkS) (width 0.2032))
+ (pad 4 smd rect (at 0 -3.302 270) (size 3.8 4)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 2 smd rect (at 0 3.302 270) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 1 +5V)
+ )
+ (pad 3 smd rect (at 2.286 3.302 270) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 4 /BATT)
+ )
+ (pad 1 smd rect (at -2.286 3.302 270) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd/SOT223.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 0.4 0.4 0.4))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module DIP-6__300 (layer F.Cu) (tedit 548E3887) (tstamp 53C2D6AB)
+ (at 146.6 109.7 270)
+ (descr "6 pins DIL package, round pads")
+ (tags DIL)
+ (path /54394777)
+ (fp_text reference SW1 (at -5.4 -0.1 360) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value HEX_DIP (at 0.7 0 270) (layer F.SilkS)
+ (effects (font (size 0.889 0.889) (thickness 0.2032)))
+ )
+ (fp_line (start -4.445 -2.54) (end 4.445 -2.54) (layer F.SilkS) (width 0.381))
+ (fp_line (start 4.445 -2.54) (end 4.445 2.54) (layer F.SilkS) (width 0.381))
+ (fp_line (start 4.445 2.54) (end -4.445 2.54) (layer F.SilkS) (width 0.381))
+ (fp_line (start -4.445 2.54) (end -4.445 -2.54) (layer F.SilkS) (width 0.381))
+ (fp_line (start -4.445 -0.635) (end -3.175 -0.635) (layer F.SilkS) (width 0.381))
+ (fp_line (start -3.175 -0.635) (end -3.175 0.635) (layer F.SilkS) (width 0.381))
+ (fp_line (start -3.175 0.635) (end -4.445 0.635) (layer F.SilkS) (width 0.381))
+ (pad 1 thru_hole rect (at -2.54 3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 10 /D10)
+ )
+ (pad 2 thru_hole circle (at 0 3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 3 thru_hole circle (at 2.54 3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 12 /D12)
+ )
+ (pad 4 thru_hole circle (at 2.54 -3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 11 /D11)
+ )
+ (pad 5 thru_hole circle (at 0 -3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 6 thru_hole circle (at -2.54 -3.81 270) (size 1.7 1.7) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 2 /A0)
+ )
+ (model dil/dil_6.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SOT223 (layer F.Cu) (tedit 54947BEE) (tstamp 5489DFF1)
+ (at 153 96 90)
+ (descr "module CMS SOT223 4 pins")
+ (tags "CMS SOT")
+ (path /53C2AD08)
+ (attr smd)
+ (fp_text reference U2 (at 4 -4.1 180) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value NCP1117ST33T3G (at -0.2 0.8 90) (layer F.SilkS)
+ (effects (font (size 0.5 0.5) (thickness 0.125)))
+ )
+ (fp_line (start -3.556 1.524) (end -3.556 4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 4.572) (end 3.556 4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 3.556 4.572) (end 3.556 1.524) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 -1.524) (end -3.556 -2.286) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.556 -2.286) (end -2.032 -4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -2.032 -4.572) (end 2.032 -4.572) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 2.032 -4.572) (end 3.556 -2.286) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 3.556 -2.286) (end 3.556 -1.524) (layer F.SilkS) (width 0.2032))
+ (pad 4 smd rect (at 0 -3.302 90) (size 3.8 4)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 2 smd rect (at 0 3.302 90) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 3 smd rect (at 2.286 3.302 90) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 1 +5V)
+ )
+ (pad 1 smd rect (at -2.286 3.302 90) (size 1.5 2.032)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd/SOT223.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 0.4 0.4 0.4))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module XL7105-D03B (layer F.Cu) (tedit 54837681) (tstamp 547F531E)
+ (at 153.4 77.7 270)
+ (descr "Double rangee de contacts 2 x 5 pins")
+ (tags CONN)
+ (path /53C2C184)
+ (fp_text reference U4 (at -2.7 6.4 360) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value A7105 (at -2.7 2.4 360) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_line (start -6 -9) (end 20 -9) (layer F.SilkS) (width 0.3048))
+ (fp_line (start 20 -9) (end 20 9) (layer F.SilkS) (width 0.3048))
+ (fp_line (start -6 9) (end 20 9) (layer F.SilkS) (width 0.3048))
+ (fp_line (start -6 9) (end -6 -9) (layer F.SilkS) (width 0.3048))
+ (pad 1 thru_hole rect (at -5 -8 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 26 3V3)
+ )
+ (pad 2 thru_hole circle (at -5 -6 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 3 /A7105_CSN)
+ )
+ (pad 4 thru_hole circle (at -5 -2 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 22 /SCK)
+ )
+ (pad 5 thru_hole circle (at -5 0 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 15 /MOSI)
+ )
+ (pad 6 thru_hole circle (at -5 2 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 29 N-0000013)
+ )
+ (pad 7 thru_hole circle (at -5 4 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 28 N-0000012)
+ )
+ (pad 8 thru_hole circle (at -5 6 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 28 N-0000012)
+ )
+ (pad 9 thru_hole circle (at -5 8 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 29 N-0000013)
+ )
+ (pad 3 thru_hole circle (at -5 -4 270) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (model pin_array/pins_array_5x2.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module TQFP32 (layer F.Cu) (tedit 56B52925) (tstamp 5436F802)
+ (at 167 85.3 315)
+ (path /53BC5C99)
+ (fp_text reference IC1 (at -4.949747 -5.091169 315) (layer F.SilkS)
+ (effects (font (size 1.27 1.016) (thickness 0.2032)))
+ )
+ (fp_text value ATMEGA328P (at 0.214253 6.852572 315) (layer F.SilkS)
+ (effects (font (size 1.27 0.8) (thickness 0.2)))
+ )
+ (fp_line (start 5.0292 2.7686) (end 3.8862 2.7686) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 5.0292 -2.7686) (end 3.9116 -2.7686) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 5.0292 2.7686) (end 5.0292 -2.7686) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 2.794 3.9624) (end 2.794 5.0546) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -2.8194 3.9878) (end -2.8194 5.0546) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -2.8448 5.0546) (end 2.794 5.08) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -2.794 -5.0292) (end 2.7178 -5.0546) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -3.8862 -3.2766) (end -3.8862 3.9116) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 2.7432 -5.0292) (end 2.7432 -3.9878) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -3.2512 -3.8862) (end 3.81 -3.8862) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 3.8608 3.937) (end 3.8608 -3.7846) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -3.8862 3.937) (end 3.7338 3.937) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -5.0292 -2.8448) (end -5.0292 2.794) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -5.0292 2.794) (end -3.8862 2.794) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -3.87604 -3.302) (end -3.29184 -3.8862) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -5.02412 -2.8448) (end -3.87604 -2.8448) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -2.794 -3.8862) (end -2.794 -5.03428) (layer F.SilkS) (width 0.1524))
+ (fp_circle (center -2.83972 -2.86004) (end -2.43332 -2.60604) (layer F.SilkS) (width 0.1524))
+ (pad 8 smd rect (at -4.81584 2.77622 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 25 /xtl2)
+ )
+ (pad 7 smd rect (at -4.81584 1.97612 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 24 /xtl1)
+ )
+ (pad 6 smd rect (at -4.81584 1.17602 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 5 smd rect (at -4.81584 0.37592 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 4 smd rect (at -4.81584 -0.42418 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 3 smd rect (at -4.81584 -1.22428 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 2 smd rect (at -4.81584 -2.02438 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 22 /SCK)
+ )
+ (pad 1 smd rect (at -4.81584 -2.82448 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 13 /D3)
+ )
+ (pad 24 smd rect (at 4.7498 -2.8194 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 17 smd rect (at 4.7498 2.794 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 18 /PB5)
+ )
+ (pad 18 smd rect (at 4.7498 1.9812 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 19 smd rect (at 4.7498 1.1684 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 20 smd rect (at 4.7498 0.381 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 38 N-0000043)
+ )
+ (pad 21 smd rect (at 4.7498 -0.4318 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 22 smd rect (at 4.7498 -1.2192 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 23 smd rect (at 4.7498 -2.032 315) (size 1.99898 0.44958)
+ (layers F.Cu F.Paste F.Mask)
+ (net 2 /A0)
+ )
+ (pad 32 smd rect (at -2.82448 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 3 /A7105_CSN)
+ )
+ (pad 31 smd rect (at -2.02692 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 23 /TX)
+ )
+ (pad 30 smd rect (at -1.22428 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 21 /RX)
+ )
+ (pad 29 smd rect (at -0.42672 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 20 /RESET)
+ )
+ (pad 28 smd rect (at 0.37592 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 9 /CYRF_RST)
+ )
+ (pad 27 smd rect (at 1.17348 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 26 smd rect (at 1.97612 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 25 smd rect (at 2.77368 -4.826 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ )
+ (pad 9 smd rect (at -2.8194 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 15 /MOSI)
+ )
+ (pad 10 smd rect (at -2.032 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 14 /MISO)
+ )
+ (pad 11 smd rect (at -1.2192 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 5 /CC25_CSN)
+ )
+ (pad 12 smd rect (at -0.4318 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 17 /NRF_CSN)
+ )
+ (pad 13 smd rect (at 0.3556 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 8 /CYRF_CSN)
+ )
+ (pad 14 smd rect (at 1.1684 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 10 /D10)
+ )
+ (pad 15 smd rect (at 1.9812 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 11 /D11)
+ )
+ (pad 16 smd rect (at 2.794 4.7752 315) (size 0.44958 1.99898)
+ (layers F.Cu F.Paste F.Mask)
+ (net 12 /D12)
+ )
+ (model smd/tqfp32.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 5485D93F) (tstamp 53C2D5B2)
+ (at 151.8 61.7 180)
+ (path /53C2D8C4)
+ (attr smd)
+ (fp_text reference R6 (at -2 0.4 180) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 1K (at -2.1 -0.4 180) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0 180) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 1 +5V)
+ )
+ (pad 2 smd rect (at 0.762 0 180) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 31 N-000002)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 5485D8E4) (tstamp 53C2D5BE)
+ (at 173.8 76.5 180)
+ (path /53BC5FEA)
+ (attr smd)
+ (fp_text reference R1 (at -2.1 0.4 180) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 10K (at -2.2 -0.4 180) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0 180) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 2 smd rect (at 0.762 0 180) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 20 /RESET)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 54D5244B) (tstamp 53C2D5CA)
+ (at 162.687 105.029 90)
+ (path /53BC6125)
+ (attr smd)
+ (fp_text reference R4 (at -2 -0.5 90) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 1K (at -2 0.4 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 18 /PB5)
+ )
+ (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 37 N-0000034)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 548E3A24) (tstamp 53C2D5D6)
+ (at 177.927 97.663 90)
+ (path /53C2B99F)
+ (attr smd)
+ (fp_text reference R3 (at 2.3 -0.5 90) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 1K (at 2.4 0.4 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0 90) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 35 N-0000023)
+ )
+ (pad 2 smd rect (at 0.762 0 90) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 548B2438) (tstamp 53C2D5E2)
+ (at 175.768 97.663 270)
+ (path /53C2B990)
+ (attr smd)
+ (fp_text reference R2 (at -2.7 0 360) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 2K2 (at -1.8 0 360) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0 270) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 13 /D3)
+ )
+ (pad 2 smd rect (at 0.762 0 270) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 19 /PPM_IN)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 5485D8C6) (tstamp 53C2D5EE)
+ (at 173.8 74.5)
+ (path /53C2B787)
+ (attr smd)
+ (fp_text reference R5 (at 2 -0.3) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 2K2 (at 2.1 0.5) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 16 /NRF_CE)
+ )
+ (pad 2 smd rect (at 0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module pin_array_3x2 (layer F.Cu) (tedit 54BD6662) (tstamp 5489FDE0)
+ (at 175.4 62.1 180)
+ (descr "Double rangee de contacts 2 x 4 pins")
+ (tags CONN)
+ (path /53C2DBCC)
+ (fp_text reference P1 (at -2.1 -3.6 180) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value ISP (at 4.7 0.1 270) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_line (start 3.81 2.54) (end -3.81 2.54) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.81 -2.54) (end 3.81 -2.54) (layer F.SilkS) (width 0.2032))
+ (fp_line (start 3.81 -2.54) (end 3.81 2.54) (layer F.SilkS) (width 0.2032))
+ (fp_line (start -3.81 2.54) (end -3.81 -2.54) (layer F.SilkS) (width 0.2032))
+ (pad 1 thru_hole rect (at -2.54 1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 12 /D12)
+ )
+ (pad 2 thru_hole circle (at -2.54 -1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 26 3V3)
+ )
+ (pad 3 thru_hole circle (at 0 1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 18 /PB5)
+ )
+ (pad 4 thru_hole circle (at 0 -1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 11 /D11)
+ )
+ (pad 5 thru_hole circle (at 2.54 1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 20 /RESET)
+ )
+ (pad 6 thru_hole circle (at 2.54 -1.27 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (model pin_array/pins_array_3x2.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module header_10_2mm (layer F.Cu) (tedit 548371C5) (tstamp 53C4106C)
+ (at 164.2 66.9 180)
+ (path /53C2C3F4)
+ (fp_text reference U6 (at 9.7 -2.1 180) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (fp_text value CC2500 (at 5.2 -2.1 180) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (pad 5 thru_hole circle (at -1 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 6 /CC25_LANEN)
+ )
+ (pad 4 thru_hole circle (at -3 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 14 /MISO)
+ )
+ (pad 3 thru_hole circle (at -5 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 22 /SCK)
+ )
+ (pad 2 thru_hole circle (at -7 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 15 /MOSI)
+ )
+ (pad 1 thru_hole rect (at -9 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 26 3V3)
+ )
+ (pad 6 thru_hole circle (at 1 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 7 thru_hole circle (at 3 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 7 /CC25_PAEN)
+ )
+ (pad 8 thru_hole circle (at 5 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 5 /CC25_CSN)
+ )
+ (pad 9 thru_hole circle (at 7 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 7 /CC25_PAEN)
+ )
+ (pad 10 thru_hole circle (at 9 0 180) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 6 /CC25_LANEN)
+ )
+ )
+
+ (module crystal_FA238-TSX3225 (layer F.Cu) (tedit 54BD4DE8) (tstamp 53C41078)
+ (at 158.1 80.9 45)
+ (descr "crystal Epson Toyocom FA-238 and TSX-3225 series")
+ (path /53BC62D3)
+ (fp_text reference X1 (at -1.131371 2.687006 135) (layer F.SilkS)
+ (effects (font (size 0.8 0.8) (thickness 0.15)))
+ )
+ (fp_text value 16MHz (at 3.11127 -3.11127 135) (layer F.SilkS)
+ (effects (font (size 0.8 0.8) (thickness 0.15)))
+ )
+ (fp_line (start -1.6 -1.3) (end 1.6 -1.3) (layer F.SilkS) (width 0.15))
+ (fp_line (start 1.6 -1.3) (end 1.6 1.3) (layer F.SilkS) (width 0.15))
+ (fp_line (start 1.6 1.3) (end -1.6 1.3) (layer F.SilkS) (width 0.15))
+ (fp_line (start -1.6 1.3) (end -1.6 -1.3) (layer F.SilkS) (width 0.15))
+ (pad 1 smd rect (at -1.1 0.8 45) (size 1.4 1.2)
+ (layers F.Cu F.Paste F.Mask)
+ (net 25 /xtl2)
+ )
+ (pad 2 smd rect (at 1.1 0.8 45) (size 1.4 1.2)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 4 smd rect (at -1.1 -0.8 45) (size 1.4 1.2)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 3 smd rect (at 1.1 -0.8 45) (size 1.4 1.2)
+ (layers F.Cu F.Paste F.Mask)
+ (net 24 /xtl1)
+ )
+ (model smd/smd_crystal&oscillator/crystal_4pins_smd.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 0.24 0.24 0.24))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_tant_B (layer F.Cu) (tedit 5495C078) (tstamp 53C2D65C)
+ (at 168 101.5)
+ (descr "SMT capacitor, tantalum size B")
+ (path /53C2AE5B)
+ (fp_text reference C1 (at 3.65 0) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.2)))
+ )
+ (fp_text value 22uF (at 0 1.9685) (layer F.SilkS) hide
+ (effects (font (size 0.50038 0.50038) (thickness 0.11938)))
+ )
+ (fp_line (start 1.2065 -1.397) (end 1.2065 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.778 -1.397) (end -1.778 -1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.778 -1.397) (end -1.778 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.778 1.397) (end 1.778 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.778 1.397) (end 1.778 -1.397) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at 1.524 0) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 4 /BATT)
+ )
+ (pad 2 smd rect (at -1.524 0) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd/capacitors/c_tant_B.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_tant_B (layer F.Cu) (tedit 548B25A1) (tstamp 54A2CEA9)
+ (at 149 101.5)
+ (descr "SMT capacitor, tantalum size B")
+ (path /53C2B150)
+ (fp_text reference C6 (at -1.5 -2.5) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.2)))
+ )
+ (fp_text value 22uF (at 0 1.9685) (layer F.SilkS) hide
+ (effects (font (size 0.50038 0.50038) (thickness 0.11938)))
+ )
+ (fp_line (start 1.2065 -1.397) (end 1.2065 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.778 -1.397) (end -1.778 -1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.778 -1.397) (end -1.778 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.778 1.397) (end 1.778 1.397) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.778 1.397) (end 1.778 -1.397) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at 1.524 0) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 2 smd rect (at -1.524 0) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd/capacitors/c_tant_B.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module Hole_4mm (layer F.Cu) (tedit 56B4BA4A) (tstamp 547F85C2)
+ (at 160.782 77.216)
+ (fp_text reference Hole_4mm (at -8.7 37.75) (layer F.SilkS) hide
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (fp_text value "" (at -0.01 6.4) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (pad "" np_thru_hole circle (at -3.6 35.2) (size 4 4) (drill 4)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ )
+
+ (module Switch_SMT5mm (layer F.Cu) (tedit 54D4438A) (tstamp 547F53D1)
+ (at 146.6 66.5)
+ (path /56B4EC7B)
+ (fp_text reference SW3 (at -2.8 4) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (fp_text value RESET (at 1.5 4) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.2)))
+ )
+ (pad 1 smd rect (at -3.1 -1.85) (size 1.8 1.1)
+ (layers F.Cu F.Paste F.Mask)
+ (net 20 /RESET)
+ )
+ (pad 2 smd rect (at 3.1 -1.85) (size 1.8 1.1)
+ (layers F.Cu F.Paste F.Mask)
+ (net 20 /RESET)
+ )
+ (pad 3 smd rect (at -3.1 1.85) (size 1.8 1.1)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 4 smd rect (at 3.1 1.85) (size 1.8 1.1)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ )
+
+ (module NRF24L01 (layer F.Cu) (tedit 5488B26F) (tstamp 547F85B0)
+ (at 170.6 71.1)
+ (descr "Double rangee de contacts 2 x 4 pins")
+ (tags CONN)
+ (path /53C2C24E)
+ (fp_text reference U5 (at 6.9 -1.1 90) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value NRF24L01 (at 7.4 5.7 90) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_line (start -7.5 -2.54) (end 8.5 -2.54) (layer F.SilkS) (width 0.3048))
+ (fp_line (start 8.5 -2.54) (end 8.5 29.54) (layer F.SilkS) (width 0.3048))
+ (fp_line (start 8.5 29.54) (end -7.5 29.54) (layer F.SilkS) (width 0.3048))
+ (fp_line (start -7.5 -2.54) (end -7.5 29.54) (layer F.SilkS) (width 0.3048))
+ (pad 1 thru_hole rect (at 3.76682 -1.20904 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 2 thru_hole circle (at 3.76682 1.33096 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 26 3V3)
+ )
+ (pad 3 thru_hole circle (at 1.22682 -1.20904 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 16 /NRF_CE)
+ )
+ (pad 4 thru_hole circle (at 1.22682 1.33096 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 17 /NRF_CSN)
+ )
+ (pad 5 thru_hole circle (at -1.31318 -1.20904 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 22 /SCK)
+ )
+ (pad 6 thru_hole circle (at -1.31318 1.33096 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 15 /MOSI)
+ )
+ (pad 7 thru_hole circle (at -3.85318 -1.20904 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 14 /MISO)
+ )
+ (pad 8 thru_hole circle (at -3.85318 1.33096 180) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (model pin_array/pins_array_4x2.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module CYRF6936 (layer F.Cu) (tedit 548B2075) (tstamp 547F7A40)
+ (at 160 62.3)
+ (path /53C2BF57)
+ (fp_text reference U3 (at -4 2.7) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (fp_text value CYRF6936 (at 1.3 2.7) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (pad 5 thru_hole circle (at 0 -1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 4 thru_hole circle (at -2 1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 22 /SCK)
+ )
+ (pad 3 thru_hole circle (at -2 -1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad 2 thru_hole circle (at -4 1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 8 /CYRF_CSN)
+ )
+ (pad 1 thru_hole rect (at -4 -1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 1 +5V)
+ )
+ (pad 6 thru_hole circle (at 0 1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 7 thru_hole circle (at 2 -1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ )
+ (pad 8 thru_hole circle (at 2 1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 15 /MOSI)
+ )
+ (pad 9 thru_hole circle (at 4 -1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 9 /CYRF_RST)
+ )
+ (pad 10 thru_hole circle (at 4 1) (size 1.5 1.5) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 14 /MISO)
+ )
+ )
+
+ (module LED-0603 (layer F.Cu) (tedit 54D4435F) (tstamp 53C2D650)
+ (at 147.4 61.7 180)
+ (descr "LED 0603 smd package")
+ (tags "LED led 0603 SMD smd SMT smt smdled SMDLED smtled SMTLED")
+ (path /53C2D9F8)
+ (attr smd)
+ (fp_text reference D2 (at 0 -1.2 180) (layer F.SilkS)
+ (effects (font (size 0.508 0.508) (thickness 0.127)))
+ )
+ (fp_text value LED (at 0 1.016 180) (layer F.SilkS)
+ (effects (font (size 0.508 0.508) (thickness 0.127)))
+ )
+ (fp_line (start 0.44958 -0.44958) (end 0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 0.44958) (end 0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.84836 -0.44958) (end 0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 -0.44958) (end 0.84836 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 -0.44958) (end -0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 0.44958) (end -0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.44958 -0.44958) (end -0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 -0.44958) (end -0.44958 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.44958) (end 0 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.29972) (end 0.29972 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 -0.44958) (end 0.29972 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.44958) (end 0.29972 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.29972) (end 0 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.44958) (end 0.29972 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 0.29972) (end 0.29972 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.29972) (end 0.29972 0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.14986) (end 0 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.14986) (end 0.29972 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 -0.14986) (end 0.29972 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.14986) (end 0.29972 -0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 -0.39878) (end -0.44958 -0.39878) (layer F.SilkS) (width 0.1016))
+ (fp_line (start 0.44958 0.39878) (end -0.44958 0.39878) (layer F.SilkS) (width 0.1016))
+ (pad 1 smd rect (at -0.7493 0 180) (size 0.79756 0.79756)
+ (layers F.Cu F.Paste F.Mask)
+ (net 31 N-000002)
+ )
+ (pad 2 smd rect (at 0.7493 0 180) (size 0.79756 0.79756)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ )
+
+ (module LED-0603 locked (layer F.Cu) (tedit 54D4432E) (tstamp 53C2D626)
+ (at 168 104.3)
+ (descr "LED 0603 smd package")
+ (tags "LED led 0603 SMD smd SMT smt smdled SMDLED smtled SMTLED")
+ (path /53BC617C)
+ (attr smd)
+ (fp_text reference D1 (at 0 -1.016) (layer F.SilkS)
+ (effects (font (size 0.508 0.508) (thickness 0.127)))
+ )
+ (fp_text value LED (at 0 1.016) (layer F.SilkS)
+ (effects (font (size 0.508 0.508) (thickness 0.127)))
+ )
+ (fp_line (start 0.44958 -0.44958) (end 0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 0.44958) (end 0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.84836 -0.44958) (end 0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 -0.44958) (end 0.84836 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 -0.44958) (end -0.84836 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 0.44958) (end -0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.44958 -0.44958) (end -0.44958 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start -0.84836 -0.44958) (end -0.44958 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.44958) (end 0 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.29972) (end 0.29972 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 -0.44958) (end 0.29972 -0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.44958) (end 0.29972 -0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.29972) (end 0 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.44958) (end 0.29972 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 0.29972) (end 0.29972 0.44958) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.29972) (end 0.29972 0.29972) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.14986) (end 0 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 0.14986) (end 0.29972 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.29972 -0.14986) (end 0.29972 0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0 -0.14986) (end 0.29972 -0.14986) (layer F.SilkS) (width 0.06604))
+ (fp_line (start 0.44958 -0.39878) (end -0.44958 -0.39878) (layer F.SilkS) (width 0.1016))
+ (fp_line (start 0.44958 0.39878) (end -0.44958 0.39878) (layer F.SilkS) (width 0.1016))
+ (pad 1 smd rect (at -0.7493 0) (size 0.79756 0.79756)
+ (layers F.Cu F.Paste F.Mask)
+ (net 37 N-0000034)
+ )
+ (pad 2 smd rect (at 0.7493 0) (size 0.79756 0.79756)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ )
+
+ (module LOGO (layer B.Cu) (tedit 54A2CE43) (tstamp 54A2CE24)
+ (at 176.276 78.486 90)
+ (fp_text reference "" (at 0 -3.89382 90) (layer B.SilkS) hide
+ (effects (font (size 1.524 1.524) (thickness 0.3048)) (justify mirror))
+ )
+ (fp_text value "" (at 0 3.89382 90) (layer B.SilkS) hide
+ (effects (font (size 1.524 1.524) (thickness 0.3048)) (justify mirror))
+ )
+ (fp_poly (pts (xy 2.34188 1.143) (xy 2.28854 1.32842) (xy 2.17678 1.64084) (xy 2.17424 1.64338)
+ (xy 1.98882 2.1463) (xy 0.80518 2.39522) (xy 0.80518 2.11582) (xy 0.80518 1.69418)
+ (xy 0.80518 1.27) (xy 0.50292 1.27) (xy 0.20828 1.31572) (xy 0.04572 1.45796)
+ (xy 0 1.69418) (xy 0.05334 1.94056) (xy 0.22352 2.07772) (xy 0.50292 2.11582)
+ (xy 0.80518 2.11582) (xy 0.80518 2.39522) (xy 0.67818 2.42316) (xy 0.22352 2.51714)
+ (xy -0.1778 2.59842) (xy -0.42418 2.64668) (xy -0.42418 1.97866) (xy -0.44704 1.88976)
+ (xy -0.53848 1.93802) (xy -0.54864 1.94564) (xy -0.70358 2.0066) (xy -0.85598 1.97866)
+ (xy -0.93218 1.88214) (xy -0.93218 1.87452) (xy -0.86106 1.79832) (xy -0.71628 1.74244)
+ (xy -0.508 1.6383) (xy -0.43942 1.50114) (xy -0.50546 1.36906) (xy -0.69342 1.2827)
+ (xy -0.8255 1.27) (xy -0.98044 1.31826) (xy -1.01092 1.41732) (xy -0.98806 1.4986)
+ (xy -0.96012 1.4605) (xy -0.8636 1.37922) (xy -0.72136 1.35636) (xy -0.6096 1.397)
+ (xy -0.59182 1.44272) (xy -0.66548 1.52908) (xy -0.8382 1.61798) (xy -0.84582 1.62052)
+ (xy -1.02616 1.73228) (xy -1.1049 1.88214) (xy -1.06426 2.01422) (xy -0.99568 2.05994)
+ (xy -0.76962 2.11074) (xy -0.56388 2.09804) (xy -0.43942 2.02692) (xy -0.42418 1.97866)
+ (xy -0.42418 2.64668) (xy -0.49022 2.66192) (xy -0.6858 2.69748) (xy -0.73406 2.7051)
+ (xy -0.82296 2.64668) (xy -1.00076 2.48158) (xy -1.23698 2.23774) (xy -1.51384 1.93802)
+ (xy -1.5621 1.88468) (xy -2.29362 1.05918) (xy -1.90246 1.03124) (xy -1.67132 1.00838)
+ (xy -1.57988 0.97028) (xy -1.6002 0.89916) (xy -1.6129 0.88392) (xy -1.65354 0.78486)
+ (xy -1.63068 0.635) (xy -1.53416 0.39878) (xy -1.44526 0.20828) (xy -1.30302 -0.0508)
+ (xy -1.1811 -0.23114) (xy -1.10236 -0.29464) (xy -1.09474 -0.2921) (xy -1.04648 -0.18288)
+ (xy -1.02108 0.04064) (xy -1.01854 0.32004) (xy -1.03632 0.5969) (xy -1.07442 0.81534)
+ (xy -1.1176 0.9144) (xy -1.12268 0.95504) (xy -1.03124 0.98298) (xy -0.82296 1.0033)
+ (xy -0.4826 1.01346) (xy 0 1.016) (xy 0.49022 1.01346) (xy 0.82804 1.0033)
+ (xy 1.03378 0.98298) (xy 1.12268 0.95504) (xy 1.1176 0.9144) (xy 1.03124 0.72898)
+ (xy 1.0795 0.51816) (xy 1.24206 0.32004) (xy 1.49606 0.16764) (xy 1.62814 0.12446)
+ (xy 1.80594 0.10668) (xy 1.905 0.20066) (xy 1.94564 0.2921) (xy 2.0193 0.57658)
+ (xy 2.0193 0.8128) (xy 1.9431 0.94996) (xy 1.92532 0.96012) (xy 1.92532 0.9906)
+ (xy 2.05994 1.00838) (xy 2.0955 1.00838) (xy 2.25044 1.016) (xy 2.33172 1.04902)
+ (xy 2.34188 1.143) (xy 2.34188 1.143)) (layer B.SilkS) (width 0.00254))
+ (fp_poly (pts (xy 2.9083 -0.59436) (xy 2.71018 0.04064) (xy 2.60858 0.34036) (xy 2.51968 0.56134)
+ (xy 2.46126 0.6731) (xy 2.4511 0.67818) (xy 2.39268 0.60198) (xy 2.30378 0.40132)
+ (xy 2.19456 0.1143) (xy 2.07772 -0.21844) (xy 1.9685 -0.56388) (xy 1.87706 -0.87884)
+ (xy 1.81864 -1.12776) (xy 1.8034 -1.27) (xy 1.8034 -1.27762) (xy 1.81102 -1.36398)
+ (xy 1.75514 -1.41224) (xy 1.60274 -1.4351) (xy 1.31826 -1.44018) (xy 1.27 -1.44018)
+ (xy 0.9652 -1.4351) (xy 0.79756 -1.41732) (xy 0.73152 -1.3716) (xy 0.73152 -1.29032)
+ (xy 0.7366 -1.27508) (xy 0.72898 -1.12776) (xy 0.6731 -0.8636) (xy 0.58166 -0.52578)
+ (xy 0.50546 -0.2794) (xy 0.32766 0.23622) (xy 0.18034 0.59944) (xy 0.05588 0.82296)
+ (xy -0.05588 0.92202) (xy -0.16002 0.90678) (xy -0.19812 0.87376) (xy -0.23114 0.75946)
+ (xy -0.24892 0.51562) (xy -0.25908 0.18542) (xy -0.25654 -0.1905) (xy -0.24384 -0.5715)
+ (xy -0.22352 -0.9144) (xy -0.19558 -1.17856) (xy -0.16002 -1.32588) (xy -0.1524 -1.33858)
+ (xy -0.13462 -1.39192) (xy -0.2286 -1.42494) (xy -0.45974 -1.43764) (xy -0.635 -1.44018)
+ (xy -0.94234 -1.43256) (xy -1.1049 -1.41224) (xy -1.14046 -1.36906) (xy -1.1176 -1.33858)
+ (xy -1.05156 -1.1938) (xy -1.01854 -0.96012) (xy -1.016 -0.89916) (xy -1.016 -0.5588)
+ (xy -1.31318 -0.84582) (xy -1.53162 -1.0922) (xy -1.60274 -1.26238) (xy -1.53162 -1.36906)
+ (xy -1.50368 -1.3843) (xy -1.50622 -1.41224) (xy -1.64338 -1.43002) (xy -1.70942 -1.43256)
+ (xy -2.02438 -1.44018) (xy -1.91516 -1.7526) (xy -1.8161 -1.97104) (xy -1.70688 -2.11582)
+ (xy -1.68656 -2.12852) (xy -1.56972 -2.16662) (xy -1.32842 -2.22758) (xy -0.99568 -2.30124)
+ (xy -0.60706 -2.3876) (xy -0.19558 -2.47396) (xy 0.20828 -2.5527) (xy 0.56642 -2.62382)
+ (xy 0.84582 -2.67208) (xy 1.016 -2.69748) (xy 1.04902 -2.69494) (xy 1.1303 -2.59588)
+ (xy 1.29032 -2.41046) (xy 1.50622 -2.16916) (xy 1.74752 -1.89992) (xy 1.99136 -1.63322)
+ (xy 2.2098 -1.397) (xy 2.3749 -1.22174) (xy 2.46126 -1.13538) (xy 2.46888 -1.1303)
+ (xy 2.47396 -1.10744) (xy 2.51206 -1.0287) (xy 2.63652 -0.88138) (xy 2.6797 -0.83312)
+ (xy 2.9083 -0.59436) (xy 2.9083 -0.59436)) (layer B.SilkS) (width 0.00254))
+ (fp_poly (pts (xy -1.61036 -0.8382) (xy -1.78816 -0.65278) (xy -2.01422 -0.34036) (xy -2.23012 0.08128)
+ (xy -2.36728 0.4445) (xy -2.45618 0.67564) (xy -2.53746 0.74676) (xy -2.63398 0.6731)
+ (xy -2.69494 0.5842) (xy -2.75844 0.46228) (xy -2.71526 0.46228) (xy -2.70256 0.4699)
+ (xy -2.63398 0.47498) (xy -2.64668 0.35052) (xy -2.6543 0.22352) (xy -2.6035 0.22352)
+ (xy -2.54762 0.21082) (xy -2.56032 0.09652) (xy -2.57048 -0.03048) (xy -2.51968 -0.03048)
+ (xy -2.4638 -0.04318) (xy -2.4765 -0.15748) (xy -2.49174 -0.28194) (xy -2.46126 -0.29972)
+ (xy -2.40538 -0.35306) (xy -2.3241 -0.52578) (xy -2.25298 -0.72644) (xy -2.1082 -1.19126)
+ (xy -1.85928 -1.01346) (xy -1.61036 -0.8382) (xy -1.61036 -0.8382)) (layer B.SilkS) (width 0.00254))
+ (fp_poly (pts (xy 1.74244 -0.18034) (xy 1.71196 -0.16764) (xy 1.59004 -0.14732) (xy 1.4605 -0.11684)
+ (xy 1.31318 -0.0889) (xy 1.27 -0.09652) (xy 1.2954 -0.18796) (xy 1.35128 -0.38608)
+ (xy 1.38938 -0.508) (xy 1.50622 -0.889) (xy 1.60274 -0.635) (xy 1.69926 -0.37592)
+ (xy 1.74244 -0.23622) (xy 1.74244 -0.18034) (xy 1.74244 -0.18034)) (layer B.SilkS) (width 0.00254))
+ (fp_poly (pts (xy 0.59182 1.68656) (xy 0.5588 1.93548) (xy 0.46736 2.03708) (xy 0.32766 1.9812)
+ (xy 0.25654 1.91008) (xy 0.1778 1.7145) (xy 0.21082 1.51892) (xy 0.33782 1.38684)
+ (xy 0.40132 1.36906) (xy 0.52324 1.3716) (xy 0.57912 1.45034) (xy 0.59182 1.64846)
+ (xy 0.59182 1.68656) (xy 0.59182 1.68656)) (layer B.SilkS) (width 0.00254))
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 5051B21B) (tstamp 56B4B6A1)
+ (at 165.862 110.744)
+ (path /54DCE006)
+ (attr smd)
+ (fp_text reference R7 (at 0.0635 -0.0635 90) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 2K2 (at -1.69926 0 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 34 N-0000022)
+ )
+ (pad 2 smd rect (at 0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 21 /RX)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Capa (layer F.Cu) (tedit 5051B1EC) (tstamp 548465A7)
+ (at 162.306 78.994 45)
+ (path /54845FE2)
+ (attr smd)
+ (fp_text reference C7 (at 0 0 135) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 0.1uF (at -1.651 0 135) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start 0.50038 0.65024) (end 1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -0.50038 0.65024) (end -1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 0.50038 -0.65024) (end 1.19888 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 -0.65024) (end -0.50038 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 1.19888 -0.635) (end 1.19888 0.635) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 0.635) (end -1.19888 -0.635) (layer F.SilkS) (width 0.11938))
+ (pad 1 smd rect (at -0.762 0 45) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 26 3V3)
+ )
+ (pad 2 smd rect (at 0.762 0 45) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd\capacitors\C0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Capa (layer F.Cu) (tedit 5051B1EC) (tstamp 53C2D698)
+ (at 172.466 91.059)
+ (path /53BC5DA8)
+ (attr smd)
+ (fp_text reference C2 (at 0 0 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 0.1uF (at -1.651 0 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start 0.50038 0.65024) (end 1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -0.50038 0.65024) (end -1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 0.50038 -0.65024) (end 1.19888 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 -0.65024) (end -0.50038 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 1.19888 -0.635) (end 1.19888 0.635) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 0.635) (end -1.19888 -0.635) (layer F.SilkS) (width 0.11938))
+ (pad 1 smd rect (at -0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 38 N-0000043)
+ )
+ (pad 2 smd rect (at 0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd\capacitors\C0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Capa (layer F.Cu) (tedit 5051B1EC) (tstamp 54BBD549)
+ (at 156.464 78.74 45)
+ (path /53BC62F4)
+ (attr smd)
+ (fp_text reference C4 (at 0 0 135) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 18pF (at -1.651 0 135) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start 0.50038 0.65024) (end 1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -0.50038 0.65024) (end -1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 0.50038 -0.65024) (end 1.19888 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 -0.65024) (end -0.50038 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 1.19888 -0.635) (end 1.19888 0.635) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 0.635) (end -1.19888 -0.635) (layer F.SilkS) (width 0.11938))
+ (pad 1 smd rect (at -0.762 0 45) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (pad 2 smd rect (at 0.762 0 45) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 24 /xtl1)
+ )
+ (model smd\capacitors\C0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SM0603_Capa (layer F.Cu) (tedit 56B50213) (tstamp 53C2D680)
+ (at 155.956 83.058 135)
+ (path /53BC631E)
+ (attr smd)
+ (fp_text reference C5 (at 0 0 225) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 18pF (at -1.651 0 225) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start 0.50038 0.65024) (end 1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -0.50038 0.65024) (end -1.19888 0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 0.50038 -0.65024) (end 1.19888 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 -0.65024) (end -0.50038 -0.65024) (layer F.SilkS) (width 0.11938))
+ (fp_line (start 1.19888 -0.635) (end 1.19888 0.635) (layer F.SilkS) (width 0.11938))
+ (fp_line (start -1.19888 0.635) (end -1.19888 -0.635) (layer F.SilkS) (width 0.11938))
+ (pad 1 smd rect (at -0.762 0 135) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 25 /xtl2)
+ )
+ (pad 2 smd rect (at 0.762 0 135) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd\capacitors\C0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_tant_B (layer F.Cu) (tedit 56630AA4) (tstamp 53C2D668)
+ (at 161 96.5 90)
+ (descr "SMT capacitor, tantalum size B")
+ (path /53C2AE76)
+ (fp_text reference C3 (at 4.2 0 180) (layer F.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)))
+ )
+ (fp_text value 22uF (at 0 2.2 90) (layer F.SilkS) hide
+ (effects (font (size 0.50038 0.50038) (thickness 0.11938)))
+ )
+ (fp_line (start 2.8065 -1.597) (end 2.8065 1.597) (layer F.SilkS) (width 0.127))
+ (fp_line (start 3.278 -1.597) (end -2.878 -1.597) (layer F.SilkS) (width 0.127))
+ (fp_line (start -2.878 -1.597) (end -2.878 1.597) (layer F.SilkS) (width 0.127))
+ (fp_line (start -2.878 1.597) (end 3.278 1.597) (layer F.SilkS) (width 0.127))
+ (fp_line (start 3.278 1.597) (end 3.278 -1.597) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at 1.524 0 90) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 1 +5V)
+ )
+ (pad 2 smd rect (at -1.524 0 90) (size 1.95072 2.49936)
+ (layers F.Cu F.Paste F.Mask)
+ (net 27 GND)
+ )
+ (model smd/capacitors/c_tant_B.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module SW_PUSH_6x4.5MM locked (layer F.Cu) (tedit 56B4BC4E) (tstamp 543948E9)
+ (at 156 104.3)
+ (path /56B4EC6E)
+ (fp_text reference SW2 (at 5.8 -2.3) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_text value BIND (at 0.1 4.5) (layer F.SilkS)
+ (effects (font (size 1.016 1.016) (thickness 0.2032)))
+ )
+ (fp_line (start 3.8989 3.24974) (end -3.8989 3.24974) (layer F.SilkS) (width 0.127))
+ (fp_line (start -3.8989 -3.24974) (end 3.8989 -3.24974) (layer F.SilkS) (width 0.127))
+ (fp_line (start -3.8989 -3.25) (end -3.8989 3.25) (layer F.SilkS) (width 0.127))
+ (fp_line (start 3.8989 3.25) (end 3.8989 -3.25) (layer F.SilkS) (width 0.127))
+ (fp_circle (center 0 0) (end 0 -2.54) (layer F.SilkS) (width 0.127))
+ (pad 2 thru_hole circle (at 3 -2.25) (size 1.69926 1.69926) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 37 N-0000034)
+ )
+ (pad 4 thru_hole circle (at 3 2.25) (size 1.69926 1.69926) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (pad 1 thru_hole circle (at -3 -2.25) (size 1.69926 1.69926) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 37 N-0000034)
+ )
+ (pad 3 thru_hole circle (at -3 2.25) (size 1.69926 1.69926) (drill 1)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 27 GND)
+ )
+ (model packages3d\discret\push_butt_6x4_th.wrl
+ (at (xyz 0 0 -0.065))
+ (scale (xyz 0.3937 0.3937 0.3937))
+ (rotate (xyz 180 0 0))
+ )
+ )
+
+ (module SM0603_Resistor (layer F.Cu) (tedit 5051B21B) (tstamp 56B4EFA6)
+ (at 165.862 112.522)
+ (path /56B4E6D8)
+ (attr smd)
+ (fp_text reference R8 (at 0.0635 -0.0635 90) (layer F.SilkS)
+ (effects (font (size 0.50038 0.4572) (thickness 0.1143)))
+ )
+ (fp_text value 470 (at -1.69926 0 90) (layer F.SilkS)
+ (effects (font (size 0.508 0.4572) (thickness 0.1143)))
+ )
+ (fp_line (start -0.50038 -0.6985) (end -1.2065 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 -0.6985) (end -1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start -1.2065 0.6985) (end -0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 0.50038 -0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 -0.6985) (end 1.2065 0.6985) (layer F.SilkS) (width 0.127))
+ (fp_line (start 1.2065 0.6985) (end 0.50038 0.6985) (layer F.SilkS) (width 0.127))
+ (pad 1 smd rect (at -0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 30 N-0000019)
+ )
+ (pad 2 smd rect (at 0.762 0) (size 0.635 1.143)
+ (layers F.Cu F.Paste F.Mask)
+ (net 23 /TX)
+ )
+ (model smd\resistors\R0603.wrl
+ (at (xyz 0 0 0.001))
+ (scale (xyz 0.5 0.5 0.5))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module PIN_ARRAY_2X1 (layer F.Cu) (tedit 4565C520) (tstamp 56B4EFB0)
+ (at 162.052 111.887 90)
+ (descr "Connecteurs 2 pins")
+ (tags "CONN DEV")
+ (path /56B4E4CA)
+ (fp_text reference P3 (at 0 -1.905 90) (layer F.SilkS)
+ (effects (font (size 0.762 0.762) (thickness 0.1524)))
+ )
+ (fp_text value CONN_2 (at 0 -1.905 90) (layer F.SilkS) hide
+ (effects (font (size 0.762 0.762) (thickness 0.1524)))
+ )
+ (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.1524))
+ (fp_line (start -2.54 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.1524))
+ (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.1524))
+ (pad 1 thru_hole rect (at -1.27 0 90) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 33 N-0000021)
+ )
+ (pad 2 thru_hole circle (at 1.27 0 90) (size 1.524 1.524) (drill 1.016)
+ (layers *.Cu *.Mask F.SilkS)
+ (net 30 N-0000019)
+ )
+ (model pin_array/pins_array_2x1.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_0603 (layer B.Cu) (tedit 490472AA) (tstamp 56B4EFBC)
+ (at 165.862 112.522)
+ (descr "SMT capacitor, 0603")
+ (path /56B4E4E1)
+ (fp_text reference JP3 (at 0 0.635) (layer B.SilkS)
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_text value JUMPER (at 0 -0.635) (layer B.SilkS) hide
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_line (start 0.5588 -0.4064) (end 0.5588 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.5588 0.381) (end -0.5588 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 0.4064) (end 0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 0.4064) (end 0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 -0.4064) (end -0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 -0.4064) (end -0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (pad 1 smd rect (at 0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 32 N-0000020)
+ )
+ (pad 2 smd rect (at -0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 30 N-0000019)
+ )
+ (model smd/capacitors/c_0603.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_0603 (layer B.Cu) (tedit 56B5245A) (tstamp 56B4EFC8)
+ (at 165.862 108.966 180)
+ (descr "SMT capacitor, 0603")
+ (path /56B4EFD5)
+ (fp_text reference JP1 (at 0 0.635 180) (layer B.SilkS)
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_text value JUMPER (at 0 -0.635 180) (layer B.SilkS) hide
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_line (start 0.5588 -0.4064) (end 0.5588 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.5588 0.381) (end -0.5588 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 0.4064) (end 0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 0.4064) (end 0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 -0.4064) (end -0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 -0.4064) (end -0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (pad 1 smd rect (at 0.75184 0 180) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 13 /D3)
+ )
+ (pad 2 smd rect (at -0.75184 0 180) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 35 N-0000023)
+ )
+ (model smd/capacitors/c_0603.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_0603 (layer B.Cu) (tedit 56B5246C) (tstamp 56B4F25F)
+ (at 165.862 110.744)
+ (descr "SMT capacitor, 0603")
+ (path /53FE5887)
+ (fp_text reference JP2 (at 0 0.635) (layer B.SilkS)
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_text value JUMPER (at 0 -0.635) (layer B.SilkS) hide
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_line (start 0.5588 -0.4064) (end 0.5588 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.5588 0.381) (end -0.5588 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 0.4064) (end 0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 0.4064) (end 0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 -0.4064) (end -0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 -0.4064) (end -0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (pad 1 smd rect (at 0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 19 /PPM_IN)
+ )
+ (pad 2 smd rect (at -0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 34 N-0000022)
+ )
+ (model smd/capacitors/c_0603.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module c_0603 (layer B.Cu) (tedit 56B5247E) (tstamp 56B4F26B)
+ (at 165.862 114.3)
+ (descr "SMT capacitor, 0603")
+ (path /53FE5896)
+ (fp_text reference JP4 (at 0 0.635) (layer B.SilkS)
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_text value JUMPER (at 0 -0.635) (layer B.SilkS) hide
+ (effects (font (size 0.20066 0.20066) (thickness 0.04064)) (justify mirror))
+ )
+ (fp_line (start 0.5588 -0.4064) (end 0.5588 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.5588 0.381) (end -0.5588 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 0.4064) (end 0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 0.4064) (end 0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start 0.8128 -0.4064) (end -0.8128 -0.4064) (layer B.SilkS) (width 0.127))
+ (fp_line (start -0.8128 -0.4064) (end -0.8128 0.4064) (layer B.SilkS) (width 0.127))
+ (pad 1 smd rect (at 0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 36 N-0000025)
+ )
+ (pad 2 smd rect (at -0.75184 0) (size 0.89916 1.00076)
+ (layers B.Cu B.Paste B.Mask)
+ (net 33 N-0000021)
+ )
+ (model smd/capacitors/c_0603.wrl
+ (at (xyz 0 0 0))
+ (scale (xyz 1 1 1))
+ (rotate (xyz 0 0 0))
+ )
+ )
+
+ (module 2_3d_jumper_table (layer B.Cu) (tedit 56B53DE2) (tstamp 56B54E4C)
+ (at 153.797 92.583 180)
+ (fp_text reference 2_3d_jumper_table (at 0 -11.43 180) (layer B.SilkS) hide
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text value VAL** (at 0 -9.525 180) (layer B.SilkS) hide
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user "JUMPER PADS" (at 0 10.16 180) (layer B.SilkS)
+ (effects (font (size 1.5 1.5) (thickness 0.2)) (justify mirror))
+ )
+ (fp_line (start 8.89 -7.62) (end -8.89 -7.62) (layer B.SilkS) (width 0.15))
+ (fp_line (start 8.89 -3.81) (end -8.89 -3.81) (layer B.SilkS) (width 0.15))
+ (fp_line (start 8.89 0) (end -8.89 0) (layer B.SilkS) (width 0.15))
+ (fp_line (start 8.89 3.81) (end -8.89 3.81) (layer B.SilkS) (width 0.15))
+ (fp_text user MOD (at -3.81 -5.715 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user "PPM V/V" (at -5.08 5.715 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user TELEM (at -5.08 -1.905 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user J-4 (at 6.35 -5.715 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user J-3 (at 6.35 -1.905 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user J-2 (at 6.35 1.905 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user J-1 (at 6.35 5.715 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_text user PPM\RX (at -5.08 1.905 180) (layer B.SilkS)
+ (effects (font (size 1 1) (thickness 0.15)) (justify mirror))
+ )
+ (fp_line (start 2.54 -4.445) (end 2.54 -6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 -6.985) (end 3.81 -6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 -6.985) (end 3.81 -4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 -4.445) (end 2.54 -4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 -4.445) (end -1.27 -6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 -6.985) (end 0 -6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 -6.985) (end 0 -4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 -4.445) (end -1.27 -4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 -0.635) (end 2.54 -3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 -3.175) (end 3.81 -3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 -3.175) (end 3.81 -0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 -0.635) (end 2.54 -0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 -0.635) (end -1.27 -3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 -3.175) (end 0 -3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 -3.175) (end 0 -0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 -0.635) (end -1.27 -0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 3.175) (end 2.54 0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 0.635) (end 3.81 0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 0.635) (end 3.81 3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 3.175) (end 2.54 3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 3.175) (end 0 3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 3.175) (end 0 0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 0.635) (end -1.27 0.635) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 0.635) (end -1.27 3.175) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 4.445) (end 0 6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start 0 6.985) (end -1.27 6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 6.985) (end -1.27 4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start -1.27 4.445) (end 0 4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 6.985) (end 3.81 6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 6.985) (end 3.81 4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 3.81 4.445) (end 2.54 4.445) (layer B.SilkS) (width 0.15))
+ (fp_line (start 2.54 4.445) (end 2.54 6.985) (layer B.SilkS) (width 0.15))
+ (fp_line (start -8.89 8.255) (end -8.89 -7.62) (layer B.SilkS) (width 0.15))
+ (fp_line (start 8.89 -7.62) (end 8.89 8.255) (layer B.SilkS) (width 0.15))
+ (fp_line (start 8.89 8.255) (end -8.89 8.255) (layer B.SilkS) (width 0.15))
+ )
+
+ (gr_circle (center 158.4 77.9) (end 158.6 77.8) (layer F.SilkS) (width 0.3))
+ (gr_circle (center 157.8 75) (end 157.8 75) (layer F.SilkS) (width 0.3) (tstamp 548B1EFC))
+ (gr_text "Board is designed to be\n used with XtremeLink\n2.4GHz JR Remote Module box\nNote: Tolerances may be a little\ntight and may need adjusting." (at 124.377 93.84 90) (layer Cmts.User)
+ (effects (font (size 1.5 1.5) (thickness 0.3)))
+ )
+ (gr_text "DIY-Multiprotocol Ver 2.3d\nAK Design Service 02/2016\nakdesignsvc@gmail.com" (at 172.466 90.17 90) (layer B.SilkS)
+ (effects (font (size 1.5 0.8) (thickness 0.15)) (justify mirror))
+ )
+ (gr_arc (start 182.3 59.3) (end 182.3 62.3) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_arc (start 141.2 59.3) (end 144.15 59.3) (angle 90) (layer Edge.Cuts) (width 0.1) (tstamp 5494C20B))
+ (gr_line (start 182.3 62.3) (end 182.3 77.3) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 141.2 98.15) (end 141.2 115.9) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 141.2 98.15) (end 144 98.15) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 144 77.3) (end 144 98.15) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 141.2 77.3) (end 144 77.3) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 141.2 62.3) (end 141.2 77.3) (angle 90) (layer Edge.Cuts) (width 0.1) (tstamp 5494C1E3))
+ (gr_line (start 144.15 59.3) (end 179.3 59.3) (angle 90) (layer Edge.Cuts) (width 0.1) (tstamp 5494C420))
+ (gr_line (start 179.5 77.3) (end 182.3 77.3) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 179.5 77.3) (end 179.5 98.15) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 179.5 98.15) (end 182.3 98.15) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 182.3 98.15) (end 182.3 115.9) (angle 90) (layer Edge.Cuts) (width 0.1))
+ (gr_line (start 141.2 115.9) (end 182.3 115.9) (angle 90) (layer Edge.Cuts) (width 0.1))
+
+ (segment (start 165.698 96) (end 162.024 96) (width 1) (layer F.Cu) (net 1))
+ (segment (start 162.024 96) (end 161 94.976) (width 1) (layer F.Cu) (net 1) (tstamp 548A0010))
+ (segment (start 156.302 93.714) (end 159.738 93.714) (width 1) (layer F.Cu) (net 1))
+ (segment (start 159.738 93.714) (end 161 94.976) (width 1) (layer F.Cu) (net 1) (tstamp 548A0006))
+ (segment (start 146 90.5) (end 147.5 92) (width 0.6) (layer B.Cu) (net 1))
+ (segment (start 150 69.5) (end 151.5 68) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489EC3D))
+ (segment (start 151.5 68) (end 151.5 65.5) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489EC48))
+ (segment (start 151.5 65.5) (end 152.5 64.5) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489EC4B))
+ (segment (start 156.302 93.714) (end 153.214 93.714) (width 0.6) (layer F.Cu) (net 1))
+ (segment (start 152.562 64.438) (end 152.562 61.7) (width 0.6) (layer F.Cu) (net 1) (tstamp 5489E1F3))
+ (segment (start 152.5 64.5) (end 152.562 64.438) (width 0.6) (layer F.Cu) (net 1) (tstamp 5489E1F2))
+ (via (at 152.5 64.5) (size 0.889) (layers F.Cu B.Cu) (net 1))
+ (segment (start 143 71) (end 144.5 69.5) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489E1DB))
+ (segment (start 143 74) (end 143 71) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489E1D6))
+ (segment (start 146 77) (end 143 74) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489E1D1))
+ (segment (start 146 90.5) (end 146 77) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489E1C5))
+ (via (at 152.5 93) (size 0.889) (layers F.Cu B.Cu) (net 1))
+ (segment (start 153.214 93.714) (end 152.5 93) (width 0.6) (layer F.Cu) (net 1) (tstamp 5489E1B7))
+ (segment (start 144.5 69.5) (end 150 69.5) (width 0.6) (layer B.Cu) (net 1))
+ (segment (start 151.5 92) (end 152.5 93) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489ECEE))
+ (segment (start 147.5 92) (end 151.5 92) (width 0.6) (layer B.Cu) (net 1) (tstamp 5489ECE3))
+ (segment (start 152.562 61.7) (end 155.6 61.7) (width 0.4) (layer F.Cu) (net 1))
+ (segment (start 155.6 60.9) (end 156 61.3) (width 0.254) (layer F.Cu) (net 1) (tstamp 548059AA))
+ (segment (start 173.5 89.05) (end 173.505 89.05) (width 0.254) (layer B.Cu) (net 2))
+ (segment (start 171.795457 87.221775) (end 173.5 88.926318) (width 0.254) (layer F.Cu) (net 2) (tstamp 5495BF3D))
+ (segment (start 173.5 89.05) (end 173.5 88.926318) (width 0.254) (layer F.Cu) (net 2))
+ (via (at 173.5 89.05) (size 0.889) (layers F.Cu B.Cu) (net 2))
+ (segment (start 169.935575 105.675425) (end 169.926 105.664) (width 0.254) (layer B.Cu) (net 2))
+ (segment (start 169.935575 105.675425) (end 170.815 104.945049) (width 0.254) (layer B.Cu) (net 2) (tstamp 54D531AA))
+ (segment (start 170.815 102.235) (end 170.815 104.945049) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E7D))
+ (segment (start 174.879 98.171) (end 170.815 102.235) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E72))
+ (segment (start 174.879 94.615) (end 174.879 98.171) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E6B))
+ (segment (start 174.117 93.853) (end 174.879 94.615) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E63))
+ (segment (start 174.117 89.662) (end 174.117 93.853) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E58))
+ (segment (start 173.505 89.05) (end 174.117 89.662) (width 0.254) (layer B.Cu) (net 2) (tstamp 56B50E4F))
+ (segment (start 150.41 107.16) (end 151.102 107.16) (width 0.254) (layer F.Cu) (net 2))
+ (segment (start 151.102 107.16) (end 151.765 107.823) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F878))
+ (segment (start 151.765 107.823) (end 160.782 107.823) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F881))
+ (segment (start 160.782 107.823) (end 161.798 106.807) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F88D))
+ (segment (start 161.798 106.807) (end 163.449 106.807) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F890))
+ (segment (start 163.449 106.807) (end 164.592 105.664) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F89D))
+ (segment (start 164.592 105.664) (end 169.926 105.664) (width 0.254) (layer F.Cu) (net 2) (tstamp 56B4F8A2))
+ (via (at 169.926 105.664) (size 0.889) (layers F.Cu B.Cu) (net 2))
+ (segment (start 169.926 105.664) (end 169.926 105.664) (width 0.254) (layer B.Cu) (net 2) (tstamp 5495BEE7))
+ (segment (start 150.41 107.16) (end 150.96 107.16) (width 0.254) (layer F.Cu) (net 2))
+ (segment (start 171.795457 87.295457) (end 171.795457 87.221775) (width 0.254) (layer F.Cu) (net 2) (tstamp 5481AEBF))
+ (segment (start 171.795457 87.221775) (end 171.795457 87.295457) (width 0.254) (layer F.Cu) (net 2))
+ (segment (start 166.670835 74.4) (end 168.35 74.4) (width 0.254) (layer B.Cu) (net 3))
+ (segment (start 159.4 71.7) (end 159.7 71.4) (width 0.254) (layer B.Cu) (net 3) (tstamp 5480C5CA))
+ (segment (start 159.7 71.4) (end 163.420835 71.4) (width 0.254) (layer B.Cu) (net 3) (tstamp 5480C5CD))
+ (segment (start 163.420835 71.4) (end 166.670835 74.4) (width 0.254) (layer B.Cu) (net 3) (tstamp 5480C5D1))
+ (segment (start 159.4 72.7) (end 159.4 71.7) (width 0.254) (layer B.Cu) (net 3))
+ (via (at 168.35 74.4) (size 0.889) (layers F.Cu B.Cu) (net 3))
+ (segment (start 168.415288 74.515288) (end 168.415288 79.890294) (width 0.254) (layer F.Cu) (net 3))
+ (segment (start 174.29 108.5) (end 172.7 108.5) (width 1) (layer F.Cu) (net 4))
+ (segment (start 170.9 101.5) (end 169.524 101.5) (width 1) (layer F.Cu) (net 4) (tstamp 5495E865))
+ (segment (start 171.8 102.4) (end 170.9 101.5) (width 1) (layer F.Cu) (net 4) (tstamp 5495E864))
+ (segment (start 171.8 107.6) (end 171.8 102.4) (width 1) (layer F.Cu) (net 4) (tstamp 5495E863))
+ (segment (start 172.7 108.5) (end 171.8 107.6) (width 1) (layer F.Cu) (net 4) (tstamp 5495E862))
+ (segment (start 165.698 98.286) (end 167.786 98.286) (width 1) (layer F.Cu) (net 4))
+ (segment (start 169.524 100.024) (end 169.524 101.5) (width 1) (layer F.Cu) (net 4) (tstamp 5489E132))
+ (segment (start 167.786 98.286) (end 169.524 100.024) (width 1) (layer F.Cu) (net 4) (tstamp 5489E12C))
+ (segment (start 159.2 66.9) (end 159.2 68.7) (width 0.254) (layer B.Cu) (net 5))
+ (segment (start 161.775791 88.8) (end 162.761319 87.814472) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068E8))
+ (segment (start 158.15 88.8) (end 161.775791 88.8) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068DC))
+ (segment (start 152.85 83.5) (end 158.15 88.8) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068D1))
+ (segment (start 152.85 76.15) (end 152.85 83.5) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068CE))
+ (segment (start 150.7 74) (end 152.85 76.15) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068CB))
+ (segment (start 144.75 74) (end 150.7 74) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068BF))
+ (segment (start 144.05 73.3) (end 144.75 74) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068BC))
+ (segment (start 144.05 71.7) (end 144.05 73.3) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068AE))
+ (segment (start 145 70.75) (end 144.05 71.7) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068A8))
+ (segment (start 154.25 70.75) (end 145 70.75) (width 0.254) (layer F.Cu) (net 5) (tstamp 548068A7))
+ (via (at 154.25 70.75) (size 0.889) (layers F.Cu B.Cu) (net 5))
+ (segment (start 157.25 70.75) (end 154.25 70.75) (width 0.254) (layer B.Cu) (net 5) (tstamp 5480689E))
+ (segment (start 159.2 68.7) (end 157.25 70.75) (width 0.254) (layer B.Cu) (net 5) (tstamp 54806898))
+ (segment (start 165.2 66.9) (end 165.2 67.9) (width 0.254) (layer F.Cu) (net 6))
+ (segment (start 155.2 67.9) (end 155.2 66.9) (width 0.254) (layer F.Cu) (net 6) (tstamp 547F88F2))
+ (segment (start 156.2 68.9) (end 155.2 67.9) (width 0.254) (layer F.Cu) (net 6) (tstamp 547F88E4))
+ (segment (start 164.2 68.9) (end 156.2 68.9) (width 0.254) (layer F.Cu) (net 6) (tstamp 547F88DF))
+ (segment (start 165.2 67.9) (end 164.2 68.9) (width 0.254) (layer F.Cu) (net 6) (tstamp 547F88D8))
+ (segment (start 161.2 66.9) (end 161.2 67.5) (width 0.254) (layer F.Cu) (net 7))
+ (segment (start 157.2 67.5) (end 157.2 66.9) (width 0.254) (layer F.Cu) (net 7) (tstamp 547F8908))
+ (segment (start 157.8 68.1) (end 157.2 67.5) (width 0.254) (layer F.Cu) (net 7) (tstamp 547F8901))
+ (segment (start 160.6 68.1) (end 157.8 68.1) (width 0.254) (layer F.Cu) (net 7) (tstamp 547F88FC))
+ (segment (start 161.2 67.5) (end 160.6 68.1) (width 0.254) (layer F.Cu) (net 7) (tstamp 547F88F9))
+ (segment (start 156 63.3) (end 155.8 63.3) (width 0.254) (layer F.Cu) (net 8))
+ (segment (start 162.902894 89.9) (end 163.874871 88.928023) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806955))
+ (segment (start 158.4 89.9) (end 162.902894 89.9) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806950))
+ (segment (start 152.3 83.8) (end 158.4 89.9) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806945))
+ (segment (start 152.3 76.441307) (end 152.3 83.8) (width 0.254) (layer F.Cu) (net 8) (tstamp 5480693D))
+ (segment (start 150.487498 74.55) (end 152.3 76.441307) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806938))
+ (segment (start 144.503846 74.55) (end 150.487498 74.55) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806934))
+ (segment (start 143.5 73.506) (end 144.503846 74.55) (width 0.254) (layer F.Cu) (net 8) (tstamp 5480692E))
+ (segment (start 143.5 71.55) (end 143.5 73.506) (width 0.254) (layer F.Cu) (net 8) (tstamp 5480692C))
+ (segment (start 144.639062 70.2) (end 143.5 71.55) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806927))
+ (segment (start 151.8 70.2) (end 144.639062 70.2) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806922))
+ (segment (start 153.25 68.75) (end 151.8 70.2) (width 0.254) (layer F.Cu) (net 8) (tstamp 5480691C))
+ (segment (start 153.25 65.85) (end 153.25 68.75) (width 0.254) (layer F.Cu) (net 8) (tstamp 54806915))
+ (segment (start 155.8 63.3) (end 153.25 65.85) (width 0.254) (layer F.Cu) (net 8) (tstamp 5480690B))
+ (segment (start 164 61.3) (end 167.4 61.3) (width 0.254) (layer F.Cu) (net 9))
+ (segment (start 176.2 76.631631) (end 170.678313 82.153318) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B51F))
+ (segment (start 176.2 72.1) (end 176.2 76.631631) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B51A))
+ (segment (start 177.25 71.05) (end 176.2 72.1) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B515))
+ (segment (start 177.25 68.1) (end 177.25 71.05) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B501))
+ (segment (start 174.85 65.7) (end 177.25 68.1) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B4FA))
+ (segment (start 171.8 65.7) (end 174.85 65.7) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B4F5))
+ (segment (start 167.4 61.3) (end 171.8 65.7) (width 0.254) (layer F.Cu) (net 9) (tstamp 5480B4DF))
+ (segment (start 144.951559 94.145724) (end 144.937197 106.162803) (width 0.254) (layer F.Cu) (net 10))
+ (segment (start 144.951559 94.145724) (end 147.920535 91.15) (width 0.254) (layer F.Cu) (net 10) (tstamp 54807187))
+ (segment (start 147.920535 91.15) (end 162.802367 91.15) (width 0.254) (layer F.Cu) (net 10) (tstamp 54807198))
+ (segment (start 164.449607 89.50276) (end 162.802367 91.15) (width 0.254) (layer F.Cu) (net 10) (tstamp 5480719C))
+ (segment (start 143.94 107.16) (end 142.79 107.16) (width 0.254) (layer F.Cu) (net 10) (tstamp 5481B740))
+ (segment (start 144.937197 106.162803) (end 143.94 107.16) (width 0.254) (layer F.Cu) (net 10) (tstamp 5481B73A))
+ (segment (start 176.5 72.1) (end 176.4 72.1) (width 0.254) (layer B.Cu) (net 11))
+ (segment (start 171.2 76.25) (end 170.8 76.65) (width 0.254) (layer B.Cu) (net 11) (tstamp 54849775))
+ (segment (start 172.25 76.25) (end 171.2 76.25) (width 0.254) (layer B.Cu) (net 11) (tstamp 54849767))
+ (segment (start 176.4 72.1) (end 172.25 76.25) (width 0.254) (layer B.Cu) (net 11) (tstamp 54849758))
+ (segment (start 153.26 112.24) (end 156.972 108.528) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480AC29))
+ (segment (start 156.972 108.528) (end 156.972 99.695) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480AC2E))
+ (segment (start 150.41 112.24) (end 153.26 112.24) (width 0.254) (layer B.Cu) (net 11))
+ (segment (start 165.862 90.805) (end 165.862 85.344) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480C28B))
+ (segment (start 156.972 99.695) (end 165.862 90.805) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480C280))
+ (segment (start 177.8 72.1) (end 176.5 72.1) (width 0.254) (layer B.Cu) (net 11))
+ (segment (start 176.5 72.1) (end 176.35 72.1) (width 0.254) (layer B.Cu) (net 11) (tstamp 54849756))
+ (segment (start 170.8 76.65) (end 169.65 76.65) (width 0.254) (layer B.Cu) (net 11) (tstamp 5484978F))
+ (segment (start 165.8 80.5) (end 165.862 85.344) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480B3E2))
+ (segment (start 169.65 76.65) (end 165.8 80.5) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480B3DF))
+ (segment (start 165.862 85.344) (end 165.862 85.344) (width 0.254) (layer B.Cu) (net 11) (tstamp 5480B3EE))
+ (segment (start 175.4 65.4) (end 177.8 67.8) (width 0.254) (layer F.Cu) (net 11) (tstamp 54806520))
+ (segment (start 177.8 67.8) (end 177.8 72.1) (width 0.254) (layer F.Cu) (net 11) (tstamp 54806530))
+ (via (at 177.8 72.1) (size 0.889) (layers F.Cu B.Cu) (net 11))
+ (segment (start 175.4 65.4) (end 175.4 63.37) (width 0.254) (layer F.Cu) (net 11))
+ (segment (start 165.862 85.344) (end 165.8 89.3) (width 0.254) (layer F.Cu) (net 11))
+ (via (at 165.862 85.344) (size 0.889) (layers F.Cu B.Cu) (net 11))
+ (segment (start 165.8 89.3) (end 165.024344 90.075656) (width 0.254) (layer F.Cu) (net 11) (tstamp 54806E64))
+ (segment (start 165.024344 90.075656) (end 165.024344 90.077496) (width 0.254) (layer F.Cu) (net 11) (tstamp 54806E68))
+ (segment (start 165.024344 90.075656) (end 165.024344 90.077496) (width 0.254) (layer F.Cu) (net 11) (tstamp 5480655E))
+ (segment (start 177.94 60.83) (end 178.53 60.83) (width 0.254) (layer B.Cu) (net 12))
+ (via (at 168.35 86.65) (size 0.889) (layers F.Cu B.Cu) (net 12))
+ (segment (start 168.35 86.65) (end 166.6 88.5) (width 0.254) (layer F.Cu) (net 12) (tstamp 54806F35))
+ (segment (start 166.6 88.5) (end 166.6 89.651313) (width 0.254) (layer F.Cu) (net 12) (tstamp 54806F36))
+ (segment (start 166.6 89.651313) (end 165.59908 90.652233) (width 0.254) (layer F.Cu) (net 12) (tstamp 54806F3B))
+ (segment (start 168.35 86.65) (end 168.35 86.65) (width 0.254) (layer B.Cu) (net 12) (tstamp 5480B90C))
+ (segment (start 179.85 75.248723) (end 168.35 86.65) (width 0.254) (layer B.Cu) (net 12) (tstamp 5480B906))
+ (segment (start 179.85 62.15) (end 179.85 75.248723) (width 0.254) (layer B.Cu) (net 12) (tstamp 5480B8FD))
+ (segment (start 178.53 60.83) (end 179.85 62.15) (width 0.254) (layer B.Cu) (net 12) (tstamp 5480B8F6))
+ (segment (start 142.79 112.24) (end 144.36 112.24) (width 0.254) (layer F.Cu) (net 12))
+ (segment (start 164.551313 91.7) (end 165.59908 90.652233) (width 0.254) (layer F.Cu) (net 12) (tstamp 548071C6))
+ (segment (start 148.45 91.7) (end 164.551313 91.7) (width 0.254) (layer F.Cu) (net 12) (tstamp 548071BC))
+ (segment (start 145.5 94.65) (end 148.45 91.7) (width 0.254) (layer F.Cu) (net 12) (tstamp 548071B2))
+ (segment (start 145.5 111.1) (end 145.5 94.65) (width 0.254) (layer F.Cu) (net 12) (tstamp 548071AA))
+ (segment (start 144.36 112.24) (end 145.5 111.1) (width 0.254) (layer F.Cu) (net 12) (tstamp 548071A3))
+ (segment (start 165.647767 90.652233) (end 165.59908 90.652233) (width 0.254) (layer F.Cu) (net 12) (tstamp 54806497))
+ (segment (start 175.768 95.631) (end 175.768 94.615) (width 0.254) (layer B.Cu) (net 13))
+ (segment (start 172.93 85.3) (end 174.733 87.103) (width 0.254) (layer B.Cu) (net 13) (tstamp 5480C7C7))
+ (segment (start 174.733 87.103) (end 174.733 93.58) (width 0.254) (layer B.Cu) (net 13) (tstamp 5480C7CD))
+ (segment (start 165.597478 79.897478) (end 165.591896 79.897478) (width 0.254) (layer F.Cu) (net 13) (tstamp 5480B124))
+ (segment (start 171 85.3) (end 165.597478 79.897478) (width 0.254) (layer F.Cu) (net 13) (tstamp 5480B123))
+ (via (at 171 85.3) (size 0.889) (layers F.Cu B.Cu) (net 13))
+ (segment (start 171 85.3) (end 172.93 85.3) (width 0.254) (layer B.Cu) (net 13))
+ (segment (start 175.768 94.615) (end 174.733 93.58) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FAD6))
+ (segment (start 165.11016 108.966) (end 165.11016 107.83316) (width 0.254) (layer B.Cu) (net 13))
+ (segment (start 175.768 95.631) (end 175.768 96.901) (width 0.254) (layer F.Cu) (net 13) (tstamp 56B4FA77))
+ (via (at 175.768 95.631) (size 0.889) (layers F.Cu B.Cu) (net 13))
+ (segment (start 175.768 98.298) (end 175.768 95.631) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FA70))
+ (segment (start 171.45 102.616) (end 175.768 98.298) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FA67))
+ (segment (start 171.45 105.9688) (end 171.45 102.616) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FA5F))
+ (segment (start 170.561 106.68) (end 171.45 105.9688) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FA5E))
+ (via (at 170.561 106.68) (size 0.889) (layers F.Cu B.Cu) (net 13))
+ (segment (start 165.481 106.68) (end 170.561 106.68) (width 0.254) (layer F.Cu) (net 13) (tstamp 56B4FA52))
+ (segment (start 165.1 107.061) (end 165.481 106.68) (width 0.254) (layer F.Cu) (net 13) (tstamp 56B4FA4F))
+ (segment (start 165.1 107.823) (end 165.1 107.061) (width 0.254) (layer F.Cu) (net 13) (tstamp 56B4FA4E))
+ (via (at 165.1 107.823) (size 0.889) (layers F.Cu B.Cu) (net 13))
+ (segment (start 165.11016 107.83316) (end 165.1 107.823) (width 0.254) (layer B.Cu) (net 13) (tstamp 56B4FA46))
+ (segment (start 165.5 70.537164) (end 165.5 76.85) (width 0.254) (layer F.Cu) (net 14))
+ (segment (start 166.25904 69.89096) (end 165.5 70.537164) (width 0.254) (layer F.Cu) (net 14) (tstamp 5480BE2C))
+ (via (at 165.5 76.75) (size 0.889) (layers F.Cu B.Cu) (net 14))
+ (segment (start 165.5 76.75) (end 163.4 78.85) (width 0.254) (layer B.Cu) (net 14) (tstamp 5480BE52))
+ (segment (start 163.4 78.85) (end 163.4 85.3) (width 0.254) (layer B.Cu) (net 14) (tstamp 5480BE53))
+ (via (at 163.4 85.3) (size 0.889) (layers F.Cu B.Cu) (net 14))
+ (segment (start 163.4 85.3) (end 163.4 86.1) (width 0.254) (layer F.Cu) (net 14) (tstamp 5480BE5E))
+ (segment (start 163.4 86.1) (end 162.260265 87.239735) (width 0.254) (layer F.Cu) (net 14) (tstamp 5480BE5F))
+ (segment (start 162.186583 87.239735) (end 162.260265 87.239735) (width 0.254) (layer F.Cu) (net 14) (tstamp 5480BE61))
+ (segment (start 166.25904 69.89096) (end 166.74682 69.89096) (width 0.254) (layer F.Cu) (net 14))
+ (segment (start 167.2 66.9) (end 167.2 65.1) (width 0.254) (layer B.Cu) (net 14))
+ (segment (start 165.4 63.3) (end 164 63.3) (width 0.254) (layer B.Cu) (net 14) (tstamp 547F89D7))
+ (segment (start 167.2 65.1) (end 165.4 63.3) (width 0.254) (layer B.Cu) (net 14) (tstamp 547F89C8))
+ (segment (start 167.2 66.9) (end 167.2 69.43778) (width 0.254) (layer F.Cu) (net 14))
+ (segment (start 167.2 69.43778) (end 166.74682 69.89096) (width 0.254) (layer F.Cu) (net 14) (tstamp 547F87E6))
+ (segment (start 153 66.1) (end 154.2 64.9) (width 0.254) (layer B.Cu) (net 15) (tstamp 54805C94))
+ (segment (start 154.2 64.9) (end 160.4 64.9) (width 0.254) (layer B.Cu) (net 15) (tstamp 54805C9C))
+ (segment (start 162 63.3) (end 160.4 64.9) (width 0.254) (layer B.Cu) (net 15) (tstamp 54805CA1))
+ (segment (start 153 72) (end 153 66.1) (width 0.254) (layer B.Cu) (net 15))
+ (segment (start 153 72) (end 153.4 72.7) (width 0.254) (layer B.Cu) (net 15) (tstamp 54852A88))
+ (segment (start 158.001639 87.75) (end 160.5 87.75) (width 0.254) (layer F.Cu) (net 15))
+ (segment (start 153.4 83.222582) (end 158.001639 87.75) (width 0.254) (layer F.Cu) (net 15) (tstamp 54805FA1))
+ (segment (start 153.4 72.7) (end 153.4 83.222582) (width 0.254) (layer F.Cu) (net 15))
+ (segment (start 160.5 87.75) (end 161.629807 86.682959) (width 0.254) (layer F.Cu) (net 15) (tstamp 5480701A))
+ (segment (start 171.2 66.9) (end 171.2 65.95) (width 0.254) (layer F.Cu) (net 15))
+ (segment (start 163.85 65.15) (end 162 63.3) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F87A3))
+ (segment (start 170.4 65.15) (end 163.85 65.15) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F8791))
+ (segment (start 171.2 65.95) (end 170.4 65.15) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F8782))
+ (segment (start 170.6 67.5) (end 171.2 66.9) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F876F))
+ (segment (start 170.6 71.3) (end 170.6 67.5) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F876A))
+ (segment (start 169.28682 72.43096) (end 169.46904 72.43096) (width 0.254) (layer F.Cu) (net 15))
+ (segment (start 169.46904 72.43096) (end 170.6 71.3) (width 0.254) (layer F.Cu) (net 15) (tstamp 547F8767))
+ (segment (start 173.038 71.338) (end 173.038 74.5) (width 0.254) (layer F.Cu) (net 16) (tstamp 548055D5))
+ (segment (start 171.82682 69.89096) (end 171.82682 70.12682) (width 0.254) (layer F.Cu) (net 16))
+ (segment (start 171.82682 70.12682) (end 173.038 71.338) (width 0.254) (layer F.Cu) (net 16) (tstamp 548055CD))
+ (segment (start 164.8 87) (end 164.689343 87) (width 0.254) (layer F.Cu) (net 17))
+ (via (at 164.8 87) (size 0.889) (layers F.Cu B.Cu) (net 17))
+ (segment (start 164.689343 87) (end 163.318095 88.371248) (width 0.254) (layer F.Cu) (net 17) (tstamp 54947F03))
+ (segment (start 171.8 75.3) (end 171.2 75.3) (width 0.254) (layer B.Cu) (net 17))
+ (segment (start 163.318095 88.371248) (end 163.318095 88.181905) (width 0.254) (layer F.Cu) (net 17) (tstamp 5480668D))
+ (segment (start 171.82682 75.27318) (end 171.8 75.3) (width 0.254) (layer F.Cu) (net 17) (tstamp 5480665F))
+ (via (at 171.8 75.3) (size 0.889) (layers F.Cu B.Cu) (net 17))
+ (segment (start 171.82682 75.27318) (end 171.82682 72.43096) (width 0.254) (layer F.Cu) (net 17))
+ (segment (start 164.8 87) (end 164.8 87) (width 0.254) (layer B.Cu) (net 17) (tstamp 5480B253))
+ (segment (start 164.8 80.528229) (end 164.8 87) (width 0.254) (layer B.Cu) (net 17) (tstamp 5480B247))
+ (segment (start 169.439098 76.1) (end 164.8 80.528229) (width 0.254) (layer B.Cu) (net 17) (tstamp 5480B242))
+ (segment (start 170.4 76.1) (end 169.439098 76.1) (width 0.254) (layer B.Cu) (net 17) (tstamp 5480B23E))
+ (segment (start 171.2 75.3) (end 170.4 76.1) (width 0.254) (layer B.Cu) (net 17) (tstamp 5480B22E))
+ (segment (start 161.29 105.791) (end 160.02 105.791) (width 0.254) (layer B.Cu) (net 18))
+ (segment (start 157.607 100.33) (end 165.837 92.1) (width 0.254) (layer B.Cu) (net 18) (tstamp 56B4F100))
+ (segment (start 167.315728 90.634272) (end 165.85 92.1) (width 0.254) (layer F.Cu) (net 18) (tstamp 5495BB96))
+ (segment (start 165.85 92.1) (end 165.837 92.1) (width 0.254) (layer B.Cu) (net 18))
+ (via (at 165.85 92.1) (size 0.889) (layers F.Cu B.Cu) (net 18))
+ (segment (start 168.382959 90.634272) (end 167.315728 90.634272) (width 0.254) (layer F.Cu) (net 18))
+ (via (at 161.29 105.791) (size 0.889) (layers F.Cu B.Cu) (net 18))
+ (segment (start 157.607 104.648) (end 157.607 100.33) (width 0.254) (layer B.Cu) (net 18) (tstamp 56B4F0ED))
+ (segment (start 161.29 105.791) (end 162.687 105.791) (width 0.254) (layer F.Cu) (net 18))
+ (segment (start 158.242 105.283) (end 157.607 104.648) (width 0.254) (layer B.Cu) (net 18) (tstamp 56B50CEE))
+ (segment (start 159.512 105.283) (end 158.242 105.283) (width 0.254) (layer B.Cu) (net 18) (tstamp 56B50CEC))
+ (segment (start 160.02 105.791) (end 159.512 105.283) (width 0.254) (layer B.Cu) (net 18) (tstamp 56B50CE1))
+ (segment (start 178.75 67.9) (end 178.75 72.5) (width 0.254) (layer F.Cu) (net 18))
+ (segment (start 175.4 61.3) (end 176.6 62.5) (width 0.254) (layer F.Cu) (net 18) (tstamp 54806BDC))
+ (segment (start 176.6 62.5) (end 176.6 65.75) (width 0.254) (layer F.Cu) (net 18) (tstamp 54806BE2))
+ (segment (start 176.6 65.75) (end 178.75 67.9) (width 0.254) (layer F.Cu) (net 18) (tstamp 54806BE9))
+ (segment (start 175.4 60.83) (end 175.4 61.3) (width 0.254) (layer F.Cu) (net 18))
+ (segment (start 176.95 74.3) (end 176.95 89.65) (width 0.254) (layer F.Cu) (net 18) (tstamp 548529BC))
+ (segment (start 178.75 72.5) (end 176.95 74.3) (width 0.254) (layer F.Cu) (net 18) (tstamp 548529AA))
+ (segment (start 176.95 89.65) (end 174.5 92.1) (width 0.254) (layer F.Cu) (net 18) (tstamp 548529CF))
+ (segment (start 174.5 92.1) (end 165.898687 92.1) (width 0.254) (layer F.Cu) (net 18) (tstamp 54806C0E))
+ (segment (start 175.4 60.83) (end 175.4 60.9) (width 0.254) (layer F.Cu) (net 18))
+ (segment (start 174.29 103.42) (end 174.29 101.173) (width 0.254) (layer F.Cu) (net 19))
+ (segment (start 175.768 99.695) (end 175.768 98.425) (width 0.254) (layer F.Cu) (net 19) (tstamp 56B4F730))
+ (segment (start 174.29 101.173) (end 175.768 99.695) (width 0.254) (layer F.Cu) (net 19) (tstamp 56B4F729))
+ (segment (start 166.61384 110.744) (end 170.942 110.744) (width 0.254) (layer B.Cu) (net 19))
+ (segment (start 173.186 103.42) (end 174.29 103.42) (width 0.254) (layer B.Cu) (net 19) (tstamp 56B4F6D2))
+ (segment (start 172.72 103.886) (end 173.186 103.42) (width 0.254) (layer B.Cu) (net 19) (tstamp 56B4F6D0))
+ (segment (start 172.72 108.966) (end 172.72 103.886) (width 0.254) (layer B.Cu) (net 19) (tstamp 56B4F6CD))
+ (segment (start 170.942 110.744) (end 172.72 108.966) (width 0.254) (layer B.Cu) (net 19) (tstamp 56B4F6B7))
+ (segment (start 173 78.5) (end 175.7 78.5) (width 0.254) (layer B.Cu) (net 20))
+ (segment (start 172.93 60.83) (end 172.86 60.83) (width 0.254) (layer B.Cu) (net 20))
+ (via (at 173 78.5) (size 0.889) (layers F.Cu B.Cu) (net 20))
+ (segment (start 179.3 62.9) (end 179.3 74.9) (width 0.254) (layer B.Cu) (net 20) (tstamp 54806C39))
+ (segment (start 178.5 62.1) (end 179.3 62.9) (width 0.254) (layer B.Cu) (net 20) (tstamp 54806C32))
+ (segment (start 174.2 62.1) (end 178.5 62.1) (width 0.254) (layer B.Cu) (net 20) (tstamp 54806C2C))
+ (segment (start 172.93 60.83) (end 174.2 62.1) (width 0.254) (layer B.Cu) (net 20) (tstamp 54806C28))
+ (segment (start 175.7 78.5) (end 179.3 74.9) (width 0.254) (layer B.Cu) (net 20) (tstamp 5488AF2A))
+ (segment (start 149.7 64.65) (end 143.5 64.65) (width 0.254) (layer F.Cu) (net 20))
+ (segment (start 173 78.5) (end 173.038 78.5) (width 0.254) (layer F.Cu) (net 20) (tstamp 54806C64))
+ (segment (start 173.038 78.5) (end 173 78.5) (width 0.254) (layer F.Cu) (net 20) (tstamp 54806C65))
+ (segment (start 173 78.5) (end 173.038 78.5) (width 0.254) (layer F.Cu) (net 20) (tstamp 54806C6B))
+ (segment (start 172.86 60.83) (end 170.93 60.83) (width 0.254) (layer F.Cu) (net 20))
+ (segment (start 143.5 62.7) (end 143.5 64.65) (width 0.254) (layer F.Cu) (net 20) (tstamp 548063F5))
+ (segment (start 146.4 59.8) (end 143.5 62.7) (width 0.254) (layer F.Cu) (net 20) (tstamp 548063F4))
+ (segment (start 169.9 59.8) (end 146.4 59.8) (width 0.254) (layer F.Cu) (net 20) (tstamp 548063F2))
+ (segment (start 170.93 60.83) (end 169.9 59.8) (width 0.254) (layer F.Cu) (net 20) (tstamp 548063F1))
+ (segment (start 173.038 76.5) (end 173.038 78.5) (width 0.254) (layer F.Cu) (net 20))
+ (segment (start 173.038 78.5) (end 173.038 78.658527) (width 0.254) (layer F.Cu) (net 20) (tstamp 54806C6C))
+ (segment (start 173.038 78.658527) (end 170.110761 81.585766) (width 0.254) (layer F.Cu) (net 20) (tstamp 548060CC))
+ (segment (start 166.624 110.744) (end 168.148 110.744) (width 0.254) (layer F.Cu) (net 21))
+ (segment (start 169.546801 80.897199) (end 169.546801 81.021806) (width 0.254) (layer F.Cu) (net 21) (tstamp 56B501E2))
+ (segment (start 171.069 79.375) (end 169.546801 80.897199) (width 0.254) (layer F.Cu) (net 21) (tstamp 56B501E1))
+ (via (at 171.069 79.375) (size 0.889) (layers F.Cu B.Cu) (net 21))
+ (segment (start 167.513 82.931) (end 171.069 79.375) (width 0.254) (layer B.Cu) (net 21) (tstamp 56B501D0))
+ (segment (start 167.513 87.376) (end 167.513 82.931) (width 0.254) (layer B.Cu) (net 21) (tstamp 56B501BB))
+ (segment (start 168.91 88.773) (end 167.513 87.376) (width 0.254) (layer B.Cu) (net 21) (tstamp 56B501B3))
+ (segment (start 168.91 109.728) (end 168.91 88.773) (width 0.254) (layer B.Cu) (net 21) (tstamp 56B50156))
+ (segment (start 169.037 109.855) (end 168.91 109.728) (width 0.254) (layer B.Cu) (net 21) (tstamp 56B50155))
+ (via (at 169.037 109.855) (size 0.889) (layers F.Cu B.Cu) (net 21))
+ (segment (start 168.148 110.744) (end 169.037 109.855) (width 0.254) (layer F.Cu) (net 21) (tstamp 56B5014C))
+ (segment (start 169.2 69.80414) (end 169.28682 69.89096) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F87DF))
+ (segment (start 155.4 72.7) (end 155.4 72.9) (width 0.254) (layer F.Cu) (net 22))
+ (segment (start 164.2 79.637094) (end 165.02614 80.463234) (width 0.254) (layer F.Cu) (net 22) (tstamp 54805F94))
+ (segment (start 164.2 76.1) (end 164.2 79.637094) (width 0.254) (layer F.Cu) (net 22) (tstamp 54805F8E))
+ (segment (start 162.6 74.5) (end 164.2 76.1) (width 0.254) (layer F.Cu) (net 22) (tstamp 54805F85))
+ (segment (start 157 74.5) (end 162.6 74.5) (width 0.254) (layer F.Cu) (net 22) (tstamp 54805F77))
+ (segment (start 155.4 72.9) (end 157 74.5) (width 0.254) (layer F.Cu) (net 22) (tstamp 54805F65))
+ (segment (start 155.4 72.7) (end 155.4 69.3) (width 0.254) (layer F.Cu) (net 22))
+ (segment (start 156 65.3) (end 158 63.3) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F895A))
+ (segment (start 154.6 65.3) (end 156 65.3) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F8953))
+ (segment (start 153.8 66.1) (end 154.6 65.3) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F8950))
+ (segment (start 153.8 67.7) (end 153.8 66.1) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F894B))
+ (segment (start 155.4 69.3) (end 153.8 67.7) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F893C))
+ (segment (start 169.2 66.9) (end 169.2 66.7) (width 0.254) (layer F.Cu) (net 22))
+ (segment (start 158 64.7) (end 158 63.3) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F8849))
+ (segment (start 159 65.7) (end 158 64.7) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F8846))
+ (segment (start 168.2 65.7) (end 159 65.7) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F883A))
+ (segment (start 169.2 66.7) (end 168.2 65.7) (width 0.254) (layer F.Cu) (net 22) (tstamp 547F8834))
+ (segment (start 169.2 66.9) (end 169.2 69.80414) (width 0.254) (layer F.Cu) (net 22))
+ (segment (start 168.021 108.712) (end 169.291 108.712) (width 0.254) (layer F.Cu) (net 23))
+ (segment (start 167.894 112.522) (end 170.1165 110.2995) (width 0.254) (layer F.Cu) (net 23) (tstamp 56B4F69A))
+ (segment (start 168.021 108.712) (end 168.021 108.712) (width 0.254) (layer B.Cu) (net 23) (tstamp 56B4F61E))
+ (via (at 168.021 108.712) (size 0.889) (layers F.Cu B.Cu) (net 23))
+ (segment (start 166.624 112.522) (end 167.894 112.522) (width 0.254) (layer F.Cu) (net 23))
+ (segment (start 170.1165 109.5375) (end 170.1165 110.2995) (width 0.254) (layer F.Cu) (net 23) (tstamp 56B4FBB7))
+ (segment (start 169.291 108.712) (end 170.1165 109.5375) (width 0.254) (layer F.Cu) (net 23) (tstamp 56B4FBAF))
+ (segment (start 169.6 77.75) (end 170.2 77.75) (width 0.254) (layer B.Cu) (net 23) (tstamp 5495BBD2))
+ (segment (start 169.6 77.75) (end 166.9 80.45) (width 0.254) (layer B.Cu) (net 23) (tstamp 5495BBF2))
+ (segment (start 166.9 80.45) (end 166.9 87.778265) (width 0.254) (layer B.Cu) (net 23) (tstamp 5495BBF5))
+ (segment (start 168.979248 80.454254) (end 168.995746 80.454254) (width 0.254) (layer F.Cu) (net 23))
+ (segment (start 170.2 77.75) (end 170.2 77.75) (width 0.254) (layer B.Cu) (net 23) (tstamp 5495BBD1))
+ (via (at 170.2 77.75) (size 0.889) (layers F.Cu B.Cu) (net 23))
+ (segment (start 170.2 79.25) (end 170.2 77.75) (width 0.254) (layer F.Cu) (net 23) (tstamp 5495BBC7))
+ (segment (start 168.995746 80.454254) (end 170.2 79.25) (width 0.254) (layer F.Cu) (net 23) (tstamp 5495BBB4))
+ (segment (start 168.275 89.163078) (end 166.9 87.778265) (width 0.254) (layer B.Cu) (net 23) (tstamp 54BD421B))
+ (segment (start 168.275 108.745) (end 168.275 89.163078) (width 0.254) (layer B.Cu) (net 23))
+ (segment (start 161.05 82.144656) (end 162.197359 83.292015) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA56))
+ (segment (start 161.05 80.3) (end 161.05 82.144656) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA4E))
+ (segment (start 159.7 78.95) (end 161.05 80.3) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA48))
+ (segment (start 158.9 78.95) (end 159.7 78.95) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA45))
+ (segment (start 157.031631 78.218369) (end 157.031631 78.275996) (width 0.254) (layer F.Cu) (net 24))
+ (segment (start 157.031631 78.275996) (end 158.312132 79.556497) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA72))
+ (segment (start 158.312132 79.556497) (end 158.312132 79.537868) (width 0.254) (layer F.Cu) (net 24))
+ (segment (start 158.312132 79.537868) (end 158.9 78.95) (width 0.254) (layer F.Cu) (net 24) (tstamp 54BBDA3F))
+ (segment (start 156.481631 83.631631) (end 156.49974 83.631631) (width 0.254) (layer F.Cu) (net 25))
+ (segment (start 156.49974 83.631631) (end 157.887868 82.243503) (width 0.254) (layer F.Cu) (net 25) (tstamp 54BBDA69))
+ (segment (start 160.017335 82.243503) (end 161.631603 83.857771) (width 0.254) (layer F.Cu) (net 25) (tstamp 54BD75B1))
+ (segment (start 161.473832 83.7) (end 161.631603 83.857771) (width 0.254) (layer F.Cu) (net 25) (tstamp 54805DFB))
+ (segment (start 157.887868 82.243503) (end 160.017335 82.243503) (width 0.254) (layer F.Cu) (net 25))
+ (segment (start 161.4 72.7) (end 161.4 74) (width 0.6) (layer B.Cu) (net 26))
+ (via (at 154 97) (size 0.889) (layers F.Cu B.Cu) (net 26))
+ (segment (start 161.818369 81.781513) (end 162.763115 82.726259) (width 0.254) (layer F.Cu) (net 26) (tstamp 54BBDDC6))
+ (segment (start 161.35 72.7) (end 163.35 72.7) (width 0.6) (layer B.Cu) (net 26))
+ (segment (start 172.74778 74.05) (end 174.36682 72.43096) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD7D7))
+ (segment (start 170.3 74.05) (end 172.74778 74.05) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD7D1))
+ (segment (start 168.8 75.55) (end 170.3 74.05) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD7CE))
+ (segment (start 166.2 75.55) (end 168.8 75.55) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD7C4))
+ (segment (start 163.35 72.7) (end 166.2 75.55) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD7C0))
+ (segment (start 162.763115 82.726259) (end 162.763115 82.763115) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 164.9 83.2) (end 164.9 82.55) (width 0.254) (layer F.Cu) (net 26) (tstamp 548A05F3))
+ (segment (start 164.3 83.8) (end 164.9 83.2) (width 0.254) (layer F.Cu) (net 26) (tstamp 548A05F0))
+ (segment (start 163.8 83.8) (end 164.3 83.8) (width 0.254) (layer F.Cu) (net 26) (tstamp 548A05EE))
+ (segment (start 162.763115 82.763115) (end 163.8 83.8) (width 0.254) (layer F.Cu) (net 26) (tstamp 548A05E8))
+ (segment (start 151.024 99.976) (end 151.024 101.5) (width 0.6) (layer F.Cu) (net 26))
+ (segment (start 154 97) (end 151.024 99.976) (width 0.6) (layer F.Cu) (net 26) (tstamp 5489E24A))
+ (segment (start 151.024 101.5) (end 150.524 102) (width 0.6) (layer F.Cu) (net 26) (tstamp 5489E486))
+ (segment (start 156.302 96) (end 155 96) (width 0.6) (layer F.Cu) (net 26))
+ (segment (start 155 96) (end 154 97) (width 0.6) (layer F.Cu) (net 26) (tstamp 5489E169))
+ (segment (start 168.187989 89.3) (end 168.187989 89.30184) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 164.9 82.55) (end 167.7 85.35) (width 0.254) (layer F.Cu) (net 26) (tstamp 548A05F8))
+ (segment (start 167.7 85.35) (end 168.425 85.35) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C3A8))
+ (segment (start 168.425 85.35) (end 169.24231 86.330773) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C3AC))
+ (segment (start 169.24231 86.330773) (end 169.200848 87.182555) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C3AF))
+ (segment (start 169.200848 87.182555) (end 168.202429 88.097773) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C3B2))
+ (segment (start 168.202429 88.097773) (end 168.187989 89.3) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C3B9))
+ (segment (start 168.187989 89.30184) (end 168.957696 90.059536) (width 0.254) (layer F.Cu) (net 26) (tstamp 5481BA89))
+ (segment (start 163.894627 81.594746) (end 163.894627 81.544627) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 163.894627 81.544627) (end 164.9 82.55) (width 0.254) (layer F.Cu) (net 26) (tstamp 5480C399))
+ (segment (start 177.94 63.37) (end 177.94 64.36) (width 0.6) (layer B.Cu) (net 26))
+ (segment (start 177.94 64.36) (end 175.4 66.9) (width 0.6) (layer B.Cu) (net 26) (tstamp 548065C6))
+ (segment (start 175.4 66.9) (end 173.2 66.9) (width 0.6) (layer B.Cu) (net 26) (tstamp 548065D0))
+ (segment (start 174.562 74.5) (end 174.562 76.5) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 174.36682 72.43096) (end 174.36682 74.30482) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 174.36682 74.30482) (end 174.562 74.5) (width 0.254) (layer F.Cu) (net 26) (tstamp 548055C3))
+ (segment (start 173.2 66.9) (end 174.9 66.9) (width 0.6) (layer F.Cu) (net 26))
+ (segment (start 176.45 70.59778) (end 174.61682 72.43096) (width 0.6) (layer F.Cu) (net 26) (tstamp 547F8804))
+ (segment (start 176.45 68.45) (end 176.45 70.59778) (width 0.6) (layer F.Cu) (net 26) (tstamp 547F87FF))
+ (segment (start 174.9 66.9) (end 176.45 68.45) (width 0.6) (layer F.Cu) (net 26) (tstamp 547F87F7))
+ (segment (start 159.3 75.95) (end 159.45 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBDFA7))
+ (segment (start 160.2 76.85) (end 159.3 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBDFA3))
+ (segment (start 161.4 74) (end 159.45 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBDF2D))
+ (segment (start 151.95 89.8) (end 151.95 78.85) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD6FD))
+ (segment (start 159.45 75.95) (end 158.1 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBDF41))
+ (segment (start 154.65 92.5) (end 151.95 89.8) (width 0.6) (layer B.Cu) (net 26))
+ (segment (start 154.65 96.35) (end 154 97) (width 0.6) (layer B.Cu) (net 26) (tstamp 5489E258))
+ (segment (start 154.65 96.35) (end 154.65 92.5) (width 0.6) (layer B.Cu) (net 26) (tstamp 5489E259))
+ (segment (start 154.85 75.95) (end 158.1 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD714))
+ (segment (start 151.95 78.85) (end 154.85 75.95) (width 0.6) (layer B.Cu) (net 26) (tstamp 54BBD707))
+ (segment (start 158.25 76.1) (end 158.1 76.1) (width 0.254) (layer B.Cu) (net 26) (tstamp 54BBDDF1))
+ (segment (start 160.2 78.1) (end 160.2 76.85) (width 0.6) (layer B.Cu) (net 26))
+ (via (at 160.2 78.1) (size 0.889) (layers F.Cu B.Cu) (net 26))
+ (segment (start 161.681631 79.531631) (end 160.2 78.1) (width 0.254) (layer F.Cu) (net 26) (tstamp 54BBDDDC))
+ (segment (start 161.818369 79.531631) (end 161.681631 79.531631) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 161.818369 79.531631) (end 161.818369 81.781513) (width 0.254) (layer F.Cu) (net 26))
+ (segment (start 171.069 92.964) (end 171.577 92.964) (width 0.254) (layer F.Cu) (net 27))
+ (via (at 171.831 93.218) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 171.577 92.964) (end 171.831 93.218) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B50F32))
+ (segment (start 165.698 93.714) (end 169.049 93.714) (width 0.254) (layer F.Cu) (net 27))
+ (segment (start 175.8 90.71) (end 175.8 88.1) (width 0.254) (layer B.Cu) (net 27) (tstamp 56B502E7))
+ (segment (start 176.911 91.821) (end 175.8 90.71) (width 0.254) (layer B.Cu) (net 27) (tstamp 56B502E6))
+ (via (at 176.911 91.821) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 175.768 92.964) (end 176.911 91.821) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B502E0))
+ (segment (start 169.799 92.964) (end 171.069 92.964) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B502DA))
+ (segment (start 171.069 92.964) (end 175.768 92.964) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B50F30))
+ (segment (start 169.049 93.714) (end 169.799 92.964) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B502D7))
+ (segment (start 156.756497 81.112132) (end 156.787868 81.112132) (width 0.254) (layer F.Cu) (net 27) (tstamp 54BD67AA))
+ (segment (start 156.8 81.1) (end 156.787868 81.112132) (width 0.254) (layer F.Cu) (net 27) (tstamp 54BD67A9))
+ (via (at 156.8 81.1) (size 0.381) (drill 0.254) (layers F.Cu B.Cu) (net 27))
+ (segment (start 159.031371 81.1) (end 156.8 81.1) (width 0.254) (layer B.Cu) (net 27) (tstamp 54BD679E))
+ (segment (start 159.031371 81.1) (end 159.443503 80.687868) (width 0.254) (layer B.Cu) (net 27) (tstamp 54BD679D))
+ (segment (start 162.844815 78.455185) (end 162.910185 78.455185) (width 0.254) (layer F.Cu) (net 27))
+ (segment (start 163.4 78.945) (end 163.4 80.1) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B4CA1B))
+ (segment (start 162.910185 78.455185) (end 163.4 78.945) (width 0.254) (layer F.Cu) (net 27) (tstamp 56B4CA00))
+ (segment (start 153 106.55) (end 159 106.55) (width 0.4) (layer F.Cu) (net 27))
+ (segment (start 169.75 104.3) (end 168.7493 104.3) (width 0.4) (layer F.Cu) (net 27))
+ (segment (start 164.460384 81.02899) (end 164.52899 81.02899) (width 0.254) (layer F.Cu) (net 27))
+ (segment (start 168.6 84.3) (end 168.6 84.1) (width 0.254) (layer B.Cu) (net 27) (tstamp 54BD6B2F))
+ (segment (start 168.2 84.7) (end 168.6 84.3) (width 0.254) (layer B.Cu) (net 27) (tstamp 54BD6B2E))
+ (via (at 168.2 84.7) (size 0.381) (drill 0.254) (layers F.Cu B.Cu) (net 27))
+ (segment (start 164.52899 81.02899) (end 168.2 84.7) (width 0.254) (layer F.Cu) (net 27) (tstamp 54BD6B1D))
+ (segment (start 154.6 74.5) (end 152.9 74.5) (width 0.254) (layer B.Cu) (net 27))
+ (segment (start 157.4 72.9) (end 155.8 74.5) (width 0.4) (layer B.Cu) (net 27) (tstamp 5481AB53))
+ (segment (start 155.8 74.5) (end 154.6 74.5) (width 0.4) (layer B.Cu) (net 27) (tstamp 5481AB66))
+ (via (at 154.6 74.5) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 157.4 72.7) (end 157.4 72.9) (width 0.4) (layer B.Cu) (net 27))
+ (segment (start 149.8 85.2) (end 149.8 87.4) (width 0.254) (layer B.Cu) (net 27) (tstamp 54947DE4))
+ (via (at 149.8 85.2) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 149.8 77.6) (end 149.8 85.2) (width 0.254) (layer F.Cu) (net 27) (tstamp 54947DDA))
+ (via (at 149.8 77.6) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 152.9 74.5) (end 149.8 77.6) (width 0.254) (layer B.Cu) (net 27) (tstamp 54947DCE))
+ (segment (start 170.663944 88.353287) (end 170.853287 88.353287) (width 0.254) (layer F.Cu) (net 27))
+ (segment (start 176.2 88.5) (end 176.2 89.3) (width 0.254) (layer B.Cu) (net 27) (tstamp 5481ADA8))
+ (segment (start 175.8 88.1) (end 176.2 88.5) (width 0.254) (layer B.Cu) (net 27) (tstamp 5481ADA7))
+ (via (at 175.8 88.1) (size 0.889) (layers F.Cu B.Cu) (net 27))
+ (segment (start 175.8 88.5) (end 175.8 88.1) (width 0.254) (layer F.Cu) (net 27) (tstamp 5481ADA2))
+ (segment (start 174.4 89.9) (end 175.8 88.5) (width 0.254) (layer F.Cu) (net 27) (tstamp 5481AD9E))
+ (segment (start 172.2 89.9) (end 174.4 89.9) (width 0.254) (layer F.Cu) (net 27) (tstamp 5481AD99))
+ (segment (start 170.653287 88.353287) (end 172.2 89.9) (width 0.254) (layer F.Cu) (net 27) (tstamp 5481AD92))
+ (segment (start 164.460384 81.02899) (end 164.32899 81.02899) (width 0.254) (layer F.Cu) (net 27))
+ (segment (start 164.32899 81.02899) (end 163.4 80.1) (width 0.254) (layer F.Cu) (net 27) (tstamp 5480ADE7))
+ (segment (start 163.4 80.1) (end 163 80.1) (width 0.254) (layer F.Cu) (net 27) (tstamp 5480ADEE))
+ (segment (start 162.334185 81.165816) (end 163.328871 82.160502) (width 0.254) (layer F.Cu) (net 27) (tstamp 5480AE03))
+ (segment (start 163 80.1) (end 162.4 80.7) (width 0.254) (layer F.Cu) (net 27) (tstamp 5480ADF5))
+ (segment (start 162.4 80.7) (end 162.334185 81.165816) (width 0.254) (layer F.Cu) (net 27) (tstamp 5480ADFE))
+ (via (at 159.443503 80.687868) (size 0.381) (drill 0.254) (layers F.Cu B.Cu) (net 27))
+ (segment (start 147.4 72.7) (end 149.4 72.7) (width 0.254) (layer F.Cu) (net 28))
+ (segment (start 145.4 72.7) (end 145.4 72.5) (width 0.254) (layer F.Cu) (net 29))
+ (segment (start 150 71.3) (end 151.4 72.7) (width 0.254) (layer F.Cu) (net 29) (tstamp 547F8A96))
+ (segment (start 146.6 71.3) (end 150 71.3) (width 0.254) (layer F.Cu) (net 29) (tstamp 547F8A90))
+ (segment (start 145.4 72.5) (end 146.6 71.3) (width 0.254) (layer F.Cu) (net 29) (tstamp 547F8A8A))
+ (segment (start 165.1 112.522) (end 164.465 112.522) (width 0.254) (layer F.Cu) (net 30))
+ (via (at 163.703 111.76) (size 0.889) (layers F.Cu B.Cu) (net 30))
+ (segment (start 164.465 112.522) (end 163.703 111.76) (width 0.254) (layer F.Cu) (net 30) (tstamp 56B4F390))
+ (segment (start 162.052 110.617) (end 162.56 110.617) (width 0.254) (layer B.Cu) (net 30))
+ (segment (start 164.465 112.522) (end 165.11016 112.522) (width 0.254) (layer B.Cu) (net 30) (tstamp 56B4F2EF))
+ (segment (start 162.56 110.617) (end 163.703 111.76) (width 0.254) (layer B.Cu) (net 30) (tstamp 56B4F2EB))
+ (segment (start 163.703 111.76) (end 164.465 112.522) (width 0.254) (layer B.Cu) (net 30) (tstamp 56B4F39D))
+ (segment (start 148.2 61.7) (end 151.038 61.7) (width 0.254) (layer F.Cu) (net 31))
+ (segment (start 174.29 113.58) (end 168.825 113.58) (width 0.254) (layer B.Cu) (net 32))
+ (segment (start 167.767 112.522) (end 166.61384 112.522) (width 0.254) (layer B.Cu) (net 32) (tstamp 56B4F4E1))
+ (segment (start 168.825 113.58) (end 167.767 112.522) (width 0.254) (layer B.Cu) (net 32) (tstamp 56B4F4DD))
+ (segment (start 162.052 113.157) (end 162.433 113.157) (width 0.254) (layer B.Cu) (net 33))
+ (segment (start 163.576 114.3) (end 165.11016 114.3) (width 0.254) (layer B.Cu) (net 33) (tstamp 56B4F2FB))
+ (segment (start 162.433 113.157) (end 163.576 114.3) (width 0.254) (layer B.Cu) (net 33) (tstamp 56B4F2F6))
+ (segment (start 165.11016 110.744) (end 163.957 110.744) (width 0.254) (layer B.Cu) (net 34))
+ (segment (start 163.957 110.744) (end 165.1 110.744) (width 0.254) (layer F.Cu) (net 34) (tstamp 56B5249A))
+ (segment (start 163.703 110.49) (end 163.957 110.744) (width 0.254) (layer F.Cu) (net 34) (tstamp 56B52499))
+ (via (at 163.703 110.49) (size 0.889) (layers F.Cu B.Cu) (net 34))
+ (segment (start 163.957 110.744) (end 163.703 110.49) (width 0.254) (layer B.Cu) (net 34) (tstamp 56B5248D))
+ (segment (start 177.927 99.695) (end 177.927 98.425) (width 0.254) (layer F.Cu) (net 35))
+ (segment (start 169.926 107.696) (end 171.449884 107.711382) (width 0.254) (layer B.Cu) (net 35))
+ (segment (start 166.61384 107.83316) (end 166.624 107.823) (width 0.254) (layer B.Cu) (net 35) (tstamp 56B4F8C7))
+ (via (at 166.624 107.823) (size 0.889) (layers F.Cu B.Cu) (net 35))
+ (segment (start 166.624 107.823) (end 166.751 107.696) (width 0.254) (layer F.Cu) (net 35) (tstamp 56B4F8D2))
+ (segment (start 166.751 107.696) (end 169.926 107.696) (width 0.254) (layer F.Cu) (net 35) (tstamp 56B4F8D3))
+ (via (at 169.926 107.696) (size 0.889) (layers F.Cu B.Cu) (net 35))
+ (segment (start 166.61384 108.966) (end 166.61384 107.83316) (width 0.254) (layer B.Cu) (net 35))
+ (segment (start 177.927 99.695) (end 177.997 99.765) (width 0.254) (layer F.Cu) (net 35) (tstamp 56B4F902))
+ (via (at 177.927 99.695) (size 0.889) (layers F.Cu B.Cu) (net 35))
+ (segment (start 175.26 99.695) (end 177.927 99.695) (width 0.254) (layer B.Cu) (net 35) (tstamp 56B4F8F6))
+ (segment (start 172.085 102.87) (end 175.26 99.695) (width 0.254) (layer B.Cu) (net 35) (tstamp 56B4F8F0))
+ (segment (start 172.085 107.092) (end 172.085 102.87) (width 0.254) (layer B.Cu) (net 35) (tstamp 56B4F8EA))
+ (segment (start 171.4655 107.7115) (end 172.085 107.092) (width 0.254) (layer B.Cu) (net 35) (tstamp 56B4F8E9))
+ (segment (start 174.29 105.96) (end 174.667 105.96) (width 0.254) (layer B.Cu) (net 36))
+ (segment (start 167.894 114.3) (end 166.61384 114.3) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F50E))
+ (segment (start 168.656 115.062) (end 167.894 114.3) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F50D))
+ (segment (start 175.133 115.062) (end 168.656 115.062) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F508))
+ (segment (start 176.149 114.046) (end 175.133 115.062) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F504))
+ (segment (start 176.149 107.442) (end 176.149 114.046) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F4FE))
+ (segment (start 174.667 105.96) (end 176.149 107.442) (width 0.254) (layer B.Cu) (net 36) (tstamp 56B4F4FB))
+ (segment (start 162.738 104.3) (end 167.386 104.267) (width 0.254) (layer F.Cu) (net 37))
+ (segment (start 162.738 102.938) (end 162.738 104.3) (width 0.254) (layer F.Cu) (net 37) (tstamp 54BBF142))
+ (segment (start 161.85 102.05) (end 162.738 102.938) (width 0.254) (layer F.Cu) (net 37) (tstamp 54BBF12C))
+ (segment (start 153 102.05) (end 159 102.05) (width 0.4) (layer F.Cu) (net 37))
+ (segment (start 159 102.05) (end 161.85 102.05) (width 0.254) (layer F.Cu) (net 37))
+ (segment (start 171.69816 90.49816) (end 171.69816 91.15) (width 0.254) (layer F.Cu) (net 38) (tstamp 54BBE602))
+ (segment (start 170.089208 88.928023) (end 170.128023 88.928023) (width 0.254) (layer F.Cu) (net 38))
+ (segment (start 170.128023 88.928023) (end 171.69816 90.49816) (width 0.254) (layer F.Cu) (net 38) (tstamp 54BBE5FA))
+
+ (zone (net 27) (net_name GND) (layer B.Cu) (tstamp 53CC4087) (hatch edge 0.508)
+ (connect_pads (clearance 0.25))
+ (min_thickness 0.254)
+ (fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
+ (polygon
+ (pts
+ (xy 183.2 116.7) (xy 140.2 116.7) (xy 140.2 97.5) (xy 143.2 97.5) (xy 143.2 77.9)
+ (xy 140.4 77.8) (xy 140.4 58.7) (xy 183.2 58.5) (xy 183.2 78.1) (xy 180 78.1)
+ (xy 180 97.3) (xy 183.2 97.3)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 174.371 97.960579) (xy 170.45579 101.87579) (xy 170.345669 102.040597) (xy 170.307 102.235) (xy 170.307 104.706806)
+ (xy 170.129105 104.854497) (xy 170.090923 104.838643) (xy 169.762518 104.838357) (xy 169.459002 104.963767) (xy 169.418 105.004697)
+ (xy 169.418 88.773) (xy 169.385746 88.610849) (xy 169.379331 88.578597) (xy 169.379331 88.578596) (xy 169.26921 88.41379)
+ (xy 168.330903 87.475483) (xy 168.513482 87.475643) (xy 168.816998 87.350233) (xy 169.049417 87.118219) (xy 169.175357 86.814923)
+ (xy 169.175591 86.546078) (xy 170.200953 85.527849) (xy 170.299767 85.766998) (xy 170.531781 85.999417) (xy 170.835077 86.125357)
+ (xy 171.163482 86.125643) (xy 171.466998 86.000233) (xy 171.659566 85.808) (xy 172.71958 85.808) (xy 174.225 87.31342)
+ (xy 174.225 88.642942) (xy 174.200233 88.583002) (xy 173.968219 88.350583) (xy 173.664923 88.224643) (xy 173.336518 88.224357)
+ (xy 173.033002 88.349767) (xy 172.800583 88.581781) (xy 172.674643 88.885077) (xy 172.674357 89.213482) (xy 172.799767 89.516998)
+ (xy 173.031781 89.749417) (xy 173.335077 89.875357) (xy 173.609 89.875595) (xy 173.609 93.853) (xy 173.647669 94.047403)
+ (xy 173.75779 94.21221) (xy 174.371 94.82542) (xy 174.371 97.960579)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 175.641 113.835579) (xy 175.500787 113.975791) (xy 175.559778 113.833727) (xy 175.560219 113.32849) (xy 175.367281 112.861543)
+ (xy 175.010336 112.503975) (xy 174.889389 112.453753) (xy 175.097532 112.367539) (xy 175.18259 112.112195) (xy 174.29 111.219605)
+ (xy 174.110395 111.39921) (xy 174.110395 111.04) (xy 173.217805 110.14741) (xy 172.962461 110.232468) (xy 172.754486 110.801965)
+ (xy 172.780278 111.4077) (xy 172.962461 111.847532) (xy 173.217805 111.93259) (xy 174.110395 111.04) (xy 174.110395 111.39921)
+ (xy 173.39741 112.112195) (xy 173.482468 112.367539) (xy 173.70342 112.448228) (xy 173.571543 112.502719) (xy 173.213975 112.859664)
+ (xy 173.125805 113.072) (xy 169.03542 113.072) (xy 168.12621 112.16279) (xy 167.961403 112.052669) (xy 167.767 112.014)
+ (xy 167.444486 112.014) (xy 167.444486 111.946167) (xy 167.386604 111.806083) (xy 167.279521 111.698812) (xy 167.139538 111.640686)
+ (xy 166.987967 111.640554) (xy 166.088807 111.640554) (xy 165.948723 111.698436) (xy 165.861942 111.785064) (xy 165.775841 111.698812)
+ (xy 165.635858 111.640686) (xy 165.484287 111.640554) (xy 164.585127 111.640554) (xy 164.528584 111.663917) (xy 164.528638 111.602133)
+ (xy 164.584462 111.625314) (xy 164.736033 111.625446) (xy 165.635193 111.625446) (xy 165.775277 111.567564) (xy 165.862057 111.480935)
+ (xy 165.948159 111.567188) (xy 166.088142 111.625314) (xy 166.239713 111.625446) (xy 167.138873 111.625446) (xy 167.278957 111.567564)
+ (xy 167.386228 111.460481) (xy 167.444354 111.320498) (xy 167.444413 111.252) (xy 170.942 111.252) (xy 171.136403 111.213331)
+ (xy 171.30121 111.10321) (xy 173.07921 109.325211) (xy 173.07921 109.32521) (xy 173.15279 109.21509) (xy 173.18896 109.160957)
+ (xy 173.212719 109.218457) (xy 173.569664 109.576025) (xy 173.69061 109.626246) (xy 173.482468 109.712461) (xy 173.39741 109.967805)
+ (xy 174.29 110.860395) (xy 175.18259 109.967805) (xy 175.097532 109.712461) (xy 174.876579 109.631771) (xy 175.008457 109.577281)
+ (xy 175.366025 109.220336) (xy 175.559778 108.753727) (xy 175.560219 108.24849) (xy 175.367281 107.781543) (xy 175.010336 107.423975)
+ (xy 174.543727 107.230222) (xy 174.03849 107.229781) (xy 173.571543 107.422719) (xy 173.228 107.765663) (xy 173.228 106.693764)
+ (xy 173.569664 107.036025) (xy 174.036273 107.229778) (xy 174.54151 107.230219) (xy 175.008457 107.037281) (xy 175.017166 107.028586)
+ (xy 175.641 107.65242) (xy 175.641 110.289108) (xy 175.617539 110.232468) (xy 175.362195 110.14741) (xy 174.469605 111.04)
+ (xy 175.362195 111.93259) (xy 175.617539 111.847532) (xy 175.641 111.783288) (xy 175.641 113.835579)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 178.792 74.689579) (xy 175.489579 77.992) (xy 173.659302 77.992) (xy 173.468219 77.800583) (xy 173.164923 77.674643)
+ (xy 172.836518 77.674357) (xy 172.533002 77.799767) (xy 172.300583 78.031781) (xy 172.174643 78.335077) (xy 172.174357 78.663482)
+ (xy 172.299767 78.966998) (xy 172.531781 79.199417) (xy 172.835077 79.325357) (xy 173.163482 79.325643) (xy 173.466998 79.200233)
+ (xy 173.659566 79.008) (xy 175.324596 79.008) (xy 168.460245 85.824595) (xy 168.186518 85.824357) (xy 168.021 85.892747)
+ (xy 168.021 83.14142) (xy 170.962013 80.200407) (xy 171.232482 80.200643) (xy 171.535998 80.075233) (xy 171.768417 79.843219)
+ (xy 171.894357 79.539923) (xy 171.894643 79.211518) (xy 171.769233 78.908002) (xy 171.537219 78.675583) (xy 171.233923 78.549643)
+ (xy 170.905518 78.549357) (xy 170.602002 78.674767) (xy 170.369583 78.906781) (xy 170.243643 79.210077) (xy 170.243406 79.482173)
+ (xy 167.408 82.317579) (xy 167.408 80.66042) (xy 169.675441 78.392979) (xy 169.731781 78.449417) (xy 170.035077 78.575357)
+ (xy 170.363482 78.575643) (xy 170.666998 78.450233) (xy 170.899417 78.218219) (xy 171.025357 77.914923) (xy 171.025643 77.586518)
+ (xy 170.900233 77.283002) (xy 170.775448 77.158) (xy 170.8 77.158) (xy 170.994403 77.119331) (xy 171.15921 77.00921)
+ (xy 171.41042 76.758) (xy 172.25 76.758) (xy 172.444403 76.719331) (xy 172.60921 76.60921) (xy 176.61042 72.608)
+ (xy 177.140697 72.608) (xy 177.331781 72.799417) (xy 177.635077 72.925357) (xy 177.963482 72.925643) (xy 178.266998 72.800233)
+ (xy 178.499417 72.568219) (xy 178.625357 72.264923) (xy 178.625643 71.936518) (xy 178.500233 71.633002) (xy 178.268219 71.400583)
+ (xy 177.964923 71.274643) (xy 177.636518 71.274357) (xy 177.333002 71.399767) (xy 177.140433 71.592) (xy 176.5 71.592)
+ (xy 176.4 71.592) (xy 176.35 71.592) (xy 176.155597 71.630669) (xy 175.99079 71.74079) (xy 175.890105 71.891474)
+ (xy 175.76393 72.017649) (xy 175.76393 70.527205) (xy 175.76393 69.254715) (xy 175.763709 69.002096) (xy 175.666833 68.768792)
+ (xy 175.488049 68.590319) (xy 175.254575 68.49385) (xy 174.65257 68.49396) (xy 174.49382 68.65271) (xy 174.49382 69.76396)
+ (xy 175.60507 69.76396) (xy 175.76382 69.60521) (xy 175.76393 69.254715) (xy 175.76393 70.527205) (xy 175.76382 70.17671)
+ (xy 175.60507 70.01796) (xy 174.49382 70.01796) (xy 174.49382 71.12921) (xy 174.65257 71.28796) (xy 175.254575 71.28807)
+ (xy 175.488049 71.191601) (xy 175.666833 71.013128) (xy 175.763709 70.779824) (xy 175.76393 70.527205) (xy 175.76393 72.017649)
+ (xy 175.509958 72.271621) (xy 175.510017 72.204601) (xy 175.336373 71.784349) (xy 175.015122 71.462537) (xy 174.595174 71.28816)
+ (xy 174.23982 71.287849) (xy 174.23982 71.12921) (xy 174.23982 70.01796) (xy 174.23982 69.76396) (xy 174.23982 68.65271)
+ (xy 174.08107 68.49396) (xy 173.479065 68.49385) (xy 173.245591 68.590319) (xy 173.066807 68.768792) (xy 172.969931 69.002096)
+ (xy 172.96971 69.254715) (xy 172.96982 69.60521) (xy 173.12857 69.76396) (xy 174.23982 69.76396) (xy 174.23982 70.01796)
+ (xy 173.12857 70.01796) (xy 172.970017 70.176513) (xy 172.970017 69.664601) (xy 172.796373 69.244349) (xy 172.475122 68.922537)
+ (xy 172.055174 68.74816) (xy 171.600461 68.747763) (xy 171.180209 68.921407) (xy 170.858397 69.242658) (xy 170.68402 69.662606)
+ (xy 170.683623 70.117319) (xy 170.857267 70.537571) (xy 171.178518 70.859383) (xy 171.598466 71.03376) (xy 172.053179 71.034157)
+ (xy 172.473431 70.860513) (xy 172.795243 70.539262) (xy 172.96962 70.119314) (xy 172.970017 69.664601) (xy 172.970017 70.176513)
+ (xy 172.96982 70.17671) (xy 172.96971 70.527205) (xy 172.969931 70.779824) (xy 173.066807 71.013128) (xy 173.245591 71.191601)
+ (xy 173.479065 71.28807) (xy 174.08107 71.28796) (xy 174.23982 71.12921) (xy 174.23982 71.287849) (xy 174.140461 71.287763)
+ (xy 173.720209 71.461407) (xy 173.398397 71.782658) (xy 173.22402 72.202606) (xy 173.223663 72.611037) (xy 172.823507 73.011192)
+ (xy 172.96962 72.659314) (xy 172.970017 72.204601) (xy 172.796373 71.784349) (xy 172.475122 71.462537) (xy 172.055174 71.28816)
+ (xy 171.600461 71.287763) (xy 171.180209 71.461407) (xy 170.858397 71.782658) (xy 170.68402 72.202606) (xy 170.683623 72.657319)
+ (xy 170.857267 73.077571) (xy 171.148187 73.369) (xy 170.430017 73.369) (xy 170.430017 72.204601) (xy 170.430017 69.664601)
+ (xy 170.256373 69.244349) (xy 169.935122 68.922537) (xy 169.515174 68.74816) (xy 169.060461 68.747763) (xy 168.640209 68.921407)
+ (xy 168.318397 69.242658) (xy 168.14402 69.662606) (xy 168.143623 70.117319) (xy 168.317267 70.537571) (xy 168.638518 70.859383)
+ (xy 169.058466 71.03376) (xy 169.513179 71.034157) (xy 169.933431 70.860513) (xy 170.255243 70.539262) (xy 170.42962 70.119314)
+ (xy 170.430017 69.664601) (xy 170.430017 72.204601) (xy 170.256373 71.784349) (xy 169.935122 71.462537) (xy 169.515174 71.28816)
+ (xy 169.060461 71.287763) (xy 168.640209 71.461407) (xy 168.318397 71.782658) (xy 168.14402 72.202606) (xy 168.143623 72.657319)
+ (xy 168.317267 73.077571) (xy 168.638518 73.399383) (xy 169.058466 73.57376) (xy 169.513179 73.574157) (xy 169.933431 73.400513)
+ (xy 170.255243 73.079262) (xy 170.42962 72.659314) (xy 170.430017 72.204601) (xy 170.430017 73.369) (xy 170.3 73.369)
+ (xy 170.039393 73.420838) (xy 169.81846 73.56846) (xy 169.818457 73.568463) (xy 169.168263 74.218657) (xy 169.050233 73.933002)
+ (xy 168.818219 73.700583) (xy 168.514923 73.574643) (xy 168.186518 73.574357) (xy 167.883002 73.699767) (xy 167.690433 73.892)
+ (xy 166.870475 73.892) (xy 166.525609 73.573766) (xy 166.973179 73.574157) (xy 167.393431 73.400513) (xy 167.715243 73.079262)
+ (xy 167.88962 72.659314) (xy 167.890017 72.204601) (xy 167.890017 69.664601) (xy 167.716373 69.244349) (xy 167.395122 68.922537)
+ (xy 166.975174 68.74816) (xy 166.520461 68.747763) (xy 166.100209 68.921407) (xy 165.778397 69.242658) (xy 165.60402 69.662606)
+ (xy 165.603623 70.117319) (xy 165.777267 70.537571) (xy 166.098518 70.859383) (xy 166.518466 71.03376) (xy 166.973179 71.034157)
+ (xy 167.393431 70.860513) (xy 167.715243 70.539262) (xy 167.88962 70.119314) (xy 167.890017 69.664601) (xy 167.890017 72.204601)
+ (xy 167.716373 71.784349) (xy 167.395122 71.462537) (xy 166.975174 71.28816) (xy 166.520461 71.287763) (xy 166.100209 71.461407)
+ (xy 165.778397 71.782658) (xy 165.60402 72.202606) (xy 165.603623 72.657319) (xy 165.647473 72.763446) (xy 163.991912 71.235737)
+ (xy 163.991912 67.871517) (xy 163.2 67.079605) (xy 162.408088 67.871517) (xy 162.476078 68.112458) (xy 162.99517 68.297198)
+ (xy 163.545446 68.269228) (xy 163.923922 68.112458) (xy 163.991912 67.871517) (xy 163.991912 71.235737) (xy 163.76534 71.026663)
+ (xy 163.689321 70.98017) (xy 163.615238 70.930669) (xy 163.60508 70.928648) (xy 163.596247 70.923246) (xy 163.508242 70.909386)
+ (xy 163.420835 70.892) (xy 159.7 70.892) (xy 159.505596 70.930669) (xy 159.34079 71.04079) (xy 159.04079 71.34079)
+ (xy 158.930669 71.505597) (xy 158.897813 71.670772) (xy 158.753389 71.730447) (xy 158.53863 71.944831) (xy 158.380212 71.899393)
+ (xy 158.200607 72.078998) (xy 158.200607 71.719788) (xy 158.131142 71.477604) (xy 157.607696 71.290857) (xy 157.052631 71.31864)
+ (xy 156.668858 71.477604) (xy 156.599393 71.719788) (xy 157.4 72.520395) (xy 158.200607 71.719788) (xy 158.200607 72.078998)
+ (xy 157.579605 72.7) (xy 158.380212 73.500607) (xy 158.538773 73.455127) (xy 158.751698 73.668423) (xy 159.171646 73.8428)
+ (xy 159.626359 73.843197) (xy 160.046611 73.669553) (xy 160.256934 73.459596) (xy 160.256934 73.537453) (xy 160.314816 73.677537)
+ (xy 160.421899 73.784808) (xy 160.561882 73.842934) (xy 160.593958 73.842961) (xy 159.16792 75.269) (xy 158.200607 75.269)
+ (xy 158.200607 73.680212) (xy 157.4 72.879605) (xy 156.599393 73.680212) (xy 156.668858 73.922396) (xy 157.192304 74.109143)
+ (xy 157.747369 74.08136) (xy 158.131142 73.922396) (xy 158.200607 73.680212) (xy 158.200607 75.269) (xy 158.1 75.269)
+ (xy 154.85 75.269) (xy 154.589393 75.320838) (xy 154.36846 75.46846) (xy 154.368457 75.468463) (xy 151.46846 78.36846)
+ (xy 151.320838 78.589392) (xy 151.269 78.85) (xy 151.269 89.8) (xy 151.320838 90.060608) (xy 151.46846 90.28154)
+ (xy 153.969 92.782079) (xy 153.969 96.06792) (xy 153.86254 96.174379) (xy 153.836518 96.174357) (xy 153.533002 96.299767)
+ (xy 153.325643 96.506764) (xy 153.325643 92.836518) (xy 153.200233 92.533002) (xy 152.968219 92.300583) (xy 152.664923 92.174643)
+ (xy 152.637698 92.174619) (xy 151.98154 91.51846) (xy 151.760608 91.370838) (xy 151.5 91.319) (xy 147.782079 91.319)
+ (xy 146.681 90.21792) (xy 146.681 77) (xy 146.629162 76.739393) (xy 146.629161 76.739392) (xy 146.48154 76.51846)
+ (xy 146.481536 76.518457) (xy 143.681 73.71792) (xy 143.681 71.282079) (xy 144.782079 70.181) (xy 150 70.181)
+ (xy 150.260607 70.129162) (xy 150.260608 70.129162) (xy 150.48154 69.98154) (xy 151.981536 68.481542) (xy 151.981539 68.48154)
+ (xy 151.98154 68.48154) (xy 152.129161 68.260608) (xy 152.129162 68.260607) (xy 152.181 68) (xy 152.181 65.782079)
+ (xy 152.637459 65.32562) (xy 152.663482 65.325643) (xy 152.966998 65.200233) (xy 153.199417 64.968219) (xy 153.325357 64.664923)
+ (xy 153.325643 64.336518) (xy 153.200233 64.033002) (xy 152.968219 63.800583) (xy 152.664923 63.674643) (xy 152.336518 63.674357)
+ (xy 152.033002 63.799767) (xy 151.800583 64.031781) (xy 151.674643 64.335077) (xy 151.674619 64.362301) (xy 151.01846 65.01846)
+ (xy 150.870838 65.239392) (xy 150.819 65.5) (xy 150.819 67.71792) (xy 149.71792 68.819) (xy 144.5 68.819)
+ (xy 144.239393 68.870838) (xy 144.01846 69.01846) (xy 144.018457 69.018463) (xy 142.51846 70.51846) (xy 142.370838 70.739392)
+ (xy 142.319 71) (xy 142.319 74) (xy 142.370838 74.260608) (xy 142.51846 74.48154) (xy 145.319 77.282079)
+ (xy 145.319 90.5) (xy 145.370838 90.760608) (xy 145.51846 90.98154) (xy 147.018457 92.481536) (xy 147.01846 92.48154)
+ (xy 147.239392 92.629161) (xy 147.239393 92.629162) (xy 147.5 92.681) (xy 151.21792 92.681) (xy 151.674379 93.137459)
+ (xy 151.674357 93.163482) (xy 151.799767 93.466998) (xy 152.031781 93.699417) (xy 152.335077 93.825357) (xy 152.663482 93.825643)
+ (xy 152.966998 93.700233) (xy 153.199417 93.468219) (xy 153.325357 93.164923) (xy 153.325643 92.836518) (xy 153.325643 96.506764)
+ (xy 153.300583 96.531781) (xy 153.174643 96.835077) (xy 153.174357 97.163482) (xy 153.299767 97.466998) (xy 153.531781 97.699417)
+ (xy 153.835077 97.825357) (xy 154.163482 97.825643) (xy 154.466998 97.700233) (xy 154.699417 97.468219) (xy 154.825357 97.164923)
+ (xy 154.82538 97.137698) (xy 155.131536 96.831542) (xy 155.131539 96.83154) (xy 155.13154 96.83154) (xy 155.279161 96.610608)
+ (xy 155.279162 96.610607) (xy 155.320688 96.401839) (xy 155.331 96.350001) (xy 155.330999 96.35) (xy 155.331 96.35)
+ (xy 155.331 92.5) (xy 155.279162 92.239393) (xy 155.279161 92.239392) (xy 155.13154 92.01846) (xy 155.131536 92.018457)
+ (xy 152.631 89.51792) (xy 152.631 79.132079) (xy 155.132079 76.631) (xy 158.1 76.631) (xy 159.01792 76.631)
+ (xy 159.519 77.13208) (xy 159.519 77.613396) (xy 159.500583 77.631781) (xy 159.374643 77.935077) (xy 159.374357 78.263482)
+ (xy 159.499767 78.566998) (xy 159.731781 78.799417) (xy 160.035077 78.925357) (xy 160.363482 78.925643) (xy 160.666998 78.800233)
+ (xy 160.899417 78.568219) (xy 161.025357 78.264923) (xy 161.025643 77.936518) (xy 160.900233 77.633002) (xy 160.881 77.613735)
+ (xy 160.881 76.85) (xy 160.829162 76.589393) (xy 160.829162 76.589392) (xy 160.68154 76.36846) (xy 160.338079 76.024999)
+ (xy 161.881536 74.481542) (xy 161.881539 74.48154) (xy 161.88154 74.48154) (xy 162.029161 74.260608) (xy 162.029162 74.260607)
+ (xy 162.081 74) (xy 162.081 73.843066) (xy 162.237453 73.843066) (xy 162.377537 73.785184) (xy 162.484808 73.678101)
+ (xy 162.542934 73.538118) (xy 162.543066 73.386547) (xy 162.543066 73.381) (xy 163.06792 73.381) (xy 165.611517 75.924596)
+ (xy 165.336518 75.924357) (xy 165.033002 76.049767) (xy 164.800583 76.281781) (xy 164.674643 76.585077) (xy 164.674406 76.857173)
+ (xy 163.04079 78.49079) (xy 162.930669 78.655597) (xy 162.892 78.85) (xy 162.892 84.640697) (xy 162.700583 84.831781)
+ (xy 162.574643 85.135077) (xy 162.574357 85.463482) (xy 162.699767 85.766998) (xy 162.931781 85.999417) (xy 163.235077 86.125357)
+ (xy 163.563482 86.125643) (xy 163.866998 86.000233) (xy 164.099417 85.768219) (xy 164.225357 85.464923) (xy 164.225643 85.136518)
+ (xy 164.100233 84.833002) (xy 163.908 84.640433) (xy 163.908 79.06042) (xy 165.393013 77.575407) (xy 165.663482 77.575643)
+ (xy 165.966998 77.450233) (xy 166.199417 77.218219) (xy 166.325357 76.914923) (xy 166.325643 76.586518) (xy 166.200233 76.283002)
+ (xy 166.135517 76.218173) (xy 166.2 76.231) (xy 168.561502 76.231) (xy 164.449032 80.160962) (xy 164.445664 80.165761)
+ (xy 164.44079 80.169019) (xy 164.388874 80.246716) (xy 164.3352 80.323228) (xy 164.333925 80.328951) (xy 164.330669 80.333826)
+ (xy 164.312437 80.425483) (xy 164.292131 80.516704) (xy 164.293143 80.522478) (xy 164.292 80.528229) (xy 164.292 86.340697)
+ (xy 164.100583 86.531781) (xy 163.974643 86.835077) (xy 163.974357 87.163482) (xy 164.099767 87.466998) (xy 164.331781 87.699417)
+ (xy 164.635077 87.825357) (xy 164.963482 87.825643) (xy 165.266998 87.700233) (xy 165.354 87.613382) (xy 165.354 90.594579)
+ (xy 156.61279 99.33579) (xy 156.502669 99.500597) (xy 156.464 99.695) (xy 156.464 108.317579) (xy 154.496348 110.285231)
+ (xy 154.496348 106.778632) (xy 154.469939 106.188601) (xy 154.294952 105.766144) (xy 154.230843 105.745673) (xy 154.230843 101.806287)
+ (xy 154.043885 101.353815) (xy 153.698006 101.007331) (xy 153.245861 100.819585) (xy 152.756287 100.819157) (xy 152.303815 101.006115)
+ (xy 151.957331 101.351994) (xy 151.769585 101.804139) (xy 151.769157 102.293713) (xy 151.956115 102.746185) (xy 152.301994 103.092669)
+ (xy 152.754139 103.280415) (xy 153.243713 103.280843) (xy 153.696185 103.093885) (xy 154.042669 102.748006) (xy 154.230415 102.295861)
+ (xy 154.230843 101.806287) (xy 154.230843 105.745673) (xy 154.04369 105.685916) (xy 153.864084 105.865521) (xy 153.864084 105.50631)
+ (xy 153.783856 105.255048) (xy 153.228632 105.053652) (xy 152.638601 105.080061) (xy 152.216144 105.255048) (xy 152.135916 105.50631)
+ (xy 153 106.370395) (xy 153.864084 105.50631) (xy 153.864084 105.865521) (xy 153.179605 106.55) (xy 154.04369 107.414084)
+ (xy 154.294952 107.333856) (xy 154.496348 106.778632) (xy 154.496348 110.285231) (xy 153.864084 110.917495) (xy 153.864084 107.59369)
+ (xy 153 106.729605) (xy 152.820395 106.90921) (xy 152.820395 106.55) (xy 151.95631 105.685916) (xy 151.705048 105.766144)
+ (xy 151.503652 106.321368) (xy 151.516799 106.61511) (xy 151.454199 106.463606) (xy 151.108216 106.117018) (xy 150.655935 105.929215)
+ (xy 150.166213 105.928787) (xy 149.713606 106.115801) (xy 149.367018 106.461784) (xy 149.179215 106.914065) (xy 149.178787 107.403787)
+ (xy 149.365801 107.856394) (xy 149.711784 108.202982) (xy 149.91215 108.286181) (xy 149.62592 108.404742) (xy 149.545648 108.656043)
+ (xy 150.41 109.520395) (xy 151.274352 108.656043) (xy 151.19408 108.404742) (xy 150.888937 108.29405) (xy 151.106394 108.204199)
+ (xy 151.452982 107.858216) (xy 151.640785 107.405935) (xy 151.640983 107.179189) (xy 151.705048 107.333856) (xy 151.95631 107.414084)
+ (xy 152.820395 106.55) (xy 152.820395 106.90921) (xy 152.135916 107.59369) (xy 152.216144 107.844952) (xy 152.771368 108.046348)
+ (xy 153.361399 108.019939) (xy 153.783856 107.844952) (xy 153.864084 107.59369) (xy 153.864084 110.917495) (xy 153.049579 111.732)
+ (xy 151.906717 111.732) (xy 151.906717 109.928721) (xy 151.880314 109.338543) (xy 151.705258 108.91592) (xy 151.453957 108.835648)
+ (xy 150.589605 109.7) (xy 151.453957 110.564352) (xy 151.705258 110.48408) (xy 151.906717 109.928721) (xy 151.906717 111.732)
+ (xy 151.532042 111.732) (xy 151.454199 111.543606) (xy 151.108216 111.197018) (xy 150.907849 111.113818) (xy 151.19408 110.995258)
+ (xy 151.274352 110.743957) (xy 150.41 109.879605) (xy 150.230395 110.05921) (xy 150.230395 109.7) (xy 149.366043 108.835648)
+ (xy 149.114742 108.91592) (xy 148.913283 109.471279) (xy 148.939686 110.061457) (xy 149.114742 110.48408) (xy 149.366043 110.564352)
+ (xy 150.230395 109.7) (xy 150.230395 110.05921) (xy 149.545648 110.743957) (xy 149.62592 110.995258) (xy 149.931062 111.105949)
+ (xy 149.713606 111.195801) (xy 149.367018 111.541784) (xy 149.179215 111.994065) (xy 149.178787 112.483787) (xy 149.365801 112.936394)
+ (xy 149.711784 113.282982) (xy 150.164065 113.470785) (xy 150.653787 113.471213) (xy 151.106394 113.284199) (xy 151.452982 112.938216)
+ (xy 151.531966 112.748) (xy 153.26 112.748) (xy 153.454403 112.709331) (xy 153.61921 112.59921) (xy 157.33121 108.887211)
+ (xy 157.33121 108.88721) (xy 157.40479 108.77709) (xy 157.44133 108.722404) (xy 157.441331 108.722403) (xy 157.479999 108.528001)
+ (xy 157.48 108.528) (xy 157.48 105.23942) (xy 157.882789 105.64221) (xy 157.88279 105.64221) (xy 157.950822 105.687668)
+ (xy 157.705048 105.766144) (xy 157.503652 106.321368) (xy 157.530061 106.911399) (xy 157.705048 107.333856) (xy 157.95631 107.414084)
+ (xy 158.820395 106.55) (xy 158.806252 106.535857) (xy 158.985857 106.356252) (xy 159 106.370395) (xy 159.014142 106.356252)
+ (xy 159.193747 106.535857) (xy 159.179605 106.55) (xy 160.04369 107.414084) (xy 160.294952 107.333856) (xy 160.496348 106.778632)
+ (xy 160.47488 106.299) (xy 160.630697 106.299) (xy 160.821781 106.490417) (xy 161.125077 106.616357) (xy 161.453482 106.616643)
+ (xy 161.756998 106.491233) (xy 161.989417 106.259219) (xy 162.115357 105.955923) (xy 162.115643 105.627518) (xy 161.990233 105.324002)
+ (xy 161.758219 105.091583) (xy 161.454923 104.965643) (xy 161.126518 104.965357) (xy 160.823002 105.090767) (xy 160.630433 105.283)
+ (xy 160.23042 105.283) (xy 159.87121 104.92379) (xy 159.706403 104.813669) (xy 159.512 104.775) (xy 158.45242 104.775)
+ (xy 158.115 104.437579) (xy 158.115 102.905347) (xy 158.301994 103.092669) (xy 158.754139 103.280415) (xy 159.243713 103.280843)
+ (xy 159.696185 103.093885) (xy 160.042669 102.748006) (xy 160.230415 102.295861) (xy 160.230843 101.806287) (xy 160.043885 101.353815)
+ (xy 159.698006 101.007331) (xy 159.245861 100.819585) (xy 158.756287 100.819157) (xy 158.303815 101.006115) (xy 158.115 101.1946)
+ (xy 158.115 100.54042) (xy 165.730024 92.925396) (xy 166.013482 92.925643) (xy 166.316998 92.800233) (xy 166.549417 92.568219)
+ (xy 166.675357 92.264923) (xy 166.675643 91.936518) (xy 166.550233 91.633002) (xy 166.318219 91.400583) (xy 166.082653 91.302767)
+ (xy 166.22121 91.164211) (xy 166.22121 91.16421) (xy 166.29479 91.05409) (xy 166.33133 90.999404) (xy 166.331331 90.999403)
+ (xy 166.369999 90.805) (xy 166.37 90.805) (xy 166.37 88.011) (xy 166.456281 88.011) (xy 166.485185 88.054257)
+ (xy 166.539538 88.136219) (xy 167.767 89.37228) (xy 167.767 107.923758) (xy 167.554002 108.011767) (xy 167.358359 108.207068)
+ (xy 167.449357 107.987923) (xy 167.449643 107.659518) (xy 167.324233 107.356002) (xy 167.092219 107.123583) (xy 166.788923 106.997643)
+ (xy 166.460518 106.997357) (xy 166.157002 107.122767) (xy 165.924583 107.354781) (xy 165.862001 107.505493) (xy 165.800233 107.356002)
+ (xy 165.568219 107.123583) (xy 165.264923 106.997643) (xy 164.936518 106.997357) (xy 164.633002 107.122767) (xy 164.400583 107.354781)
+ (xy 164.274643 107.658077) (xy 164.274357 107.986482) (xy 164.369821 108.217525) (xy 164.337772 108.249519) (xy 164.279646 108.389502)
+ (xy 164.279514 108.541073) (xy 164.279514 109.541833) (xy 164.337396 109.681917) (xy 164.444479 109.789188) (xy 164.584462 109.847314)
+ (xy 164.736033 109.847446) (xy 165.635193 109.847446) (xy 165.775277 109.789564) (xy 165.862057 109.702935) (xy 165.948159 109.789188)
+ (xy 166.088142 109.847314) (xy 166.239713 109.847446) (xy 167.138873 109.847446) (xy 167.278957 109.789564) (xy 167.386228 109.682481)
+ (xy 167.444354 109.542498) (xy 167.444486 109.390927) (xy 167.444486 109.302932) (xy 167.552781 109.411417) (xy 167.856077 109.537357)
+ (xy 168.184482 109.537643) (xy 168.293673 109.492526) (xy 168.211643 109.690077) (xy 168.211357 110.018482) (xy 168.301233 110.236)
+ (xy 167.444486 110.236) (xy 167.444486 110.168167) (xy 167.386604 110.028083) (xy 167.279521 109.920812) (xy 167.139538 109.862686)
+ (xy 166.987967 109.862554) (xy 166.088807 109.862554) (xy 165.948723 109.920436) (xy 165.861942 110.007064) (xy 165.775841 109.920812)
+ (xy 165.635858 109.862686) (xy 165.484287 109.862554) (xy 164.585127 109.862554) (xy 164.445043 109.920436) (xy 164.372818 109.992534)
+ (xy 164.171219 109.790583) (xy 163.867923 109.664643) (xy 163.539518 109.664357) (xy 163.236002 109.789767) (xy 163.031339 109.994073)
+ (xy 163.021553 109.970389) (xy 162.700302 109.648577) (xy 162.280354 109.4742) (xy 161.825641 109.473803) (xy 161.405389 109.647447)
+ (xy 161.083577 109.968698) (xy 160.9092 110.388646) (xy 160.908803 110.843359) (xy 161.082447 111.263611) (xy 161.403698 111.585423)
+ (xy 161.823646 111.7598) (xy 162.278359 111.760197) (xy 162.698611 111.586553) (xy 162.754921 111.530341) (xy 162.877592 111.653012)
+ (xy 162.877357 111.923482) (xy 162.919894 112.02643) (xy 162.890118 112.014066) (xy 162.738547 112.013934) (xy 161.214547 112.013934)
+ (xy 161.074463 112.071816) (xy 160.967192 112.178899) (xy 160.909066 112.318882) (xy 160.908934 112.470453) (xy 160.908934 113.994453)
+ (xy 160.966816 114.134537) (xy 161.073899 114.241808) (xy 161.213882 114.299934) (xy 161.365453 114.300066) (xy 162.857646 114.300066)
+ (xy 163.21679 114.65921) (xy 163.381596 114.769331) (xy 163.381597 114.769331) (xy 163.576 114.808) (xy 164.279514 114.808)
+ (xy 164.279514 114.875833) (xy 164.337396 115.015917) (xy 164.444479 115.123188) (xy 164.584462 115.181314) (xy 164.736033 115.181446)
+ (xy 165.635193 115.181446) (xy 165.775277 115.123564) (xy 165.862057 115.036935) (xy 165.948159 115.123188) (xy 166.088142 115.181314)
+ (xy 166.239713 115.181446) (xy 167.138873 115.181446) (xy 167.278957 115.123564) (xy 167.386228 115.016481) (xy 167.444354 114.876498)
+ (xy 167.444413 114.808) (xy 167.683579 114.808) (xy 168.296789 115.42121) (xy 168.29679 115.42121) (xy 168.374298 115.473)
+ (xy 159.864084 115.473) (xy 159.864084 107.59369) (xy 159 106.729605) (xy 158.135916 107.59369) (xy 158.216144 107.844952)
+ (xy 158.771368 108.046348) (xy 159.361399 108.019939) (xy 159.783856 107.844952) (xy 159.864084 107.59369) (xy 159.864084 115.473)
+ (xy 159.563412 115.473) (xy 159.563412 111.944468) (xy 159.20169 111.069034) (xy 158.532489 110.398664) (xy 157.657688 110.035415)
+ (xy 156.710468 110.034588) (xy 155.835034 110.39631) (xy 155.164664 111.065511) (xy 154.801415 111.940312) (xy 154.800588 112.887532)
+ (xy 155.16231 113.762966) (xy 155.831511 114.433336) (xy 156.706312 114.796585) (xy 157.653532 114.797412) (xy 158.528966 114.43569)
+ (xy 159.199336 113.766489) (xy 159.562585 112.891688) (xy 159.563412 111.944468) (xy 159.563412 115.473) (xy 144.286717 115.473)
+ (xy 144.286717 109.928721) (xy 144.260314 109.338543) (xy 144.085258 108.91592) (xy 143.833957 108.835648) (xy 142.969605 109.7)
+ (xy 143.833957 110.564352) (xy 144.085258 110.48408) (xy 144.286717 109.928721) (xy 144.286717 115.473) (xy 141.627 115.473)
+ (xy 141.627 112.648874) (xy 141.745801 112.936394) (xy 142.091784 113.282982) (xy 142.544065 113.470785) (xy 143.033787 113.471213)
+ (xy 143.486394 113.284199) (xy 143.832982 112.938216) (xy 144.020785 112.485935) (xy 144.021213 111.996213) (xy 143.834199 111.543606)
+ (xy 143.488216 111.197018) (xy 143.287849 111.113818) (xy 143.57408 110.995258) (xy 143.654352 110.743957) (xy 142.79 109.879605)
+ (xy 141.925648 110.743957) (xy 142.00592 110.995258) (xy 142.311062 111.105949) (xy 142.093606 111.195801) (xy 141.747018 111.541784)
+ (xy 141.627 111.83082) (xy 141.627 110.526326) (xy 141.746043 110.564352) (xy 142.610395 109.7) (xy 141.746043 108.835648)
+ (xy 141.627 108.873673) (xy 141.627 108.235738) (xy 141.723899 108.332808) (xy 141.863882 108.390934) (xy 142.015453 108.391066)
+ (xy 142.038936 108.391066) (xy 142.00592 108.404742) (xy 141.925648 108.656043) (xy 142.79 109.520395) (xy 143.654352 108.656043)
+ (xy 143.57408 108.404742) (xy 143.536379 108.391066) (xy 143.715453 108.391066) (xy 143.855537 108.333184) (xy 143.962808 108.226101)
+ (xy 144.020934 108.086118) (xy 144.021066 107.934547) (xy 144.021066 106.234547) (xy 143.963184 106.094463) (xy 143.856101 105.987192)
+ (xy 143.716118 105.929066) (xy 143.564547 105.928934) (xy 141.864547 105.928934) (xy 141.724463 105.986816) (xy 141.627 106.084108)
+ (xy 141.627 98.577) (xy 144 98.577) (xy 144.163406 98.544497) (xy 144.301935 98.451935) (xy 144.394497 98.313406)
+ (xy 144.427 98.15) (xy 144.427 77.3) (xy 144.394497 77.136594) (xy 144.301935 76.998065) (xy 144.163406 76.905503)
+ (xy 144 76.873) (xy 141.627 76.873) (xy 141.627 62.600741) (xy 142.412049 62.445298) (xy 142.56603 62.381675)
+ (xy 142.569424 62.378286) (xy 143.518169 61.743158) (xy 143.522884 61.74121) (xy 143.640795 61.623503) (xy 144.28111 60.667013)
+ (xy 144.345003 60.513144) (xy 144.345007 60.508348) (xy 144.499718 59.727) (xy 172.536356 59.727) (xy 172.213389 59.860447)
+ (xy 171.891577 60.181698) (xy 171.7172 60.601646) (xy 171.716803 61.056359) (xy 171.890447 61.476611) (xy 172.211698 61.798423)
+ (xy 172.631646 61.9728) (xy 172.825706 61.972969) (xy 172.512631 61.98864) (xy 172.128858 62.147604) (xy 172.059393 62.389788)
+ (xy 172.86 63.190395) (xy 172.874142 63.176252) (xy 173.053747 63.355857) (xy 173.039605 63.37) (xy 173.840212 64.170607)
+ (xy 174.082396 64.101142) (xy 174.259852 63.603738) (xy 174.430447 64.016611) (xy 174.751698 64.338423) (xy 175.171646 64.5128)
+ (xy 175.626359 64.513197) (xy 176.046611 64.339553) (xy 176.368423 64.018302) (xy 176.5428 63.598354) (xy 176.543197 63.143641)
+ (xy 176.369553 62.723389) (xy 176.254365 62.608) (xy 177.085473 62.608) (xy 176.971577 62.721698) (xy 176.7972 63.141646)
+ (xy 176.796803 63.596359) (xy 176.970447 64.016611) (xy 177.145225 64.191695) (xy 175.11792 66.219) (xy 174.331066 66.219)
+ (xy 174.331066 66.074547) (xy 174.273184 65.934463) (xy 174.166101 65.827192) (xy 174.026118 65.769066) (xy 173.874547 65.768934)
+ (xy 173.660607 65.768934) (xy 173.660607 64.350212) (xy 172.86 63.549605) (xy 172.680395 63.72921) (xy 172.680395 63.37)
+ (xy 171.879788 62.569393) (xy 171.637604 62.638858) (xy 171.450857 63.162304) (xy 171.47864 63.717369) (xy 171.637604 64.101142)
+ (xy 171.879788 64.170607) (xy 172.680395 63.37) (xy 172.680395 63.72921) (xy 172.059393 64.350212) (xy 172.128858 64.592396)
+ (xy 172.652304 64.779143) (xy 173.207369 64.75136) (xy 173.591142 64.592396) (xy 173.660607 64.350212) (xy 173.660607 65.768934)
+ (xy 172.374547 65.768934) (xy 172.234463 65.826816) (xy 172.127192 65.933899) (xy 172.069066 66.073882) (xy 172.068982 66.169627)
+ (xy 171.841496 65.941744) (xy 171.425957 65.769197) (xy 170.976017 65.768805) (xy 170.560177 65.940626) (xy 170.241744 66.258504)
+ (xy 170.20011 66.358767) (xy 170.159374 66.260177) (xy 169.841496 65.941744) (xy 169.425957 65.769197) (xy 168.976017 65.768805)
+ (xy 168.560177 65.940626) (xy 168.241744 66.258504) (xy 168.20011 66.358767) (xy 168.159374 66.260177) (xy 167.841496 65.941744)
+ (xy 167.708 65.886311) (xy 167.708 65.1) (xy 167.675746 64.937849) (xy 167.669331 64.905597) (xy 167.669331 64.905596)
+ (xy 167.55921 64.74079) (xy 167.55921 64.740789) (xy 165.75921 62.94079) (xy 165.594403 62.830669) (xy 165.4 62.792)
+ (xy 165.013841 62.792) (xy 164.959374 62.660177) (xy 164.641496 62.341744) (xy 164.541232 62.30011) (xy 164.639823 62.259374)
+ (xy 164.958256 61.941496) (xy 165.130803 61.525957) (xy 165.131195 61.076017) (xy 164.959374 60.660177) (xy 164.641496 60.341744)
+ (xy 164.225957 60.169197) (xy 163.776017 60.168805) (xy 163.360177 60.340626) (xy 163.041744 60.658504) (xy 163.00011 60.758767)
+ (xy 162.959374 60.660177) (xy 162.641496 60.341744) (xy 162.225957 60.169197) (xy 161.776017 60.168805) (xy 161.360177 60.340626)
+ (xy 161.143739 60.556686) (xy 160.971517 60.508088) (xy 160.791912 60.687693) (xy 160.791912 60.328483) (xy 160.723922 60.087542)
+ (xy 160.20483 59.902802) (xy 159.654554 59.930772) (xy 159.276078 60.087542) (xy 159.208088 60.328483) (xy 160 61.120395)
+ (xy 160.791912 60.328483) (xy 160.791912 60.687693) (xy 160.179605 61.3) (xy 160.971517 62.091912) (xy 161.143892 62.04327)
+ (xy 161.358504 62.258256) (xy 161.458767 62.299889) (xy 161.360177 62.340626) (xy 161.143739 62.556686) (xy 160.971517 62.508088)
+ (xy 160.791912 62.687693) (xy 160.791912 62.328483) (xy 160.783874 62.3) (xy 160.791912 62.271517) (xy 160.769517 62.249122)
+ (xy 160.723922 62.087542) (xy 160.543851 62.023456) (xy 160 61.479605) (xy 159.474076 62.005528) (xy 159.276078 62.087542)
+ (xy 159.230482 62.249122) (xy 159.208088 62.271517) (xy 159.216125 62.3) (xy 159.208088 62.328483) (xy 159.230482 62.350877)
+ (xy 159.276078 62.512458) (xy 159.456148 62.576543) (xy 160 63.120395) (xy 160.525923 62.594471) (xy 160.723922 62.512458)
+ (xy 160.769517 62.350877) (xy 160.791912 62.328483) (xy 160.791912 62.687693) (xy 160.179605 63.3) (xy 160.193747 63.314142)
+ (xy 160.014142 63.493747) (xy 160 63.479605) (xy 159.208088 64.271517) (xy 159.242086 64.392) (xy 158.318842 64.392)
+ (xy 158.639823 64.259374) (xy 158.85626 64.043313) (xy 159.028483 64.091912) (xy 159.820395 63.3) (xy 159.028483 62.508088)
+ (xy 158.856107 62.556729) (xy 158.641496 62.341744) (xy 158.541232 62.30011) (xy 158.639823 62.259374) (xy 158.85626 62.043313)
+ (xy 159.028483 62.091912) (xy 159.820395 61.3) (xy 159.028483 60.508088) (xy 158.856107 60.556729) (xy 158.641496 60.341744)
+ (xy 158.225957 60.169197) (xy 157.776017 60.168805) (xy 157.360177 60.340626) (xy 157.131066 60.569337) (xy 157.131066 60.474547)
+ (xy 157.073184 60.334463) (xy 156.966101 60.227192) (xy 156.826118 60.169066) (xy 156.674547 60.168934) (xy 155.174547 60.168934)
+ (xy 155.034463 60.226816) (xy 154.927192 60.333899) (xy 154.869066 60.473882) (xy 154.868934 60.625453) (xy 154.868934 62.125453)
+ (xy 154.926816 62.265537) (xy 155.033899 62.372808) (xy 155.173882 62.430934) (xy 155.269627 62.431017) (xy 155.041744 62.658504)
+ (xy 154.869197 63.074043) (xy 154.868805 63.523983) (xy 155.040626 63.939823) (xy 155.358504 64.258256) (xy 155.680595 64.392)
+ (xy 154.2 64.392) (xy 154.037849 64.424253) (xy 154.005596 64.430669) (xy 153.84079 64.54079) (xy 152.64079 65.74079)
+ (xy 152.530669 65.905597) (xy 152.492 66.1) (xy 152.492 71.99138) (xy 152.431577 72.051698) (xy 152.400138 72.127411)
+ (xy 152.369553 72.053389) (xy 152.048302 71.731577) (xy 151.628354 71.5572) (xy 151.173641 71.556803) (xy 150.753389 71.730447)
+ (xy 150.431577 72.051698) (xy 150.400138 72.127411) (xy 150.369553 72.053389) (xy 150.048302 71.731577) (xy 149.628354 71.5572)
+ (xy 149.173641 71.556803) (xy 148.753389 71.730447) (xy 148.431577 72.051698) (xy 148.400138 72.127411) (xy 148.369553 72.053389)
+ (xy 148.048302 71.731577) (xy 147.628354 71.5572) (xy 147.173641 71.556803) (xy 146.753389 71.730447) (xy 146.431577 72.051698)
+ (xy 146.400138 72.127411) (xy 146.369553 72.053389) (xy 146.048302 71.731577) (xy 145.628354 71.5572) (xy 145.173641 71.556803)
+ (xy 144.753389 71.730447) (xy 144.431577 72.051698) (xy 144.2572 72.471646) (xy 144.256803 72.926359) (xy 144.430447 73.346611)
+ (xy 144.751698 73.668423) (xy 145.171646 73.8428) (xy 145.626359 73.843197) (xy 146.046611 73.669553) (xy 146.368423 73.348302)
+ (xy 146.399861 73.272588) (xy 146.430447 73.346611) (xy 146.751698 73.668423) (xy 147.171646 73.8428) (xy 147.626359 73.843197)
+ (xy 148.046611 73.669553) (xy 148.368423 73.348302) (xy 148.399861 73.272588) (xy 148.430447 73.346611) (xy 148.751698 73.668423)
+ (xy 149.171646 73.8428) (xy 149.626359 73.843197) (xy 150.046611 73.669553) (xy 150.368423 73.348302) (xy 150.399861 73.272588)
+ (xy 150.430447 73.346611) (xy 150.751698 73.668423) (xy 151.171646 73.8428) (xy 151.626359 73.843197) (xy 152.046611 73.669553)
+ (xy 152.368423 73.348302) (xy 152.399861 73.272588) (xy 152.430447 73.346611) (xy 152.751698 73.668423) (xy 153.171646 73.8428)
+ (xy 153.626359 73.843197) (xy 154.046611 73.669553) (xy 154.368423 73.348302) (xy 154.399861 73.272588) (xy 154.430447 73.346611)
+ (xy 154.751698 73.668423) (xy 155.171646 73.8428) (xy 155.626359 73.843197) (xy 156.046611 73.669553) (xy 156.261369 73.455168)
+ (xy 156.419788 73.500607) (xy 157.220395 72.7) (xy 156.419788 71.899393) (xy 156.261226 71.944872) (xy 156.048302 71.731577)
+ (xy 155.628354 71.5572) (xy 155.173641 71.556803) (xy 154.753389 71.730447) (xy 154.431577 72.051698) (xy 154.400138 72.127411)
+ (xy 154.369553 72.053389) (xy 154.048302 71.731577) (xy 153.628354 71.5572) (xy 153.508 71.557094) (xy 153.508 71.115913)
+ (xy 153.549767 71.216998) (xy 153.781781 71.449417) (xy 154.085077 71.575357) (xy 154.413482 71.575643) (xy 154.716998 71.450233)
+ (xy 154.909566 71.258) (xy 157.25 71.258) (xy 157.256192 71.256768) (xy 157.262412 71.257848) (xy 157.353163 71.237479)
+ (xy 157.444403 71.219331) (xy 157.449652 71.215823) (xy 157.455812 71.214441) (xy 157.531874 71.160884) (xy 157.60921 71.10921)
+ (xy 157.612716 71.103961) (xy 157.617879 71.100327) (xy 159.569027 69.05142) (xy 159.653004 68.918837) (xy 159.669331 68.894403)
+ (xy 159.66972 68.892446) (xy 159.675088 68.883972) (xy 159.700369 68.738361) (xy 159.708 68.7) (xy 159.708 68.694412)
+ (xy 159.708995 68.688682) (xy 159.708 68.684248) (xy 159.708 67.913841) (xy 159.839823 67.859374) (xy 160.158256 67.541496)
+ (xy 160.199889 67.441232) (xy 160.240626 67.539823) (xy 160.558504 67.858256) (xy 160.974043 68.030803) (xy 161.423983 68.031195)
+ (xy 161.839823 67.859374) (xy 162.05626 67.643313) (xy 162.228483 67.691912) (xy 163.020395 66.9) (xy 162.228483 66.108088)
+ (xy 162.056107 66.156729) (xy 161.841496 65.941744) (xy 161.425957 65.769197) (xy 160.976017 65.768805) (xy 160.560177 65.940626)
+ (xy 160.241744 66.258504) (xy 160.20011 66.358767) (xy 160.159374 66.260177) (xy 159.841496 65.941744) (xy 159.425957 65.769197)
+ (xy 158.976017 65.768805) (xy 158.560177 65.940626) (xy 158.241744 66.258504) (xy 158.20011 66.358767) (xy 158.159374 66.260177)
+ (xy 157.841496 65.941744) (xy 157.425957 65.769197) (xy 156.976017 65.768805) (xy 156.560177 65.940626) (xy 156.241744 66.258504)
+ (xy 156.20011 66.358767) (xy 156.159374 66.260177) (xy 155.841496 65.941744) (xy 155.425957 65.769197) (xy 154.976017 65.768805)
+ (xy 154.560177 65.940626) (xy 154.241744 66.258504) (xy 154.069197 66.674043) (xy 154.068805 67.123983) (xy 154.240626 67.539823)
+ (xy 154.558504 67.858256) (xy 154.974043 68.030803) (xy 155.423983 68.031195) (xy 155.839823 67.859374) (xy 156.158256 67.541496)
+ (xy 156.199889 67.441232) (xy 156.240626 67.539823) (xy 156.558504 67.858256) (xy 156.974043 68.030803) (xy 157.423983 68.031195)
+ (xy 157.839823 67.859374) (xy 158.158256 67.541496) (xy 158.199889 67.441232) (xy 158.240626 67.539823) (xy 158.558504 67.858256)
+ (xy 158.692 67.913688) (xy 158.692 68.499112) (xy 157.03227 70.242) (xy 154.909302 70.242) (xy 154.718219 70.050583)
+ (xy 154.414923 69.924643) (xy 154.086518 69.924357) (xy 153.783002 70.049767) (xy 153.550583 70.281781) (xy 153.508 70.384331)
+ (xy 153.508 66.31042) (xy 154.41042 65.408) (xy 160.4 65.408) (xy 160.594403 65.369331) (xy 160.75921 65.25921)
+ (xy 161.642315 64.376104) (xy 161.774043 64.430803) (xy 162.223983 64.431195) (xy 162.639823 64.259374) (xy 162.958256 63.941496)
+ (xy 162.999889 63.841232) (xy 163.040626 63.939823) (xy 163.358504 64.258256) (xy 163.774043 64.430803) (xy 164.223983 64.431195)
+ (xy 164.639823 64.259374) (xy 164.958256 63.941496) (xy 165.013688 63.808) (xy 165.189579 63.808) (xy 166.692 65.31042)
+ (xy 166.692 65.886158) (xy 166.560177 65.940626) (xy 166.241744 66.258504) (xy 166.20011 66.358767) (xy 166.159374 66.260177)
+ (xy 165.841496 65.941744) (xy 165.425957 65.769197) (xy 164.976017 65.768805) (xy 164.560177 65.940626) (xy 164.343739 66.156686)
+ (xy 164.171517 66.108088) (xy 163.991912 66.287693) (xy 163.991912 65.928483) (xy 163.923922 65.687542) (xy 163.40483 65.502802)
+ (xy 162.854554 65.530772) (xy 162.476078 65.687542) (xy 162.408088 65.928483) (xy 163.2 66.720395) (xy 163.991912 65.928483)
+ (xy 163.991912 66.287693) (xy 163.379605 66.9) (xy 164.171517 67.691912) (xy 164.343892 67.64327) (xy 164.558504 67.858256)
+ (xy 164.974043 68.030803) (xy 165.423983 68.031195) (xy 165.839823 67.859374) (xy 166.158256 67.541496) (xy 166.199889 67.441232)
+ (xy 166.240626 67.539823) (xy 166.558504 67.858256) (xy 166.974043 68.030803) (xy 167.423983 68.031195) (xy 167.839823 67.859374)
+ (xy 168.158256 67.541496) (xy 168.199889 67.441232) (xy 168.240626 67.539823) (xy 168.558504 67.858256) (xy 168.974043 68.030803)
+ (xy 169.423983 68.031195) (xy 169.839823 67.859374) (xy 170.158256 67.541496) (xy 170.199889 67.441232) (xy 170.240626 67.539823)
+ (xy 170.558504 67.858256) (xy 170.974043 68.030803) (xy 171.423983 68.031195) (xy 171.839823 67.859374) (xy 172.068934 67.630662)
+ (xy 172.068934 67.725453) (xy 172.126816 67.865537) (xy 172.233899 67.972808) (xy 172.373882 68.030934) (xy 172.525453 68.031066)
+ (xy 174.025453 68.031066) (xy 174.165537 67.973184) (xy 174.272808 67.866101) (xy 174.330934 67.726118) (xy 174.33106 67.581)
+ (xy 175.4 67.581) (xy 175.660607 67.529162) (xy 175.660608 67.529162) (xy 175.88154 67.38154) (xy 178.421536 64.841542)
+ (xy 178.421539 64.84154) (xy 178.42154 64.84154) (xy 178.569161 64.620608) (xy 178.569162 64.620607) (xy 178.621 64.36)
+ (xy 178.621 64.305223) (xy 178.792 64.134522) (xy 178.792 74.689579)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 181.873 115.473) (xy 179.370219 115.473) (xy 179.370219 113.32849) (xy 179.370219 110.78849) (xy 179.370219 108.24849)
+ (xy 179.370219 105.70849) (xy 179.370219 103.16849) (xy 179.177281 102.701543) (xy 178.820336 102.343975) (xy 178.353727 102.150222)
+ (xy 177.84849 102.149781) (xy 177.381543 102.342719) (xy 177.023975 102.699664) (xy 176.830222 103.166273) (xy 176.829781 103.67151)
+ (xy 177.022719 104.138457) (xy 177.379664 104.496025) (xy 177.846273 104.689778) (xy 178.35151 104.690219) (xy 178.818457 104.497281)
+ (xy 179.176025 104.140336) (xy 179.369778 103.673727) (xy 179.370219 103.16849) (xy 179.370219 105.70849) (xy 179.177281 105.241543)
+ (xy 178.820336 104.883975) (xy 178.353727 104.690222) (xy 177.84849 104.689781) (xy 177.381543 104.882719) (xy 177.023975 105.239664)
+ (xy 176.830222 105.706273) (xy 176.829781 106.21151) (xy 177.022719 106.678457) (xy 177.379664 107.036025) (xy 177.846273 107.229778)
+ (xy 178.35151 107.230219) (xy 178.818457 107.037281) (xy 179.176025 106.680336) (xy 179.369778 106.213727) (xy 179.370219 105.70849)
+ (xy 179.370219 108.24849) (xy 179.177281 107.781543) (xy 178.820336 107.423975) (xy 178.353727 107.230222) (xy 177.84849 107.229781)
+ (xy 177.381543 107.422719) (xy 177.023975 107.779664) (xy 176.830222 108.246273) (xy 176.829781 108.75151) (xy 177.022719 109.218457)
+ (xy 177.379664 109.576025) (xy 177.846273 109.769778) (xy 178.35151 109.770219) (xy 178.818457 109.577281) (xy 179.176025 109.220336)
+ (xy 179.369778 108.753727) (xy 179.370219 108.24849) (xy 179.370219 110.78849) (xy 179.177281 110.321543) (xy 178.820336 109.963975)
+ (xy 178.353727 109.770222) (xy 177.84849 109.769781) (xy 177.381543 109.962719) (xy 177.023975 110.319664) (xy 176.830222 110.786273)
+ (xy 176.829781 111.29151) (xy 177.022719 111.758457) (xy 177.379664 112.116025) (xy 177.846273 112.309778) (xy 178.35151 112.310219)
+ (xy 178.818457 112.117281) (xy 179.176025 111.760336) (xy 179.369778 111.293727) (xy 179.370219 110.78849) (xy 179.370219 113.32849)
+ (xy 179.177281 112.861543) (xy 178.820336 112.503975) (xy 178.353727 112.310222) (xy 177.84849 112.309781) (xy 177.381543 112.502719)
+ (xy 177.023975 112.859664) (xy 176.830222 113.326273) (xy 176.829781 113.83151) (xy 177.022719 114.298457) (xy 177.379664 114.656025)
+ (xy 177.846273 114.849778) (xy 178.35151 114.850219) (xy 178.818457 114.657281) (xy 179.176025 114.300336) (xy 179.369778 113.833727)
+ (xy 179.370219 113.32849) (xy 179.370219 115.473) (xy 175.414701 115.473) (xy 175.49221 115.42121) (xy 176.50821 114.405211)
+ (xy 176.50821 114.40521) (xy 176.58179 114.29509) (xy 176.61833 114.240404) (xy 176.618331 114.240403) (xy 176.656999 114.046001)
+ (xy 176.657 114.046) (xy 176.657 107.442) (xy 176.618331 107.247597) (xy 176.61833 107.247596) (xy 176.58179 107.19291)
+ (xy 176.50821 107.08279) (xy 176.50821 107.082789) (xy 175.559847 106.134426) (xy 175.560219 105.70849) (xy 175.367281 105.241543)
+ (xy 175.010336 104.883975) (xy 174.543727 104.690222) (xy 174.365003 104.690066) (xy 175.254453 104.690066) (xy 175.394537 104.632184)
+ (xy 175.501808 104.525101) (xy 175.559934 104.385118) (xy 175.560066 104.233547) (xy 175.560066 102.455547) (xy 175.502184 102.315463)
+ (xy 175.395101 102.208192) (xy 175.255118 102.150066) (xy 175.103547 102.149934) (xy 173.523486 102.149934) (xy 175.47042 100.203)
+ (xy 177.267697 100.203) (xy 177.458781 100.394417) (xy 177.762077 100.520357) (xy 178.090482 100.520643) (xy 178.393998 100.395233)
+ (xy 178.626417 100.163219) (xy 178.752357 99.859923) (xy 178.752643 99.531518) (xy 178.627233 99.228002) (xy 178.395219 98.995583)
+ (xy 178.091923 98.869643) (xy 177.763518 98.869357) (xy 177.460002 98.994767) (xy 177.267433 99.187) (xy 175.59742 99.187)
+ (xy 176.12721 98.65721) (xy 176.237331 98.492404) (xy 176.237331 98.492403) (xy 176.276 98.298) (xy 176.276 96.290302)
+ (xy 176.467417 96.099219) (xy 176.593357 95.795923) (xy 176.593643 95.467518) (xy 176.468233 95.164002) (xy 176.276 94.971433)
+ (xy 176.276 94.615) (xy 176.237331 94.420597) (xy 176.12721 94.25579) (xy 175.241 93.36958) (xy 175.241 87.103)
+ (xy 175.202331 86.908597) (xy 175.09221 86.74379) (xy 173.28921 84.94079) (xy 173.124403 84.830669) (xy 172.93 84.792)
+ (xy 171.659302 84.792) (xy 171.468219 84.600583) (xy 171.23305 84.502932) (xy 180.151609 75.64642) (xy 180.20921 75.607933)
+ (xy 180.319331 75.443126) (xy 180.358 75.248723) (xy 180.358 62.15) (xy 180.357999 62.149999) (xy 180.336249 62.040651)
+ (xy 180.913844 62.427318) (xy 181.067713 62.49121) (xy 181.072583 62.491214) (xy 181.873 62.6497) (xy 181.873 76.873)
+ (xy 179.5 76.873) (xy 179.336594 76.905503) (xy 179.198065 76.998065) (xy 179.105503 77.136594) (xy 179.073 77.3)
+ (xy 179.073 98.15) (xy 179.105503 98.313406) (xy 179.198065 98.451935) (xy 179.336594 98.544497) (xy 179.5 98.577)
+ (xy 181.873 98.577) (xy 181.873 115.473)
+ )
+ )
+ )
+ (zone (net 27) (net_name GND) (layer F.Cu) (tstamp 53CC4087) (hatch edge 0.508)
+ (connect_pads (clearance 0.25))
+ (min_thickness 0.254)
+ (fill (arc_segments 16) (thermal_gap 0.508) (thermal_bridge_width 0.508))
+ (polygon
+ (pts
+ (xy 183.2 116.7) (xy 140.2 116.7) (xy 140.2 97.5) (xy 143.2 97.5) (xy 143.2 77.9)
+ (xy 140.4 77.9) (xy 140.4 58.7) (xy 183.2 58.7) (xy 183.2 78.1) (xy 180 78.1)
+ (xy 180 97.3) (xy 183.2 97.3)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 144.992 110.889579) (xy 144.286717 111.594862) (xy 144.286717 109.928721) (xy 144.260314 109.338543) (xy 144.085258 108.91592)
+ (xy 143.833957 108.835648) (xy 142.969605 109.7) (xy 143.833957 110.564352) (xy 144.085258 110.48408) (xy 144.286717 109.928721)
+ (xy 144.286717 111.594862) (xy 144.149579 111.732) (xy 143.912042 111.732) (xy 143.834199 111.543606) (xy 143.488216 111.197018)
+ (xy 143.287849 111.113818) (xy 143.57408 110.995258) (xy 143.654352 110.743957) (xy 142.79 109.879605) (xy 141.925648 110.743957)
+ (xy 142.00592 110.995258) (xy 142.311062 111.105949) (xy 142.093606 111.195801) (xy 141.747018 111.541784) (xy 141.627 111.83082)
+ (xy 141.627 110.526326) (xy 141.746043 110.564352) (xy 142.610395 109.7) (xy 141.746043 108.835648) (xy 141.627 108.873673)
+ (xy 141.627 108.235738) (xy 141.723899 108.332808) (xy 141.863882 108.390934) (xy 142.015453 108.391066) (xy 142.038936 108.391066)
+ (xy 142.00592 108.404742) (xy 141.925648 108.656043) (xy 142.79 109.520395) (xy 143.654352 108.656043) (xy 143.57408 108.404742)
+ (xy 143.536379 108.391066) (xy 143.715453 108.391066) (xy 143.855537 108.333184) (xy 143.962808 108.226101) (xy 144.020934 108.086118)
+ (xy 144.021066 107.934547) (xy 144.021066 107.651875) (xy 144.134403 107.629331) (xy 144.29921 107.51921) (xy 144.992 106.82642)
+ (xy 144.992 110.889579)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 160.542 82.049747) (xy 160.376545 81.884293) (xy 160.211738 81.774172) (xy 160.114724 81.754874) (xy 160.114724 81.538694)
+ (xy 159.443503 80.867473) (xy 159.42936 80.881615) (xy 159.249755 80.70201) (xy 159.263898 80.687868) (xy 159.249755 80.673725)
+ (xy 159.42936 80.49412) (xy 159.443503 80.508263) (xy 159.457645 80.49412) (xy 159.63725 80.673725) (xy 159.623108 80.687868)
+ (xy 160.294329 81.359089) (xy 160.518836 81.359089) (xy 160.542 81.335934) (xy 160.542 82.049747)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 162.825946 90.408) (xy 162.591947 90.642) (xy 147.927112 90.642) (xy 147.915622 90.639777) (xy 147.721424 90.679463)
+ (xy 147.557196 90.790445) (xy 144.590473 93.788399) (xy 144.481217 93.953781) (xy 144.443566 94.148384) (xy 144.450109 94.180405)
+ (xy 144.429564 105.952014) (xy 144.021066 106.360513) (xy 144.021066 106.234547) (xy 143.963184 106.094463) (xy 143.856101 105.987192)
+ (xy 143.716118 105.929066) (xy 143.564547 105.928934) (xy 141.864547 105.928934) (xy 141.724463 105.986816) (xy 141.627 106.084108)
+ (xy 141.627 98.577) (xy 144 98.577) (xy 144.163406 98.544497) (xy 144.301935 98.451935) (xy 144.394497 98.313406)
+ (xy 144.427 98.15) (xy 144.427 77.3) (xy 144.394497 77.136594) (xy 144.301935 76.998065) (xy 144.163406 76.905503)
+ (xy 144 76.873) (xy 141.627 76.873) (xy 141.627 62.600741) (xy 142.412049 62.445298) (xy 142.56603 62.381675)
+ (xy 142.569424 62.378286) (xy 143.518169 61.743158) (xy 143.522884 61.74121) (xy 143.640795 61.623503) (xy 144.28111 60.667013)
+ (xy 144.345003 60.513144) (xy 144.345007 60.508348) (xy 144.499718 59.727) (xy 145.75458 59.727) (xy 143.14079 62.34079)
+ (xy 143.030669 62.505597) (xy 142.992 62.7) (xy 142.992 63.718934) (xy 142.524547 63.718934) (xy 142.384463 63.776816)
+ (xy 142.277192 63.883899) (xy 142.219066 64.023882) (xy 142.218934 64.175453) (xy 142.218934 65.275453) (xy 142.276816 65.415537)
+ (xy 142.383899 65.522808) (xy 142.523882 65.580934) (xy 142.675453 65.581066) (xy 144.475453 65.581066) (xy 144.615537 65.523184)
+ (xy 144.722808 65.416101) (xy 144.780934 65.276118) (xy 144.781036 65.158) (xy 148.418934 65.158) (xy 148.418934 65.275453)
+ (xy 148.476816 65.415537) (xy 148.583899 65.522808) (xy 148.723882 65.580934) (xy 148.875453 65.581066) (xy 150.675453 65.581066)
+ (xy 150.815537 65.523184) (xy 150.922808 65.416101) (xy 150.980934 65.276118) (xy 150.981066 65.124547) (xy 150.981066 64.024547)
+ (xy 150.923184 63.884463) (xy 150.816101 63.777192) (xy 150.676118 63.719066) (xy 150.524547 63.718934) (xy 148.724547 63.718934)
+ (xy 148.584463 63.776816) (xy 148.477192 63.883899) (xy 148.419066 64.023882) (xy 148.418963 64.142) (xy 146.5237 64.142)
+ (xy 146.5237 62.57503) (xy 146.5237 61.827) (xy 145.77567 61.827) (xy 145.61692 61.98575) (xy 145.61681 61.973025)
+ (xy 145.617031 62.225644) (xy 145.713907 62.458948) (xy 145.892691 62.637421) (xy 146.126165 62.73389) (xy 146.36495 62.73378)
+ (xy 146.5237 62.57503) (xy 146.5237 64.142) (xy 144.781066 64.142) (xy 144.781066 64.024547) (xy 144.723184 63.884463)
+ (xy 144.616101 63.777192) (xy 144.476118 63.719066) (xy 144.324547 63.718934) (xy 144.008 63.718934) (xy 144.008 62.91042)
+ (xy 145.616919 61.3015) (xy 145.61681 61.426975) (xy 145.61692 61.41425) (xy 145.77567 61.573) (xy 146.5237 61.573)
+ (xy 146.5237 60.82497) (xy 146.36495 60.66622) (xy 146.252251 60.666168) (xy 146.61042 60.308) (xy 154.953136 60.308)
+ (xy 154.927192 60.333899) (xy 154.869066 60.473882) (xy 154.868934 60.625453) (xy 154.868934 61.119) (xy 153.260566 61.119)
+ (xy 153.260566 61.053047) (xy 153.202684 60.912963) (xy 153.095601 60.805692) (xy 152.955618 60.747566) (xy 152.804047 60.747434)
+ (xy 152.169047 60.747434) (xy 152.028963 60.805316) (xy 151.921692 60.912399) (xy 151.863566 61.052382) (xy 151.863434 61.203953)
+ (xy 151.863434 62.346953) (xy 151.881 62.389465) (xy 151.881 63.951504) (xy 151.800583 64.031781) (xy 151.736566 64.18595)
+ (xy 151.736566 62.196047) (xy 151.736566 61.053047) (xy 151.678684 60.912963) (xy 151.571601 60.805692) (xy 151.431618 60.747566)
+ (xy 151.280047 60.747434) (xy 150.645047 60.747434) (xy 150.504963 60.805316) (xy 150.397692 60.912399) (xy 150.339566 61.052382)
+ (xy 150.339444 61.192) (xy 148.915193 61.192) (xy 148.871264 61.085683) (xy 148.764181 60.978412) (xy 148.624198 60.920286)
+ (xy 148.472627 60.920154) (xy 147.675067 60.920154) (xy 147.592911 60.9541) (xy 147.587493 60.941052) (xy 147.408709 60.762579)
+ (xy 147.175235 60.66611) (xy 146.93645 60.66622) (xy 146.7777 60.82497) (xy 146.7777 61.573) (xy 146.7977 61.573)
+ (xy 146.7977 61.827) (xy 146.7777 61.827) (xy 146.7777 62.57503) (xy 146.93645 62.73378) (xy 147.175235 62.73389)
+ (xy 147.408709 62.637421) (xy 147.587493 62.458948) (xy 147.592919 62.445879) (xy 147.674402 62.479714) (xy 147.825973 62.479846)
+ (xy 148.623533 62.479846) (xy 148.763617 62.421964) (xy 148.870888 62.314881) (xy 148.915268 62.208) (xy 150.339434 62.208)
+ (xy 150.339434 62.346953) (xy 150.397316 62.487037) (xy 150.504399 62.594308) (xy 150.644382 62.652434) (xy 150.795953 62.652566)
+ (xy 151.430953 62.652566) (xy 151.571037 62.594684) (xy 151.678308 62.487601) (xy 151.736434 62.347618) (xy 151.736566 62.196047)
+ (xy 151.736566 64.18595) (xy 151.674643 64.335077) (xy 151.674357 64.663482) (xy 151.799767 64.966998) (xy 152.031781 65.199417)
+ (xy 152.335077 65.325357) (xy 152.663482 65.325643) (xy 152.966998 65.200233) (xy 153.199417 64.968219) (xy 153.325357 64.664923)
+ (xy 153.325643 64.336518) (xy 153.243 64.136506) (xy 153.243 62.389603) (xy 153.260434 62.347618) (xy 153.260492 62.281)
+ (xy 154.942251 62.281) (xy 155.033899 62.372808) (xy 155.173882 62.430934) (xy 155.269627 62.431017) (xy 155.041744 62.658504)
+ (xy 154.869197 63.074043) (xy 154.868814 63.512764) (xy 152.89079 65.49079) (xy 152.780669 65.655597) (xy 152.742 65.85)
+ (xy 152.742 68.539579) (xy 151.589579 69.692) (xy 151.23511 69.692) (xy 151.23511 68.774245) (xy 151.23511 67.925755)
+ (xy 151.234889 67.673136) (xy 151.138013 67.439832) (xy 150.959229 67.261359) (xy 150.725755 67.16489) (xy 149.98575 67.165)
+ (xy 149.827 67.32375) (xy 149.827 68.223) (xy 151.07625 68.223) (xy 151.235 68.06425) (xy 151.23511 67.925755)
+ (xy 151.23511 68.774245) (xy 151.235 68.63575) (xy 151.07625 68.477) (xy 149.827 68.477) (xy 149.827 69.37625)
+ (xy 149.98575 69.535) (xy 150.725755 69.53511) (xy 150.959229 69.438641) (xy 151.138013 69.260168) (xy 151.234889 69.026864)
+ (xy 151.23511 68.774245) (xy 151.23511 69.692) (xy 149.573 69.692) (xy 149.573 69.37625) (xy 149.573 68.477)
+ (xy 149.573 68.223) (xy 149.573 67.32375) (xy 149.41425 67.165) (xy 148.674245 67.16489) (xy 148.440771 67.261359)
+ (xy 148.261987 67.439832) (xy 148.165111 67.673136) (xy 148.16489 67.925755) (xy 148.165 68.06425) (xy 148.32375 68.223)
+ (xy 149.573 68.223) (xy 149.573 68.477) (xy 148.32375 68.477) (xy 148.165 68.63575) (xy 148.16489 68.774245)
+ (xy 148.165111 69.026864) (xy 148.261987 69.260168) (xy 148.440771 69.438641) (xy 148.674245 69.53511) (xy 149.41425 69.535)
+ (xy 149.573 69.37625) (xy 149.573 69.692) (xy 145.03511 69.692) (xy 145.03511 68.774245) (xy 145.03511 67.925755)
+ (xy 145.034889 67.673136) (xy 144.938013 67.439832) (xy 144.759229 67.261359) (xy 144.525755 67.16489) (xy 143.78575 67.165)
+ (xy 143.627 67.32375) (xy 143.627 68.223) (xy 144.87625 68.223) (xy 145.035 68.06425) (xy 145.03511 67.925755)
+ (xy 145.03511 68.774245) (xy 145.035 68.63575) (xy 144.87625 68.477) (xy 143.627 68.477) (xy 143.627 69.37625)
+ (xy 143.78575 69.535) (xy 144.525755 69.53511) (xy 144.759229 69.438641) (xy 144.938013 69.260168) (xy 145.034889 69.026864)
+ (xy 145.03511 68.774245) (xy 145.03511 69.692) (xy 144.639062 69.692) (xy 144.615512 69.696684) (xy 144.59759 69.694658)
+ (xy 144.534606 69.712777) (xy 144.444659 69.730669) (xy 144.423673 69.744691) (xy 144.407104 69.749458) (xy 144.35811 69.788499)
+ (xy 144.279852 69.84079) (xy 144.26546 69.862328) (xy 144.25209 69.872983) (xy 143.373 70.913245) (xy 143.373 69.37625)
+ (xy 143.373 68.477) (xy 143.373 68.223) (xy 143.373 67.32375) (xy 143.21425 67.165) (xy 142.474245 67.16489)
+ (xy 142.240771 67.261359) (xy 142.061987 67.439832) (xy 141.965111 67.673136) (xy 141.96489 67.925755) (xy 141.965 68.06425)
+ (xy 142.12375 68.223) (xy 143.373 68.223) (xy 143.373 68.477) (xy 142.12375 68.477) (xy 141.965 68.63575)
+ (xy 141.96489 68.774245) (xy 141.965111 69.026864) (xy 142.061987 69.260168) (xy 142.240771 69.438641) (xy 142.474245 69.53511)
+ (xy 143.21425 69.535) (xy 143.373 69.37625) (xy 143.373 70.913245) (xy 143.111992 71.222107) (xy 143.074127 71.290557)
+ (xy 143.030669 71.355597) (xy 143.026468 71.376712) (xy 143.016048 71.395551) (xy 143.007261 71.473277) (xy 142.992 71.55)
+ (xy 142.992 73.506) (xy 143.010405 73.598528) (xy 143.027024 73.691358) (xy 143.0297 73.695535) (xy 143.030669 73.700403)
+ (xy 143.083068 73.778824) (xy 143.13396 73.858248) (xy 144.138231 74.90184) (xy 144.140999 74.903767) (xy 144.144636 74.90921)
+ (xy 144.248075 74.978326) (xy 144.300893 75.015104) (xy 144.3042 75.015828) (xy 144.309443 75.019331) (xy 144.426972 75.042708)
+ (xy 144.494518 75.057498) (xy 144.498099 75.056856) (xy 144.503846 75.058) (xy 150.270817 75.058) (xy 151.792 76.644274)
+ (xy 151.792 83.8) (xy 151.830669 83.994403) (xy 151.94079 84.15921) (xy 158.040789 90.25921) (xy 158.04079 90.25921)
+ (xy 158.15091 90.33279) (xy 158.205596 90.36933) (xy 158.205597 90.369331) (xy 158.399999 90.407999) (xy 158.4 90.408)
+ (xy 162.825946 90.408)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 163.17358 65.192) (xy 160.791912 65.192) (xy 160.791912 64.271517) (xy 160 63.479605) (xy 159.208088 64.271517)
+ (xy 159.276078 64.512458) (xy 159.79517 64.697198) (xy 160.345446 64.669228) (xy 160.723922 64.512458) (xy 160.791912 64.271517)
+ (xy 160.791912 65.192) (xy 159.21042 65.192) (xy 158.508 64.489579) (xy 158.508 64.313841) (xy 158.639823 64.259374)
+ (xy 158.85626 64.043313) (xy 159.028483 64.091912) (xy 159.820395 63.3) (xy 159.028483 62.508088) (xy 158.856107 62.556729)
+ (xy 158.641496 62.341744) (xy 158.541232 62.30011) (xy 158.639823 62.259374) (xy 158.85626 62.043313) (xy 159.028483 62.091912)
+ (xy 159.820395 61.3) (xy 159.806252 61.285857) (xy 159.985857 61.106252) (xy 160 61.120395) (xy 160.014142 61.106252)
+ (xy 160.193747 61.285857) (xy 160.179605 61.3) (xy 160.971517 62.091912) (xy 161.143892 62.04327) (xy 161.358504 62.258256)
+ (xy 161.458767 62.299889) (xy 161.360177 62.340626) (xy 161.143739 62.556686) (xy 160.971517 62.508088) (xy 160.791912 62.687693)
+ (xy 160.791912 62.328483) (xy 160.783874 62.3) (xy 160.791912 62.271517) (xy 160.769517 62.249122) (xy 160.723922 62.087542)
+ (xy 160.543851 62.023456) (xy 160 61.479605) (xy 159.474076 62.005528) (xy 159.276078 62.087542) (xy 159.230482 62.249122)
+ (xy 159.208088 62.271517) (xy 159.216125 62.3) (xy 159.208088 62.328483) (xy 159.230482 62.350877) (xy 159.276078 62.512458)
+ (xy 159.456148 62.576543) (xy 160 63.120395) (xy 160.525923 62.594471) (xy 160.723922 62.512458) (xy 160.769517 62.350877)
+ (xy 160.791912 62.328483) (xy 160.791912 62.687693) (xy 160.179605 63.3) (xy 160.971517 64.091912) (xy 161.143892 64.04327)
+ (xy 161.358504 64.258256) (xy 161.774043 64.430803) (xy 162.223983 64.431195) (xy 162.357575 64.375995) (xy 163.17358 65.192)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 163.522618 82.146359) (xy 163.498149 82.170829) (xy 163.512291 82.184971) (xy 163.35334 82.343922) (xy 163.339198 82.32978)
+ (xy 163.314728 82.354249) (xy 163.135123 82.174644) (xy 163.159593 82.150175) (xy 163.14545 82.136032) (xy 163.304401 81.977081)
+ (xy 163.318544 81.991224) (xy 163.343013 81.966754) (xy 163.522618 82.146359)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 164.540928 67.84065) (xy 163.991912 68.389666) (xy 163.991912 67.871517) (xy 163.2 67.079605) (xy 162.408088 67.871517)
+ (xy 162.476078 68.112458) (xy 162.99517 68.297198) (xy 163.545446 68.269228) (xy 163.923922 68.112458) (xy 163.991912 67.871517)
+ (xy 163.991912 68.389666) (xy 163.989579 68.392) (xy 161.02642 68.392) (xy 161.387256 68.031163) (xy 161.423983 68.031195)
+ (xy 161.839823 67.859374) (xy 162.05626 67.643313) (xy 162.228483 67.691912) (xy 163.020395 66.9) (xy 163.006252 66.885857)
+ (xy 163.185857 66.706252) (xy 163.2 66.720395) (xy 163.214142 66.706252) (xy 163.393747 66.885857) (xy 163.379605 66.9)
+ (xy 164.171517 67.691912) (xy 164.343892 67.64327) (xy 164.540928 67.84065)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 166.237776 84.606197) (xy 166.026923 84.518643) (xy 165.698518 84.518357) (xy 165.395002 84.643767) (xy 165.162583 84.875781)
+ (xy 165.036643 85.179077) (xy 165.036357 85.507482) (xy 165.161767 85.810998) (xy 165.34388 85.993429) (xy 165.337958 86.370443)
+ (xy 165.268219 86.300583) (xy 164.964923 86.174643) (xy 164.636518 86.174357) (xy 164.333002 86.299767) (xy 164.100583 86.531781)
+ (xy 163.974643 86.835077) (xy 163.974502 86.996419) (xy 163.935004 87.035917) (xy 163.843117 86.943869) (xy 163.558834 86.659586)
+ (xy 163.75921 86.459211) (xy 163.75921 86.45921) (xy 163.83279 86.34909) (xy 163.86933 86.294404) (xy 163.869331 86.294403)
+ (xy 163.907999 86.1) (xy 163.908 86.1) (xy 163.908 85.959302) (xy 164.099417 85.768219) (xy 164.225357 85.464923)
+ (xy 164.225643 85.136518) (xy 164.100233 84.833002) (xy 163.868219 84.600583) (xy 163.564923 84.474643) (xy 163.236518 84.474357)
+ (xy 162.933002 84.599767) (xy 162.700583 84.831781) (xy 162.574643 85.135077) (xy 162.574357 85.463482) (xy 162.699767 85.766998)
+ (xy 162.857036 85.924542) (xy 162.831338 85.950241) (xy 162.818688 85.919626) (xy 162.711605 85.812356) (xy 162.393704 85.494455)
+ (xy 162.253721 85.436329) (xy 162.102149 85.436196) (xy 161.962065 85.494078) (xy 161.854795 85.601161) (xy 160.441303 87.014654)
+ (xy 160.383177 87.154637) (xy 160.383171 87.161308) (xy 160.297842 87.242) (xy 158.214962 87.242) (xy 153.908 83.00956)
+ (xy 153.908 73.726825) (xy 154.046611 73.669553) (xy 154.368423 73.348302) (xy 154.399861 73.272588) (xy 154.430447 73.346611)
+ (xy 154.751698 73.668423) (xy 155.171646 73.8428) (xy 155.624775 73.843195) (xy 156.640789 74.85921) (xy 156.64079 74.85921)
+ (xy 156.75091 74.93279) (xy 156.805596 74.96933) (xy 156.805597 74.969331) (xy 157 75.008) (xy 162.389579 75.008)
+ (xy 163.692 76.31042) (xy 163.692 77.983722) (xy 163.495884 77.983722) (xy 163.316278 78.163327) (xy 163.316278 77.804116)
+ (xy 163.316278 77.57961) (xy 163.203223 77.466399) (xy 163.024438 77.287926) (xy 162.790965 77.191457) (xy 162.538346 77.191677)
+ (xy 162.305042 77.288554) (xy 162.193746 77.400005) (xy 162.193746 77.624511) (xy 162.844815 78.27558) (xy 163.316278 77.804116)
+ (xy 163.316278 78.163327) (xy 163.02442 78.455185) (xy 163.038562 78.469327) (xy 162.858957 78.648932) (xy 162.844815 78.63479)
+ (xy 162.830672 78.648932) (xy 162.651067 78.469327) (xy 162.66521 78.455185) (xy 162.014141 77.804116) (xy 161.789635 77.804116)
+ (xy 161.678184 77.915412) (xy 161.581307 78.148716) (xy 161.581087 78.401335) (xy 161.631455 78.523235) (xy 161.512127 78.523131)
+ (xy 161.412211 78.564415) (xy 161.025421 78.190897) (xy 161.025643 77.936518) (xy 160.900233 77.633002) (xy 160.668219 77.400583)
+ (xy 160.364923 77.274643) (xy 160.036518 77.274357) (xy 159.733002 77.399767) (xy 159.500583 77.631781) (xy 159.374643 77.935077)
+ (xy 159.374357 78.263482) (xy 159.448118 78.442) (xy 158.9 78.442) (xy 158.755279 78.470786) (xy 158.598944 78.314451)
+ (xy 158.458961 78.256325) (xy 158.307389 78.256192) (xy 158.167305 78.314074) (xy 158.060035 78.421157) (xy 158.003903 78.477288)
+ (xy 158.012366 78.456908) (xy 158.012499 78.305337) (xy 157.954617 78.165253) (xy 157.847534 78.057982) (xy 157.039311 77.249759)
+ (xy 156.899328 77.191634) (xy 156.747757 77.191501) (xy 156.607672 77.249383) (xy 156.500402 77.356466) (xy 156.051389 77.805479)
+ (xy 155.993264 77.945462) (xy 155.993158 78.065423) (xy 155.871335 78.015087) (xy 155.618716 78.015307) (xy 155.385412 78.112184)
+ (xy 155.274116 78.223635) (xy 155.274116 78.448141) (xy 155.925185 79.09921) (xy 155.939327 79.085067) (xy 156.118932 79.264672)
+ (xy 156.10479 79.278815) (xy 156.118932 79.292957) (xy 155.939327 79.472562) (xy 155.925185 79.45842) (xy 155.74558 79.638025)
+ (xy 155.74558 79.278815) (xy 155.094511 78.627746) (xy 154.870005 78.627746) (xy 154.758554 78.739042) (xy 154.661677 78.972346)
+ (xy 154.661457 79.224965) (xy 154.757926 79.458438) (xy 154.936399 79.637223) (xy 155.04961 79.750278) (xy 155.274116 79.750278)
+ (xy 155.74558 79.278815) (xy 155.74558 79.638025) (xy 155.453722 79.929884) (xy 155.453722 80.15439) (xy 155.566777 80.267601)
+ (xy 155.740389 80.440911) (xy 155.681164 80.440911) (xy 155.299245 80.822674) (xy 155.202368 81.055979) (xy 155.202148 81.308598)
+ (xy 155.225164 81.364301) (xy 155.058777 81.530399) (xy 154.945722 81.64361) (xy 154.945722 81.868116) (xy 155.417185 82.33958)
+ (xy 156.068254 81.688511) (xy 156.068254 81.62077) (xy 156.576892 81.112132) (xy 156.562749 81.097989) (xy 156.742354 80.918384)
+ (xy 156.756497 80.932527) (xy 156.770639 80.918384) (xy 156.950244 81.097989) (xy 156.936102 81.112132) (xy 156.950244 81.126274)
+ (xy 156.770639 81.305879) (xy 156.756497 81.291737) (xy 156.014565 82.033669) (xy 156.014565 82.10141) (xy 155.59679 82.519185)
+ (xy 155.610932 82.533327) (xy 155.431327 82.712932) (xy 155.417185 82.69879) (xy 155.23758 82.878395) (xy 155.23758 82.519185)
+ (xy 154.766116 82.047722) (xy 154.54161 82.047722) (xy 154.428399 82.160777) (xy 154.249926 82.339562) (xy 154.153457 82.573035)
+ (xy 154.153677 82.825654) (xy 154.250554 83.058958) (xy 154.362005 83.170254) (xy 154.586511 83.170254) (xy 155.23758 82.519185)
+ (xy 155.23758 82.878395) (xy 154.766116 83.349859) (xy 154.766116 83.574365) (xy 154.877412 83.685816) (xy 155.110716 83.782693)
+ (xy 155.363335 83.782913) (xy 155.485235 83.732544) (xy 155.485131 83.851873) (xy 155.543013 83.991958) (xy 155.650096 84.099228)
+ (xy 156.099109 84.548241) (xy 156.239092 84.606366) (xy 156.390663 84.606499) (xy 156.530747 84.548617) (xy 156.638018 84.441534)
+ (xy 157.446241 83.633311) (xy 157.504366 83.493328) (xy 157.504457 83.38895) (xy 157.601056 83.485549) (xy 157.741039 83.543675)
+ (xy 157.892611 83.543808) (xy 158.032695 83.485926) (xy 158.139965 83.378843) (xy 158.767304 82.751503) (xy 159.806914 82.751503)
+ (xy 160.384889 83.329477) (xy 160.38484 83.385429) (xy 160.442722 83.525513) (xy 160.549805 83.632783) (xy 161.963298 85.046275)
+ (xy 162.103281 85.104401) (xy 162.254852 85.104534) (xy 162.394936 85.046652) (xy 162.502206 84.939569) (xy 162.820107 84.621668)
+ (xy 162.86155 84.52186) (xy 162.960692 84.480896) (xy 163.067962 84.373813) (xy 163.361677 84.080097) (xy 163.440789 84.15921)
+ (xy 163.44079 84.15921) (xy 163.55091 84.23279) (xy 163.605596 84.26933) (xy 163.605597 84.269331) (xy 163.799999 84.307999)
+ (xy 163.8 84.308) (xy 164.3 84.308) (xy 164.494403 84.269331) (xy 164.65921 84.15921) (xy 165.224999 83.59342)
+ (xy 166.237776 84.606197)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 166.692 68.747912) (xy 166.520461 68.747763) (xy 166.100209 68.921407) (xy 165.778397 69.242658) (xy 165.60402 69.662606)
+ (xy 165.603916 69.781653) (xy 165.170755 70.150303) (xy 165.157949 70.166488) (xy 165.14079 70.177954) (xy 165.096848 70.243717)
+ (xy 165.047772 70.305747) (xy 165.042135 70.3256) (xy 165.030669 70.342761) (xy 165.015237 70.420341) (xy 164.993637 70.496423)
+ (xy 164.996026 70.51692) (xy 164.992 70.537164) (xy 164.992 76.090697) (xy 164.800583 76.281781) (xy 164.708 76.504744)
+ (xy 164.708 76.1) (xy 164.669331 75.905597) (xy 164.66933 75.905596) (xy 164.63279 75.85091) (xy 164.55921 75.74079)
+ (xy 164.55921 75.740789) (xy 162.95921 74.14079) (xy 162.794403 74.030669) (xy 162.6 73.992) (xy 162.543066 73.992)
+ (xy 162.543066 73.386547) (xy 162.543066 71.862547) (xy 162.485184 71.722463) (xy 162.378101 71.615192) (xy 162.238118 71.557066)
+ (xy 162.086547 71.556934) (xy 160.562547 71.556934) (xy 160.422463 71.614816) (xy 160.315192 71.721899) (xy 160.257066 71.861882)
+ (xy 160.256997 71.940636) (xy 160.048302 71.731577) (xy 159.628354 71.5572) (xy 159.173641 71.556803) (xy 158.753389 71.730447)
+ (xy 158.53863 71.944831) (xy 158.380212 71.899393) (xy 158.200607 72.078998) (xy 158.200607 71.719788) (xy 158.131142 71.477604)
+ (xy 157.607696 71.290857) (xy 157.052631 71.31864) (xy 156.668858 71.477604) (xy 156.599393 71.719788) (xy 157.4 72.520395)
+ (xy 158.200607 71.719788) (xy 158.200607 72.078998) (xy 157.579605 72.7) (xy 158.380212 73.500607) (xy 158.538773 73.455127)
+ (xy 158.751698 73.668423) (xy 159.171646 73.8428) (xy 159.626359 73.843197) (xy 160.046611 73.669553) (xy 160.256934 73.459596)
+ (xy 160.256934 73.537453) (xy 160.314816 73.677537) (xy 160.421899 73.784808) (xy 160.561882 73.842934) (xy 160.713453 73.843066)
+ (xy 162.237453 73.843066) (xy 162.377537 73.785184) (xy 162.484808 73.678101) (xy 162.542934 73.538118) (xy 162.543066 73.386547)
+ (xy 162.543066 73.992) (xy 157.963103 73.992) (xy 158.131142 73.922396) (xy 158.200607 73.680212) (xy 157.4 72.879605)
+ (xy 157.385857 72.893747) (xy 157.206252 72.714142) (xy 157.220395 72.7) (xy 156.419788 71.899393) (xy 156.261226 71.944872)
+ (xy 156.048302 71.731577) (xy 155.908 71.673318) (xy 155.908 69.304118) (xy 155.95091 69.33279) (xy 156.005596 69.36933)
+ (xy 156.005597 69.369331) (xy 156.2 69.408) (xy 164.2 69.408) (xy 164.394403 69.369331) (xy 164.55921 69.25921)
+ (xy 165.55921 68.259211) (xy 165.55921 68.25921) (xy 165.63279 68.14909) (xy 165.66933 68.094404) (xy 165.669331 68.094403)
+ (xy 165.705 67.915081) (xy 165.839823 67.859374) (xy 166.158256 67.541496) (xy 166.199889 67.441232) (xy 166.240626 67.539823)
+ (xy 166.558504 67.858256) (xy 166.692 67.913688) (xy 166.692 68.747912)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 170.939408 86.125447) (xy 170.924854 86.139977) (xy 170.606953 86.457878) (xy 170.562868 86.564045) (xy 170.457387 86.60763)
+ (xy 170.350117 86.714713) (xy 170.212156 86.852673) (xy 169.990393 86.85248) (xy 169.75692 86.94895) (xy 169.71903 86.986772)
+ (xy 169.7499 86.355599) (xy 169.735826 86.260861) (xy 169.727233 86.179785) (xy 169.722485 86.171059) (xy 169.720774 86.159539)
+ (xy 169.671622 86.077575) (xy 169.632503 86.005676) (xy 168.815288 85.024824) (xy 168.797159 85.010169) (xy 168.78421 84.99079)
+ (xy 168.720621 84.948301) (xy 168.66114 84.90022) (xy 168.638784 84.893619) (xy 168.619403 84.880669) (xy 168.544388 84.865747)
+ (xy 168.471041 84.844091) (xy 168.447862 84.846547) (xy 168.425 84.842) (xy 167.91042 84.842) (xy 165.434662 82.366242)
+ (xy 165.424414 82.376477) (xy 165.424414 82.37642) (xy 165.434636 82.366216) (xy 165.424414 82.355993) (xy 165.424414 82.151971)
+ (xy 164.470711 81.198268) (xy 164.446241 81.222737) (xy 164.266636 81.043132) (xy 164.291106 81.018663) (xy 163.337403 80.06496)
+ (xy 163.112953 80.06496) (xy 163.056047 80.121966) (xy 162.959577 80.355439) (xy 162.95977 80.577201) (xy 162.877083 80.659888)
+ (xy 162.65532 80.659695) (xy 162.421847 80.756165) (xy 162.364841 80.813071) (xy 162.364841 81.016864) (xy 162.326369 80.978392)
+ (xy 162.326369 80.851476) (xy 162.243063 80.934637) (xy 162.326369 80.851437) (xy 162.326369 80.320763) (xy 162.718611 79.928521)
+ (xy 162.776736 79.788538) (xy 162.776841 79.668576) (xy 162.898665 79.718913) (xy 163.151284 79.718693) (xy 163.384588 79.621816)
+ (xy 163.495884 79.510365) (xy 163.495884 79.285862) (xy 163.608135 79.398113) (xy 163.692 79.314248) (xy 163.692 79.567367)
+ (xy 163.55336 79.624653) (xy 163.496354 79.681559) (xy 163.496354 79.906009) (xy 164.450057 80.859712) (xy 164.474526 80.835242)
+ (xy 164.654131 81.014847) (xy 164.629662 81.039317) (xy 165.583365 81.99302) (xy 165.807814 81.99302) (xy 165.864721 81.936014)
+ (xy 165.961191 81.702541) (xy 165.960997 81.480777) (xy 166.211677 81.230097) (xy 170.174592 85.193013) (xy 170.174357 85.463482)
+ (xy 170.299767 85.766998) (xy 170.531781 85.999417) (xy 170.835077 86.125357) (xy 170.939408 86.125447)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 175.608762 62.227182) (xy 175.173641 62.226803) (xy 174.753389 62.400447) (xy 174.431577 62.721698) (xy 174.2572 63.141646)
+ (xy 174.25703 63.335706) (xy 174.24136 63.022631) (xy 174.082396 62.638858) (xy 173.840212 62.569393) (xy 173.039605 63.37)
+ (xy 173.840212 64.170607) (xy 174.082396 64.101142) (xy 174.259852 63.603738) (xy 174.430447 64.016611) (xy 174.751698 64.338423)
+ (xy 174.892 64.396681) (xy 174.892 65.200354) (xy 174.85 65.192) (xy 173.660607 65.192) (xy 173.660607 64.350212)
+ (xy 172.86 63.549605) (xy 172.680395 63.72921) (xy 172.680395 63.37) (xy 171.879788 62.569393) (xy 171.637604 62.638858)
+ (xy 171.450857 63.162304) (xy 171.47864 63.717369) (xy 171.637604 64.101142) (xy 171.879788 64.170607) (xy 172.680395 63.37)
+ (xy 172.680395 63.72921) (xy 172.059393 64.350212) (xy 172.128858 64.592396) (xy 172.652304 64.779143) (xy 173.207369 64.75136)
+ (xy 173.591142 64.592396) (xy 173.660607 64.350212) (xy 173.660607 65.192) (xy 172.01042 65.192) (xy 167.75921 60.94079)
+ (xy 167.594403 60.830669) (xy 167.4 60.792) (xy 165.013841 60.792) (xy 164.959374 60.660177) (xy 164.641496 60.341744)
+ (xy 164.560231 60.308) (xy 169.689579 60.308) (xy 170.570789 61.18921) (xy 170.57079 61.18921) (xy 170.68091 61.26279)
+ (xy 170.735596 61.29933) (xy 170.735597 61.299331) (xy 170.929999 61.337999) (xy 170.93 61.338) (xy 171.833174 61.338)
+ (xy 171.890447 61.476611) (xy 172.211698 61.798423) (xy 172.631646 61.9728) (xy 172.825706 61.972969) (xy 172.512631 61.98864)
+ (xy 172.128858 62.147604) (xy 172.059393 62.389788) (xy 172.86 63.190395) (xy 173.660607 62.389788) (xy 173.591142 62.147604)
+ (xy 173.093738 61.970147) (xy 173.506611 61.799553) (xy 173.828423 61.478302) (xy 174.0028 61.058354) (xy 174.003197 60.603641)
+ (xy 173.829553 60.183389) (xy 173.508302 59.861577) (xy 173.184203 59.727) (xy 175.076356 59.727) (xy 174.753389 59.860447)
+ (xy 174.431577 60.181698) (xy 174.2572 60.601646) (xy 174.256803 61.056359) (xy 174.430447 61.476611) (xy 174.751698 61.798423)
+ (xy 175.171646 61.9728) (xy 175.354539 61.972959) (xy 175.608762 62.227182)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 175.769 70.3157) (xy 175.76393 70.320769) (xy 175.76393 69.254715) (xy 175.763709 69.002096) (xy 175.666833 68.768792)
+ (xy 175.488049 68.590319) (xy 175.254575 68.49385) (xy 174.65257 68.49396) (xy 174.49382 68.65271) (xy 174.49382 69.76396)
+ (xy 175.60507 69.76396) (xy 175.76382 69.60521) (xy 175.76393 69.254715) (xy 175.76393 70.320769) (xy 175.763865 70.320834)
+ (xy 175.76382 70.17671) (xy 175.60507 70.01796) (xy 174.49382 70.01796) (xy 174.49382 71.12921) (xy 174.65257 71.28796)
+ (xy 174.796713 71.287986) (xy 174.737458 71.347241) (xy 174.595174 71.28816) (xy 174.140461 71.287763) (xy 173.720209 71.461407)
+ (xy 173.546 71.635312) (xy 173.546 71.338) (xy 173.536066 71.288059) (xy 174.08107 71.28796) (xy 174.23982 71.12921)
+ (xy 174.23982 70.01796) (xy 174.23982 69.76396) (xy 174.23982 68.65271) (xy 174.08107 68.49396) (xy 173.479065 68.49385)
+ (xy 173.245591 68.590319) (xy 173.066807 68.768792) (xy 172.969931 69.002096) (xy 172.96971 69.254715) (xy 172.96982 69.60521)
+ (xy 173.12857 69.76396) (xy 174.23982 69.76396) (xy 174.23982 70.01796) (xy 173.12857 70.01796) (xy 172.96982 70.17671)
+ (xy 172.96971 70.527205) (xy 172.969731 70.551311) (xy 172.842903 70.424483) (xy 172.96962 70.119314) (xy 172.970017 69.664601)
+ (xy 172.796373 69.244349) (xy 172.475122 68.922537) (xy 172.055174 68.74816) (xy 171.600461 68.747763) (xy 171.180209 68.921407)
+ (xy 171.108 68.99349) (xy 171.108 68.030919) (xy 171.423983 68.031195) (xy 171.839823 67.859374) (xy 172.068934 67.630662)
+ (xy 172.068934 67.725453) (xy 172.126816 67.865537) (xy 172.233899 67.972808) (xy 172.373882 68.030934) (xy 172.525453 68.031066)
+ (xy 174.025453 68.031066) (xy 174.165537 67.973184) (xy 174.272808 67.866101) (xy 174.330934 67.726118) (xy 174.33106 67.581)
+ (xy 174.61792 67.581) (xy 175.769 68.73208) (xy 175.769 70.3157)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 176.442 89.43958) (xy 174.28958 91.592) (xy 174.180533 91.592) (xy 174.18061 91.504745) (xy 174.1805 91.34475)
+ (xy 174.02175 91.186) (xy 173.355 91.186) (xy 173.355 91.206) (xy 173.101 91.206) (xy 173.101 91.186)
+ (xy 173.081 91.186) (xy 173.081 90.932) (xy 173.101 90.932) (xy 173.101 90.01125) (xy 172.94225 89.8525)
+ (xy 172.784745 89.85239) (xy 172.551271 89.948859) (xy 172.372487 90.127332) (xy 172.321905 90.249144) (xy 172.237601 90.164692)
+ (xy 172.097618 90.106566) (xy 172.024922 90.106502) (xy 171.623551 89.705131) (xy 171.627974 89.700717) (xy 171.627974 89.476268)
+ (xy 170.674271 88.522565) (xy 170.649801 88.547034) (xy 170.470196 88.367429) (xy 170.494666 88.34296) (xy 170.480523 88.328817)
+ (xy 170.639474 88.169866) (xy 170.653617 88.184009) (xy 170.678086 88.159539) (xy 170.857691 88.339144) (xy 170.833222 88.363614)
+ (xy 171.786925 89.317317) (xy 172.011374 89.317317) (xy 172.068281 89.260311) (xy 172.164751 89.026838) (xy 172.164557 88.805074)
+ (xy 172.409224 88.560408) (xy 172.411115 88.555853) (xy 172.693918 88.838657) (xy 172.674643 88.885077) (xy 172.674357 89.213482)
+ (xy 172.799767 89.516998) (xy 173.031781 89.749417) (xy 173.335077 89.875357) (xy 173.490757 89.875492) (xy 173.355 90.01125)
+ (xy 173.355 90.932) (xy 174.02175 90.932) (xy 174.1805 90.77325) (xy 174.18061 90.613255) (xy 174.180389 90.360636)
+ (xy 174.083513 90.127332) (xy 173.904729 89.948859) (xy 173.695506 89.86241) (xy 173.966998 89.750233) (xy 174.199417 89.518219)
+ (xy 174.325357 89.214923) (xy 174.325643 88.886518) (xy 174.200233 88.583002) (xy 173.968219 88.350583) (xy 173.664923 88.224643)
+ (xy 173.516616 88.224513) (xy 173.130787 87.838684) (xy 173.222836 87.746797) (xy 173.540737 87.428896) (xy 173.598863 87.288913)
+ (xy 173.598996 87.137341) (xy 173.541114 86.997257) (xy 173.434031 86.889987) (xy 172.020538 85.476495) (xy 171.880555 85.418369)
+ (xy 171.825397 85.41832) (xy 171.825643 85.136518) (xy 171.808683 85.095472) (xy 171.901443 85.095554) (xy 172.041527 85.037672)
+ (xy 172.148797 84.930589) (xy 173.562289 83.517096) (xy 173.620415 83.377113) (xy 173.620548 83.225542) (xy 173.562666 83.085458)
+ (xy 173.455583 82.978188) (xy 173.137682 82.660287) (xy 173.039146 82.619371) (xy 172.998706 82.521498) (xy 172.891623 82.414228)
+ (xy 172.573722 82.096327) (xy 172.472643 82.054355) (xy 172.431154 81.953945) (xy 172.324071 81.846675) (xy 172.013723 81.536327)
+ (xy 176.442 77.108051) (xy 176.442 89.43958)
+ )
+ )
+ (filled_polygon
+ (pts
+ (xy 181.873 115.473) (xy 179.370219 115.473) (xy 179.370219 113.32849) (xy 179.370219 110.78849) (xy 179.370219 108.24849)
+ (xy 179.370219 105.70849) (xy 179.370219 103.16849) (xy 179.177281 102.701543) (xy 178.820336 102.343975) (xy 178.353727 102.150222)
+ (xy 177.84849 102.149781) (xy 177.381543 102.342719) (xy 177.023975 102.699664) (xy 176.830222 103.166273) (xy 176.829781 103.67151)
+ (xy 177.022719 104.138457) (xy 177.379664 104.496025) (xy 177.846273 104.689778) (xy 178.35151 104.690219) (xy 178.818457 104.497281)
+ (xy 179.176025 104.140336) (xy 179.369778 103.673727) (xy 179.370219 103.16849) (xy 179.370219 105.70849) (xy 179.177281 105.241543)
+ (xy 178.820336 104.883975) (xy 178.353727 104.690222) (xy 177.84849 104.689781) (xy 177.381543 104.882719) (xy 177.023975 105.239664)
+ (xy 176.830222 105.706273) (xy 176.829781 106.21151) (xy 177.022719 106.678457) (xy 177.379664 107.036025) (xy 177.846273 107.229778)
+ (xy 178.35151 107.230219) (xy 178.818457 107.037281) (xy 179.176025 106.680336) (xy 179.369778 106.213727) (xy 179.370219 105.70849)
+ (xy 179.370219 108.24849) (xy 179.177281 107.781543) (xy 178.820336 107.423975) (xy 178.353727 107.230222) (xy 177.84849 107.229781)
+ (xy 177.381543 107.422719) (xy 177.023975 107.779664) (xy 176.830222 108.246273) (xy 176.829781 108.75151) (xy 177.022719 109.218457)
+ (xy 177.379664 109.576025) (xy 177.846273 109.769778) (xy 178.35151 109.770219) (xy 178.818457 109.577281) (xy 179.176025 109.220336)
+ (xy 179.369778 108.753727) (xy 179.370219 108.24849) (xy 179.370219 110.78849) (xy 179.177281 110.321543) (xy 178.820336 109.963975)
+ (xy 178.353727 109.770222) (xy 177.84849 109.769781) (xy 177.381543 109.962719) (xy 177.023975 110.319664) (xy 176.830222 110.786273)
+ (xy 176.829781 111.29151) (xy 177.022719 111.758457) (xy 177.379664 112.116025) (xy 177.846273 112.309778) (xy 178.35151 112.310219)
+ (xy 178.818457 112.117281) (xy 179.176025 111.760336) (xy 179.369778 111.293727) (xy 179.370219 110.78849) (xy 179.370219 113.32849)
+ (xy 179.177281 112.861543) (xy 178.820336 112.503975) (xy 178.353727 112.310222) (xy 177.84849 112.309781) (xy 177.381543 112.502719)
+ (xy 177.023975 112.859664) (xy 176.830222 113.326273) (xy 176.829781 113.83151) (xy 177.022719 114.298457) (xy 177.379664 114.656025)
+ (xy 177.846273 114.849778) (xy 178.35151 114.850219) (xy 178.818457 114.657281) (xy 179.176025 114.300336) (xy 179.369778 113.833727)
+ (xy 179.370219 113.32849) (xy 179.370219 115.473) (xy 176.720566 115.473) (xy 176.720566 98.667047) (xy 176.720566 98.032047)
+ (xy 176.662684 97.891963) (xy 176.555601 97.784692) (xy 176.415618 97.726566) (xy 176.264047 97.726434) (xy 175.121047 97.726434)
+ (xy 174.980963 97.784316) (xy 174.873692 97.891399) (xy 174.815566 98.031382) (xy 174.815434 98.182953) (xy 174.815434 98.817953)
+ (xy 174.873316 98.958037) (xy 174.980399 99.065308) (xy 175.120382 99.123434) (xy 175.26 99.123555) (xy 175.26 99.484579)
+ (xy 174.683066 100.061513) (xy 174.683066 97.824547) (xy 174.683066 94.024547) (xy 174.625184 93.884463) (xy 174.518101 93.777192)
+ (xy 174.378118 93.719066) (xy 174.226547 93.718934) (xy 170.226547 93.718934) (xy 170.086463 93.776816) (xy 169.979192 93.883899)
+ (xy 169.921066 94.023882) (xy 169.920934 94.175453) (xy 169.920934 97.975453) (xy 169.978816 98.115537) (xy 170.085899 98.222808)
+ (xy 170.225882 98.280934) (xy 170.377453 98.281066) (xy 174.377453 98.281066) (xy 174.517537 98.223184) (xy 174.624808 98.116101)
+ (xy 174.682934 97.976118) (xy 174.683066 97.824547) (xy 174.683066 100.061513) (xy 173.93079 100.81379) (xy 173.820669 100.978597)
+ (xy 173.782 101.173) (xy 173.782 102.149934) (xy 173.325547 102.149934) (xy 173.185463 102.207816) (xy 173.078192 102.314899)
+ (xy 173.020066 102.454882) (xy 173.019934 102.606453) (xy 173.019934 104.384453) (xy 173.077816 104.524537) (xy 173.184899 104.631808)
+ (xy 173.324882 104.689934) (xy 173.476453 104.690066) (xy 174.0378 104.690066) (xy 173.571543 104.882719) (xy 173.213975 105.239664)
+ (xy 173.020222 105.706273) (xy 173.019781 106.21151) (xy 173.212719 106.678457) (xy 173.569664 107.036025) (xy 174.036273 107.229778)
+ (xy 174.54151 107.230219) (xy 175.008457 107.037281) (xy 175.366025 106.680336) (xy 175.559778 106.213727) (xy 175.560219 105.70849)
+ (xy 175.367281 105.241543) (xy 175.010336 104.883975) (xy 174.543727 104.690222) (xy 174.365003 104.690066) (xy 175.254453 104.690066)
+ (xy 175.394537 104.632184) (xy 175.501808 104.525101) (xy 175.559934 104.385118) (xy 175.560066 104.233547) (xy 175.560066 102.455547)
+ (xy 175.502184 102.315463) (xy 175.395101 102.208192) (xy 175.255118 102.150066) (xy 175.103547 102.149934) (xy 174.798 102.149934)
+ (xy 174.798 101.38342) (xy 176.12721 100.054211) (xy 176.12721 100.05421) (xy 176.20079 99.94409) (xy 176.23733 99.889404)
+ (xy 176.237331 99.889403) (xy 176.275999 99.695) (xy 176.276 99.695) (xy 176.276 99.123566) (xy 176.414953 99.123566)
+ (xy 176.555037 99.065684) (xy 176.662308 98.958601) (xy 176.720434 98.818618) (xy 176.720566 98.667047) (xy 176.720566 115.473)
+ (xy 175.825514 115.473) (xy 175.825514 111.278035) (xy 175.799722 110.6723) (xy 175.617539 110.232468) (xy 175.560219 110.213374)
+ (xy 175.560219 108.24849) (xy 175.367281 107.781543) (xy 175.010336 107.423975) (xy 174.543727 107.230222) (xy 174.03849 107.229781)
+ (xy 173.571543 107.422719) (xy 173.374919 107.619) (xy 173.064922 107.619) (xy 172.681 107.235078) (xy 172.681 102.4)
+ (xy 172.613938 102.062856) (xy 172.422961 101.777039) (xy 171.522961 100.877039) (xy 171.237144 100.686062) (xy 170.9 100.619)
+ (xy 170.880426 100.619) (xy 170.880426 100.174867) (xy 170.822544 100.034783) (xy 170.715461 99.927512) (xy 170.575478 99.869386)
+ (xy 170.423907 99.869254) (xy 170.374219 99.869254) (xy 170.337938 99.686856) (xy 170.146961 99.401039) (xy 168.408961 97.663039)
+ (xy 168.123144 97.472062) (xy 167.786 97.405) (xy 167.072114 97.405) (xy 167.037184 97.320463) (xy 166.930101 97.213192)
+ (xy 166.790118 97.155066) (xy 166.638547 97.154934) (xy 164.606547 97.154934) (xy 164.466463 97.212816) (xy 164.359192 97.319899)
+ (xy 164.301066 97.459882) (xy 164.300934 97.611453) (xy 164.300934 99.111453) (xy 164.358816 99.251537) (xy 164.465899 99.358808)
+ (xy 164.605882 99.416934) (xy 164.757453 99.417066) (xy 166.789453 99.417066) (xy 166.929537 99.359184) (xy 167.036808 99.252101)
+ (xy 167.072145 99.167) (xy 167.421078 99.167) (xy 168.257091 100.003013) (xy 168.225832 100.034219) (xy 168.167706 100.174202)
+ (xy 168.167574 100.325773) (xy 168.167574 102.825133) (xy 168.225456 102.965217) (xy 168.332539 103.072488) (xy 168.472522 103.130614)
+ (xy 168.624093 103.130746) (xy 170.574813 103.130746) (xy 170.714897 103.072864) (xy 170.822168 102.965781) (xy 170.880294 102.825798)
+ (xy 170.88038 102.726302) (xy 170.919 102.764922) (xy 170.919 105.934815) (xy 170.738507 105.859868) (xy 170.751357 105.828923)
+ (xy 170.751643 105.500518) (xy 170.626233 105.197002) (xy 170.394219 104.964583) (xy 170.090923 104.838643) (xy 169.777684 104.83837)
+ (xy 169.782969 104.825644) (xy 169.78319 104.573025) (xy 169.78319 104.026975) (xy 169.782969 103.774356) (xy 169.686093 103.541052)
+ (xy 169.507309 103.362579) (xy 169.273835 103.26611) (xy 169.03505 103.26622) (xy 168.8763 103.42497) (xy 168.8763 104.173)
+ (xy 169.62433 104.173) (xy 169.78308 104.01425) (xy 169.78319 104.026975) (xy 169.78319 104.573025) (xy 169.78308 104.58575)
+ (xy 169.62433 104.427) (xy 168.8763 104.427) (xy 168.8763 104.447) (xy 168.6223 104.447) (xy 168.6223 104.427)
+ (xy 168.6023 104.427) (xy 168.6023 104.173) (xy 168.6223 104.173) (xy 168.6223 103.42497) (xy 168.46355 103.26622)
+ (xy 168.224765 103.26611) (xy 168.08647 103.323252) (xy 168.08647 102.623925) (xy 168.08647 100.376075) (xy 168.086249 100.123456)
+ (xy 167.989373 99.890152) (xy 167.810589 99.711679) (xy 167.577115 99.61521) (xy 166.76175 99.61532) (xy 166.603 99.77407)
+ (xy 166.603 101.373) (xy 167.92761 101.373) (xy 168.08636 101.21425) (xy 168.08647 100.376075) (xy 168.08647 102.623925)
+ (xy 168.08636 101.78575) (xy 167.92761 101.627) (xy 166.603 101.627) (xy 166.603 103.22593) (xy 166.76175 103.38468)
+ (xy 167.577115 103.38479) (xy 167.810589 103.288321) (xy 167.989373 103.109848) (xy 168.086249 102.876544) (xy 168.08647 102.623925)
+ (xy 168.08647 103.323252) (xy 167.991291 103.362579) (xy 167.812507 103.541052) (xy 167.80708 103.55412) (xy 167.725598 103.520286)
+ (xy 167.574027 103.520154) (xy 166.776467 103.520154) (xy 166.636383 103.578036) (xy 166.529112 103.685119) (xy 166.495629 103.765754)
+ (xy 166.349 103.766777) (xy 166.349 103.22593) (xy 166.349 101.627) (xy 166.349 101.373) (xy 166.349 99.77407)
+ (xy 166.19025 99.61532) (xy 165.374885 99.61521) (xy 165.141411 99.711679) (xy 164.962627 99.890152) (xy 164.865751 100.123456)
+ (xy 164.86553 100.376075) (xy 164.86564 101.21425) (xy 165.02439 101.373) (xy 166.349 101.373) (xy 166.349 101.627)
+ (xy 165.02439 101.627) (xy 164.86564 101.78575) (xy 164.86553 102.623925) (xy 164.865751 102.876544) (xy 164.962627 103.109848)
+ (xy 165.141411 103.288321) (xy 165.374885 103.38479) (xy 166.19025 103.38468) (xy 166.349 103.22593) (xy 166.349 103.766777)
+ (xy 163.603163 103.785947) (xy 163.581684 103.733963) (xy 163.474601 103.626692) (xy 163.334618 103.568566) (xy 163.246 103.568488)
+ (xy 163.246 102.938) (xy 163.207331 102.743597) (xy 163.20733 102.743596) (xy 163.17079 102.68891) (xy 163.09721 102.57879)
+ (xy 163.09721 102.578789) (xy 162.88479 102.366369) (xy 162.88479 99.125115) (xy 162.88468 98.30975) (xy 162.72593 98.151)
+ (xy 161.127 98.151) (xy 161.127 99.47561) (xy 161.28575 99.63436) (xy 162.123925 99.63447) (xy 162.376544 99.634249)
+ (xy 162.609848 99.537373) (xy 162.788321 99.358589) (xy 162.88479 99.125115) (xy 162.88479 102.366369) (xy 162.20921 101.69079)
+ (xy 162.044403 101.580669) (xy 161.85 101.542) (xy 160.873 101.542) (xy 160.873 99.47561) (xy 160.873 98.151)
+ (xy 160.873 97.897) (xy 160.873 96.57239) (xy 160.71425 96.41364) (xy 159.876075 96.41353) (xy 159.623456 96.413751)
+ (xy 159.390152 96.510627) (xy 159.211679 96.689411) (xy 159.11521 96.922885) (xy 159.11532 97.73825) (xy 159.27407 97.897)
+ (xy 160.873 97.897) (xy 160.873 98.151) (xy 159.27407 98.151) (xy 159.11532 98.30975) (xy 159.11521 99.125115)
+ (xy 159.211679 99.358589) (xy 159.390152 99.537373) (xy 159.623456 99.634249) (xy 159.876075 99.63447) (xy 160.71425 99.63436)
+ (xy 160.873 99.47561) (xy 160.873 101.542) (xy 160.121641 101.542) (xy 160.043885 101.353815) (xy 159.698006 101.007331)
+ (xy 159.245861 100.819585) (xy 158.756287 100.819157) (xy 158.303815 101.006115) (xy 157.957331 101.351994) (xy 157.95311 101.362159)
+ (xy 157.95311 99.161755) (xy 157.953 98.57175) (xy 157.79425 98.413) (xy 156.429 98.413) (xy 156.429 99.51225)
+ (xy 156.58775 99.671) (xy 157.192245 99.67111) (xy 157.444864 99.670889) (xy 157.678168 99.574013) (xy 157.856641 99.395229)
+ (xy 157.95311 99.161755) (xy 157.95311 101.362159) (xy 157.908746 101.469) (xy 156.175 101.469) (xy 156.175 99.51225)
+ (xy 156.175 98.413) (xy 154.80975 98.413) (xy 154.651 98.57175) (xy 154.65089 99.161755) (xy 154.747359 99.395229)
+ (xy 154.925832 99.574013) (xy 155.159136 99.670889) (xy 155.411755 99.67111) (xy 156.01625 99.671) (xy 156.175 99.51225)
+ (xy 156.175 101.469) (xy 154.091478 101.469) (xy 154.043885 101.353815) (xy 153.698006 101.007331) (xy 153.245861 100.819585)
+ (xy 152.756287 100.819157) (xy 152.303815 101.006115) (xy 151.957331 101.351994) (xy 151.880426 101.537202) (xy 151.880426 100.174867)
+ (xy 151.853464 100.109615) (xy 154.137458 97.82562) (xy 154.163482 97.825643) (xy 154.466998 97.700233) (xy 154.650909 97.516641)
+ (xy 154.651 98.00025) (xy 154.80975 98.159) (xy 156.175 98.159) (xy 156.175 98.139) (xy 156.429 98.139)
+ (xy 156.429 98.159) (xy 157.79425 98.159) (xy 157.953 98.00025) (xy 157.95311 97.410245) (xy 157.856641 97.176771)
+ (xy 157.678168 96.997987) (xy 157.629224 96.977664) (xy 157.640808 96.966101) (xy 157.698934 96.826118) (xy 157.699066 96.674547)
+ (xy 157.699066 95.174547) (xy 157.641184 95.034463) (xy 157.534101 94.927192) (xy 157.394118 94.869066) (xy 157.242547 94.868934)
+ (xy 155.210547 94.868934) (xy 155.070463 94.926816) (xy 154.963192 95.033899) (xy 154.905066 95.173882) (xy 154.904934 95.325453)
+ (xy 154.904934 95.337909) (xy 154.739393 95.370838) (xy 154.51846 95.51846) (xy 154.518457 95.518463) (xy 153.86254 96.174379)
+ (xy 153.836518 96.174357) (xy 153.533002 96.299767) (xy 153.300583 96.531781) (xy 153.174643 96.835077) (xy 153.174619 96.862301)
+ (xy 152.078949 97.95797) (xy 152.079066 97.824547) (xy 152.079066 94.024547) (xy 152.021184 93.884463) (xy 151.914101 93.777192)
+ (xy 151.774118 93.719066) (xy 151.622547 93.718934) (xy 147.622547 93.718934) (xy 147.482463 93.776816) (xy 147.375192 93.883899)
+ (xy 147.317066 94.023882) (xy 147.316934 94.175453) (xy 147.316934 97.975453) (xy 147.374816 98.115537) (xy 147.481899 98.222808)
+ (xy 147.621882 98.280934) (xy 147.773453 98.281066) (xy 151.755854 98.281066) (xy 150.54246 99.49446) (xy 150.394838 99.715392)
+ (xy 150.364233 99.869254) (xy 149.473187 99.869254) (xy 149.333103 99.927136) (xy 149.225832 100.034219) (xy 149.167706 100.174202)
+ (xy 149.167574 100.325773) (xy 149.167574 102.825133) (xy 149.225456 102.965217) (xy 149.332539 103.072488) (xy 149.472522 103.130614)
+ (xy 149.624093 103.130746) (xy 151.574813 103.130746) (xy 151.714897 103.072864) (xy 151.822168 102.965781) (xy 151.880294 102.825798)
+ (xy 151.880426 102.674227) (xy 151.880426 102.563004) (xy 151.956115 102.746185) (xy 152.301994 103.092669) (xy 152.754139 103.280415)
+ (xy 153.243713 103.280843) (xy 153.696185 103.093885) (xy 154.042669 102.748006) (xy 154.091253 102.631) (xy 157.908521 102.631)
+ (xy 157.956115 102.746185) (xy 158.301994 103.092669) (xy 158.754139 103.280415) (xy 159.243713 103.280843) (xy 159.696185 103.093885)
+ (xy 160.042669 102.748006) (xy 160.121565 102.558) (xy 161.639579 102.558) (xy 162.23 103.14842) (xy 162.23 103.568434)
+ (xy 162.040047 103.568434) (xy 161.899963 103.626316) (xy 161.792692 103.733399) (xy 161.734566 103.873382) (xy 161.734434 104.024953)
+ (xy 161.734434 104.659953) (xy 161.792316 104.800037) (xy 161.899399 104.907308) (xy 162.039382 104.965434) (xy 162.190953 104.965566)
+ (xy 163.333953 104.965566) (xy 163.474037 104.907684) (xy 163.57977 104.802135) (xy 166.474034 104.781929) (xy 166.528736 104.914317)
+ (xy 166.635819 105.021588) (xy 166.775802 105.079714) (xy 166.927373 105.079846) (xy 167.724933 105.079846) (xy 167.807088 105.045899)
+ (xy 167.812507 105.058948) (xy 167.909728 105.156) (xy 164.592 105.156) (xy 164.397596 105.194669) (xy 164.23279 105.30479)
+ (xy 163.639566 105.898014) (xy 163.639566 105.398047) (xy 163.581684 105.257963) (xy 163.474601 105.150692) (xy 163.334618 105.092566)
+ (xy 163.183047 105.092434) (xy 162.040047 105.092434) (xy 161.899963 105.150316) (xy 161.858333 105.191872) (xy 161.758219 105.091583)
+ (xy 161.454923 104.965643) (xy 161.126518 104.965357) (xy 160.823002 105.090767) (xy 160.590583 105.322781) (xy 160.464643 105.626077)
+ (xy 160.464357 105.954482) (xy 160.589767 106.257998) (xy 160.821781 106.490417) (xy 161.125077 106.616357) (xy 161.270095 106.616483)
+ (xy 160.571579 107.315) (xy 160.301791 107.315) (xy 160.496348 106.778632) (xy 160.469939 106.188601) (xy 160.294952 105.766144)
+ (xy 160.04369 105.685916) (xy 159.864084 105.865521) (xy 159.864084 105.50631) (xy 159.783856 105.255048) (xy 159.228632 105.053652)
+ (xy 158.638601 105.080061) (xy 158.216144 105.255048) (xy 158.135916 105.50631) (xy 159 106.370395) (xy 159.864084 105.50631)
+ (xy 159.864084 105.865521) (xy 159.179605 106.55) (xy 159.193747 106.564142) (xy 159.014142 106.743747) (xy 159 106.729605)
+ (xy 158.985857 106.743747) (xy 158.806252 106.564142) (xy 158.820395 106.55) (xy 157.95631 105.685916) (xy 157.705048 105.766144)
+ (xy 157.503652 106.321368) (xy 157.530061 106.911399) (xy 157.697237 107.315) (xy 154.301791 107.315) (xy 154.496348 106.778632)
+ (xy 154.469939 106.188601) (xy 154.294952 105.766144) (xy 154.04369 105.685916) (xy 153.864084 105.865521) (xy 153.864084 105.50631)
+ (xy 153.783856 105.255048) (xy 153.228632 105.053652) (xy 152.638601 105.080061) (xy 152.216144 105.255048) (xy 152.135916 105.50631)
+ (xy 153 106.370395) (xy 153.864084 105.50631) (xy 153.864084 105.865521) (xy 153.179605 106.55) (xy 153.193747 106.564142)
+ (xy 153.014142 106.743747) (xy 153 106.729605) (xy 152.985857 106.743747) (xy 152.806252 106.564142) (xy 152.820395 106.55)
+ (xy 151.95631 105.685916) (xy 151.705048 105.766144) (xy 151.503652 106.321368) (xy 151.516799 106.61511) (xy 151.454199 106.463606)
+ (xy 151.108216 106.117018) (xy 150.655935 105.929215) (xy 150.166213 105.928787) (xy 149.713606 106.115801) (xy 149.367018 106.461784)
+ (xy 149.179215 106.914065) (xy 149.178787 107.403787) (xy 149.365801 107.856394) (xy 149.711784 108.202982) (xy 149.91215 108.286181)
+ (xy 149.62592 108.404742) (xy 149.545648 108.656043) (xy 150.41 109.520395) (xy 151.274352 108.656043) (xy 151.19408 108.404742)
+ (xy 150.888937 108.29405) (xy 151.106394 108.204199) (xy 151.267226 108.043647) (xy 151.405789 108.18221) (xy 151.40579 108.18221)
+ (xy 151.51591 108.25579) (xy 151.570596 108.29233) (xy 151.570597 108.292331) (xy 151.765 108.331) (xy 160.782 108.331)
+ (xy 160.976403 108.292331) (xy 161.14121 108.18221) (xy 162.00842 107.315) (xy 163.449 107.315) (xy 163.643403 107.276331)
+ (xy 163.80821 107.16621) (xy 164.80242 106.172) (xy 165.481 106.172) (xy 165.318849 106.204253) (xy 165.286596 106.210669)
+ (xy 165.121789 106.32079) (xy 164.74079 106.70179) (xy 164.630669 106.866597) (xy 164.592 107.061) (xy 164.592 107.163697)
+ (xy 164.400583 107.354781) (xy 164.274643 107.658077) (xy 164.274357 107.986482) (xy 164.399767 108.289998) (xy 164.631781 108.522417)
+ (xy 164.935077 108.648357) (xy 165.263482 108.648643) (xy 165.566998 108.523233) (xy 165.799417 108.291219) (xy 165.861998 108.140506)
+ (xy 165.923767 108.289998) (xy 166.155781 108.522417) (xy 166.459077 108.648357) (xy 166.787482 108.648643) (xy 167.090998 108.523233)
+ (xy 167.28664 108.327931) (xy 167.195643 108.547077) (xy 167.195357 108.875482) (xy 167.320767 109.178998) (xy 167.552781 109.411417)
+ (xy 167.856077 109.537357) (xy 168.184482 109.537643) (xy 168.293673 109.492526) (xy 168.211643 109.690077) (xy 168.211406 109.962173)
+ (xy 167.937579 110.236) (xy 167.322566 110.236) (xy 167.322566 110.097047) (xy 167.264684 109.956963) (xy 167.157601 109.849692)
+ (xy 167.017618 109.791566) (xy 166.866047 109.791434) (xy 166.231047 109.791434) (xy 166.090963 109.849316) (xy 165.983692 109.956399)
+ (xy 165.925566 110.096382) (xy 165.925434 110.247953) (xy 165.925434 111.390953) (xy 165.983316 111.531037) (xy 166.085184 111.633084)
+ (xy 165.983692 111.734399) (xy 165.925566 111.874382) (xy 165.925434 112.025953) (xy 165.925434 113.168953) (xy 165.983316 113.309037)
+ (xy 166.090399 113.416308) (xy 166.230382 113.474434) (xy 166.381953 113.474566) (xy 167.016953 113.474566) (xy 167.157037 113.416684)
+ (xy 167.264308 113.309601) (xy 167.322434 113.169618) (xy 167.322555 113.03) (xy 167.894 113.03) (xy 168.088403 112.991331)
+ (xy 168.25321 112.88121) (xy 170.47571 110.658711) (xy 170.47571 110.65871) (xy 170.54929 110.54859) (xy 170.58583 110.493904)
+ (xy 170.585831 110.493903) (xy 170.624499 110.2995) (xy 170.6245 110.2995) (xy 170.6245 109.5375) (xy 170.592246 109.375349)
+ (xy 170.585831 109.343097) (xy 170.585831 109.343096) (xy 170.47571 109.17829) (xy 169.818827 108.521407) (xy 170.089482 108.521643)
+ (xy 170.392998 108.396233) (xy 170.625417 108.164219) (xy 170.751357 107.860923) (xy 170.751643 107.532518) (xy 170.738196 107.499976)
+ (xy 170.919 107.425269) (xy 170.919 107.6) (xy 170.986062 107.937144) (xy 171.177039 108.222961) (xy 172.077039 109.122961)
+ (xy 172.362856 109.313938) (xy 172.7 109.381) (xy 173.374978 109.381) (xy 173.569664 109.576025) (xy 173.69061 109.626246)
+ (xy 173.482468 109.712461) (xy 173.39741 109.967805) (xy 174.29 110.860395) (xy 175.18259 109.967805) (xy 175.097532 109.712461)
+ (xy 174.876579 109.631771) (xy 175.008457 109.577281) (xy 175.366025 109.220336) (xy 175.559778 108.753727) (xy 175.560219 108.24849)
+ (xy 175.560219 110.213374) (xy 175.362195 110.14741) (xy 174.469605 111.04) (xy 175.362195 111.93259) (xy 175.617539 111.847532)
+ (xy 175.825514 111.278035) (xy 175.825514 115.473) (xy 175.560219 115.473) (xy 175.560219 113.32849) (xy 175.367281 112.861543)
+ (xy 175.010336 112.503975) (xy 174.889389 112.453753) (xy 175.097532 112.367539) (xy 175.18259 112.112195) (xy 174.29 111.219605)
+ (xy 174.110395 111.39921) (xy 174.110395 111.04) (xy 173.217805 110.14741) (xy 172.962461 110.232468) (xy 172.754486 110.801965)
+ (xy 172.780278 111.4077) (xy 172.962461 111.847532) (xy 173.217805 111.93259) (xy 174.110395 111.04) (xy 174.110395 111.39921)
+ (xy 173.39741 112.112195) (xy 173.482468 112.367539) (xy 173.70342 112.448228) (xy 173.571543 112.502719) (xy 173.213975 112.859664)
+ (xy 173.020222 113.326273) (xy 173.019781 113.83151) (xy 173.212719 114.298457) (xy 173.569664 114.656025) (xy 174.036273 114.849778)
+ (xy 174.54151 114.850219) (xy 175.008457 114.657281) (xy 175.366025 114.300336) (xy 175.559778 113.833727) (xy 175.560219 113.32849)
+ (xy 175.560219 115.473) (xy 165.798566 115.473) (xy 165.798566 113.018047) (xy 165.798566 111.875047) (xy 165.740684 111.734963)
+ (xy 165.638815 111.632915) (xy 165.740308 111.531601) (xy 165.798434 111.391618) (xy 165.798566 111.240047) (xy 165.798566 110.097047)
+ (xy 165.740684 109.956963) (xy 165.633601 109.849692) (xy 165.493618 109.791566) (xy 165.342047 109.791434) (xy 164.707047 109.791434)
+ (xy 164.566963 109.849316) (xy 164.459692 109.956399) (xy 164.417598 110.05777) (xy 164.403233 110.023002) (xy 164.171219 109.790583)
+ (xy 163.867923 109.664643) (xy 163.539518 109.664357) (xy 163.236002 109.789767) (xy 163.031339 109.994073) (xy 163.021553 109.970389)
+ (xy 162.700302 109.648577) (xy 162.280354 109.4742) (xy 161.825641 109.473803) (xy 161.405389 109.647447) (xy 161.083577 109.968698)
+ (xy 160.9092 110.388646) (xy 160.908803 110.843359) (xy 161.082447 111.263611) (xy 161.403698 111.585423) (xy 161.823646 111.7598)
+ (xy 162.278359 111.760197) (xy 162.698611 111.586553) (xy 163.020423 111.265302) (xy 163.105647 111.060058) (xy 163.170565 111.125089)
+ (xy 163.003583 111.291781) (xy 162.877643 111.595077) (xy 162.877357 111.923482) (xy 162.919894 112.02643) (xy 162.890118 112.014066)
+ (xy 162.738547 112.013934) (xy 161.214547 112.013934) (xy 161.074463 112.071816) (xy 160.967192 112.178899) (xy 160.909066 112.318882)
+ (xy 160.908934 112.470453) (xy 160.908934 113.994453) (xy 160.966816 114.134537) (xy 161.073899 114.241808) (xy 161.213882 114.299934)
+ (xy 161.365453 114.300066) (xy 162.889453 114.300066) (xy 163.029537 114.242184) (xy 163.136808 114.135101) (xy 163.194934 113.995118)
+ (xy 163.195066 113.843547) (xy 163.195066 112.419632) (xy 163.234781 112.459417) (xy 163.538077 112.585357) (xy 163.810173 112.585593)
+ (xy 164.105789 112.88121) (xy 164.10579 112.88121) (xy 164.21591 112.95479) (xy 164.270596 112.99133) (xy 164.270597 112.991331)
+ (xy 164.401434 113.017355) (xy 164.401434 113.168953) (xy 164.459316 113.309037) (xy 164.566399 113.416308) (xy 164.706382 113.474434)
+ (xy 164.857953 113.474566) (xy 165.492953 113.474566) (xy 165.633037 113.416684) (xy 165.740308 113.309601) (xy 165.798434 113.169618)
+ (xy 165.798566 113.018047) (xy 165.798566 115.473) (xy 159.563412 115.473) (xy 159.563412 111.944468) (xy 159.20169 111.069034)
+ (xy 158.532489 110.398664) (xy 157.657688 110.035415) (xy 156.710468 110.034588) (xy 155.835034 110.39631) (xy 155.164664 111.065511)
+ (xy 154.801415 111.940312) (xy 154.800588 112.887532) (xy 155.16231 113.762966) (xy 155.831511 114.433336) (xy 156.706312 114.796585)
+ (xy 157.653532 114.797412) (xy 158.528966 114.43569) (xy 159.199336 113.766489) (xy 159.562585 112.891688) (xy 159.563412 111.944468)
+ (xy 159.563412 115.473) (xy 151.906717 115.473) (xy 151.906717 109.928721) (xy 151.880314 109.338543) (xy 151.705258 108.91592)
+ (xy 151.453957 108.835648) (xy 150.589605 109.7) (xy 151.453957 110.564352) (xy 151.705258 110.48408) (xy 151.906717 109.928721)
+ (xy 151.906717 115.473) (xy 151.641213 115.473) (xy 151.641213 111.996213) (xy 151.454199 111.543606) (xy 151.108216 111.197018)
+ (xy 150.907849 111.113818) (xy 151.19408 110.995258) (xy 151.274352 110.743957) (xy 150.41 109.879605) (xy 150.230395 110.05921)
+ (xy 150.230395 109.7) (xy 149.366043 108.835648) (xy 149.114742 108.91592) (xy 149.08647 108.993856) (xy 149.08647 102.623925)
+ (xy 149.08647 100.376075) (xy 149.086249 100.123456) (xy 148.989373 99.890152) (xy 148.810589 99.711679) (xy 148.577115 99.61521)
+ (xy 147.76175 99.61532) (xy 147.603 99.77407) (xy 147.603 101.373) (xy 148.92761 101.373) (xy 149.08636 101.21425)
+ (xy 149.08647 100.376075) (xy 149.08647 102.623925) (xy 149.08636 101.78575) (xy 148.92761 101.627) (xy 147.603 101.627)
+ (xy 147.603 103.22593) (xy 147.76175 103.38468) (xy 148.577115 103.38479) (xy 148.810589 103.288321) (xy 148.989373 103.109848)
+ (xy 149.086249 102.876544) (xy 149.08647 102.623925) (xy 149.08647 108.993856) (xy 148.913283 109.471279) (xy 148.939686 110.061457)
+ (xy 149.114742 110.48408) (xy 149.366043 110.564352) (xy 150.230395 109.7) (xy 150.230395 110.05921) (xy 149.545648 110.743957)
+ (xy 149.62592 110.995258) (xy 149.931062 111.105949) (xy 149.713606 111.195801) (xy 149.367018 111.541784) (xy 149.179215 111.994065)
+ (xy 149.178787 112.483787) (xy 149.365801 112.936394) (xy 149.711784 113.282982) (xy 150.164065 113.470785) (xy 150.653787 113.471213)
+ (xy 151.106394 113.284199) (xy 151.452982 112.938216) (xy 151.640785 112.485935) (xy 151.641213 111.996213) (xy 151.641213 115.473)
+ (xy 141.627 115.473) (xy 141.627 112.648874) (xy 141.745801 112.936394) (xy 142.091784 113.282982) (xy 142.544065 113.470785)
+ (xy 143.033787 113.471213) (xy 143.486394 113.284199) (xy 143.832982 112.938216) (xy 143.911966 112.748) (xy 144.36 112.748)
+ (xy 144.554403 112.709331) (xy 144.71921 112.59921) (xy 145.85921 111.459211) (xy 145.85921 111.45921) (xy 145.93279 111.34909)
+ (xy 145.96933 111.294404) (xy 145.969331 111.294403) (xy 146.007999 111.1) (xy 146.008 111.1) (xy 146.008 103.155142)
+ (xy 146.141411 103.288321) (xy 146.374885 103.38479) (xy 147.19025 103.38468) (xy 147.349 103.22593) (xy 147.349 101.627)
+ (xy 147.329 101.627) (xy 147.329 101.373) (xy 147.349 101.373) (xy 147.349 99.77407) (xy 147.19025 99.61532)
+ (xy 146.374885 99.61521) (xy 146.141411 99.711679) (xy 146.008 99.844857) (xy 146.008 94.86042) (xy 148.660419 92.208)
+ (xy 152.255095 92.208) (xy 152.033002 92.299767) (xy 151.800583 92.531781) (xy 151.674643 92.835077) (xy 151.674357 93.163482)
+ (xy 151.799767 93.466998) (xy 152.031781 93.699417) (xy 152.335077 93.825357) (xy 152.362301 93.82538) (xy 152.732457 94.195536)
+ (xy 152.73246 94.19554) (xy 152.953392 94.343161) (xy 152.953393 94.343162) (xy 153.214 94.395) (xy 154.904934 94.395)
+ (xy 154.904934 94.539453) (xy 154.962816 94.679537) (xy 155.069899 94.786808) (xy 155.209882 94.844934) (xy 155.361453 94.845066)
+ (xy 157.393453 94.845066) (xy 157.533537 94.787184) (xy 157.640808 94.680101) (xy 157.676145 94.595) (xy 159.369254 94.595)
+ (xy 159.369254 96.026813) (xy 159.427136 96.166897) (xy 159.534219 96.274168) (xy 159.674202 96.332294) (xy 159.825773 96.332426)
+ (xy 161.110503 96.332426) (xy 161.238733 96.460656) (xy 161.127 96.57239) (xy 161.127 97.897) (xy 162.72593 97.897)
+ (xy 162.88468 97.73825) (xy 162.88479 96.922885) (xy 162.867483 96.881) (xy 164.323885 96.881) (xy 164.358816 96.965537)
+ (xy 164.465899 97.072808) (xy 164.605882 97.130934) (xy 164.757453 97.131066) (xy 166.789453 97.131066) (xy 166.929537 97.073184)
+ (xy 167.036808 96.966101) (xy 167.094934 96.826118) (xy 167.095066 96.674547) (xy 167.095066 95.174547) (xy 167.037184 95.034463)
+ (xy 167.025121 95.022378) (xy 167.074168 95.002013) (xy 167.252641 94.823229) (xy 167.34911 94.589755) (xy 167.349 93.99975)
+ (xy 167.19025 93.841) (xy 165.825 93.841) (xy 165.825 93.861) (xy 165.571 93.861) (xy 165.571 93.841)
+ (xy 164.20575 93.841) (xy 164.047 93.99975) (xy 164.04689 94.589755) (xy 164.143359 94.823229) (xy 164.321832 95.002013)
+ (xy 164.370775 95.022335) (xy 164.359192 95.033899) (xy 164.323854 95.119) (xy 162.630746 95.119) (xy 162.630746 93.925187)
+ (xy 162.572864 93.785103) (xy 162.465781 93.677832) (xy 162.325798 93.619706) (xy 162.174227 93.619574) (xy 160.889496 93.619574)
+ (xy 160.360961 93.091039) (xy 160.075144 92.900062) (xy 159.738 92.833) (xy 157.676114 92.833) (xy 157.641184 92.748463)
+ (xy 157.534101 92.641192) (xy 157.394118 92.583066) (xy 157.242547 92.582934) (xy 155.210547 92.582934) (xy 155.070463 92.640816)
+ (xy 154.963192 92.747899) (xy 154.905066 92.887882) (xy 154.904939 93.033) (xy 153.496079 93.033) (xy 153.32562 92.86254)
+ (xy 153.325643 92.836518) (xy 153.200233 92.533002) (xy 152.968219 92.300583) (xy 152.745255 92.208) (xy 164.551313 92.208)
+ (xy 164.745716 92.169331) (xy 164.910523 92.05921) (xy 165.024634 91.945098) (xy 165.024357 92.263482) (xy 165.051401 92.328934)
+ (xy 164.807755 92.32889) (xy 164.555136 92.329111) (xy 164.321832 92.425987) (xy 164.143359 92.604771) (xy 164.04689 92.838245)
+ (xy 164.047 93.42825) (xy 164.20575 93.587) (xy 165.571 93.587) (xy 165.571 93.567) (xy 165.825 93.567)
+ (xy 165.825 93.587) (xy 167.19025 93.587) (xy 167.349 93.42825) (xy 167.34911 92.838245) (xy 167.253975 92.608)
+ (xy 174.5 92.608) (xy 174.694403 92.569331) (xy 174.85921 92.45921) (xy 177.30921 90.00921) (xy 177.419331 89.844404)
+ (xy 177.419331 89.844403) (xy 177.425746 89.81215) (xy 177.457999 89.65) (xy 177.458 89.65) (xy 177.458 74.51042)
+ (xy 179.10921 72.859211) (xy 179.10921 72.85921) (xy 179.219331 72.694404) (xy 179.219331 72.694403) (xy 179.225746 72.66215)
+ (xy 179.257999 72.5) (xy 179.258 72.5) (xy 179.258 67.9) (xy 179.219331 67.705597) (xy 179.219331 67.705596)
+ (xy 179.10921 67.54079) (xy 177.108 65.53958) (xy 177.108 64.154404) (xy 177.291698 64.338423) (xy 177.711646 64.5128)
+ (xy 178.166359 64.513197) (xy 178.586611 64.339553) (xy 178.908423 64.018302) (xy 179.0828 63.598354) (xy 179.083197 63.143641)
+ (xy 178.909553 62.723389) (xy 178.588302 62.401577) (xy 178.168354 62.2272) (xy 177.713641 62.226803) (xy 177.293389 62.400447)
+ (xy 177.108 62.585512) (xy 177.108 62.5) (xy 177.075746 62.337849) (xy 177.069331 62.305597) (xy 177.069331 62.305596)
+ (xy 176.95921 62.14079) (xy 176.332541 61.514121) (xy 176.368423 61.478302) (xy 176.5428 61.058354) (xy 176.543197 60.603641)
+ (xy 176.369553 60.183389) (xy 176.048302 59.861577) (xy 175.724203 59.727) (xy 177.00558 59.727) (xy 176.962463 59.744816)
+ (xy 176.855192 59.851899) (xy 176.797066 59.991882) (xy 176.796934 60.143453) (xy 176.796934 61.667453) (xy 176.854816 61.807537)
+ (xy 176.961899 61.914808) (xy 177.101882 61.972934) (xy 177.253453 61.973066) (xy 178.777453 61.973066) (xy 178.917537 61.915184)
+ (xy 179.024808 61.808101) (xy 179.082934 61.668118) (xy 179.083066 61.516547) (xy 179.083066 60.40278) (xy 179.108491 60.531186)
+ (xy 179.172114 60.685167) (xy 179.17556 60.688619) (xy 179.821453 61.653443) (xy 179.823435 61.658239) (xy 179.941142 61.77615)
+ (xy 180.913844 62.427318) (xy 181.067713 62.49121) (xy 181.072583 62.491214) (xy 181.873 62.6497) (xy 181.873 76.873)
+ (xy 179.5 76.873) (xy 179.336594 76.905503) (xy 179.198065 76.998065) (xy 179.105503 77.136594) (xy 179.073 77.3)
+ (xy 179.073 96.311056) (xy 179.037141 96.224271) (xy 178.858668 96.045487) (xy 178.625364 95.948611) (xy 178.372745 95.94839)
+ (xy 178.21275 95.9485) (xy 178.054 96.10725) (xy 178.054 96.774) (xy 178.074 96.774) (xy 178.074 97.028)
+ (xy 178.054 97.028) (xy 178.054 97.048) (xy 177.8 97.048) (xy 177.8 97.028) (xy 177.78 97.028)
+ (xy 177.78 96.774) (xy 177.8 96.774) (xy 177.8 96.10725) (xy 177.64125 95.9485) (xy 177.481255 95.94839)
+ (xy 177.228636 95.948611) (xy 176.995332 96.045487) (xy 176.816859 96.224271) (xy 176.72039 96.457745) (xy 176.720424 96.507705)
+ (xy 176.662684 96.367963) (xy 176.555601 96.260692) (xy 176.415618 96.202566) (xy 176.363934 96.20252) (xy 176.467417 96.099219)
+ (xy 176.593357 95.795923) (xy 176.593643 95.467518) (xy 176.468233 95.164002) (xy 176.236219 94.931583) (xy 175.932923 94.805643)
+ (xy 175.604518 94.805357) (xy 175.301002 94.930767) (xy 175.068583 95.162781) (xy 174.942643 95.466077) (xy 174.942357 95.794482)
+ (xy 175.067767 96.097998) (xy 175.172021 96.202434) (xy 175.121047 96.202434) (xy 174.980963 96.260316) (xy 174.873692 96.367399)
+ (xy 174.815566 96.507382) (xy 174.815434 96.658953) (xy 174.815434 97.293953) (xy 174.873316 97.434037) (xy 174.980399 97.541308)
+ (xy 175.120382 97.599434) (xy 175.271953 97.599566) (xy 176.414953 97.599566) (xy 176.555037 97.541684) (xy 176.662308 97.434601)
+ (xy 176.720424 97.29464) (xy 176.72039 97.344255) (xy 176.816859 97.577729) (xy 176.995332 97.756513) (xy 177.117144 97.807094)
+ (xy 177.032692 97.891399) (xy 176.974566 98.031382) (xy 176.974434 98.182953) (xy 176.974434 98.817953) (xy 177.032316 98.958037)
+ (xy 177.139399 99.065308) (xy 177.279382 99.123434) (xy 177.331065 99.123479) (xy 177.227583 99.226781) (xy 177.101643 99.530077)
+ (xy 177.101357 99.858482) (xy 177.226767 100.161998) (xy 177.458781 100.394417) (xy 177.762077 100.520357) (xy 178.090482 100.520643)
+ (xy 178.393998 100.395233) (xy 178.626417 100.163219) (xy 178.752357 99.859923) (xy 178.752643 99.531518) (xy 178.627233 99.228002)
+ (xy 178.522978 99.123566) (xy 178.573953 99.123566) (xy 178.714037 99.065684) (xy 178.821308 98.958601) (xy 178.879434 98.818618)
+ (xy 178.879566 98.667047) (xy 178.879566 98.032047) (xy 178.821684 97.891963) (xy 178.736931 97.807062) (xy 178.858668 97.756513)
+ (xy 179.037141 97.577729) (xy 179.073 97.490943) (xy 179.073 98.15) (xy 179.105503 98.313406) (xy 179.198065 98.451935)
+ (xy 179.336594 98.544497) (xy 179.5 98.577) (xy 181.873 98.577) (xy 181.873 115.473)
+ )
+ )
+ )
+ (zone (net 0) (net_name "") (layer B.Cu) (tstamp 56B51117) (hatch edge 0.508)
+ (connect_pads (clearance 0.25))
+ (min_thickness 0.254)
+ (keepout (tracks allowed) (vias allowed) (copperpour not_allowed))
+ (fill (arc_segments 16) (thermal_gap 0.4) (thermal_bridge_width 0.508))
+ (polygon
+ (pts
+ (xy 166.37 87.884) (xy 164.719 86.487) (xy 164.719 84.074) (xy 166.878 84.963) (xy 166.878 87.884)
+ )
+ )
+ )
+)
diff --git a/PCB v2.3d/Multipro-txV2-3d.net b/PCB v2.3d/Multipro-txV2-3d.net
new file mode 100644
index 0000000..3177058
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d.net
@@ -0,0 +1,644 @@
+(export (version D)
+ (design
+ (source "C:\\Documents and Settings\\Steve\\My Documents\\Multipro-tx\\MultiproV2.3d\\Multipro-txV2-3d.sch")
+ (date "05/02/2016 16:35:59")
+ (tool "eeschema (2013-07-07 BZR 4022)-stable"))
+ (components
+ (comp (ref IC1)
+ (value ATMEGA328-A)
+ (footprint TQFP32)
+ (libsource (lib atmel) (part ATMEGA328-A))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC5C99))
+ (comp (ref C2)
+ (value 0.1uF)
+ (libsource (lib device) (part C))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC5DA8))
+ (comp (ref R1)
+ (value 10K)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC5FEA))
+ (comp (ref R4)
+ (value 1K)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC6125))
+ (comp (ref D1)
+ (value LED)
+ (libsource (lib device) (part LED))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC617C))
+ (comp (ref X1)
+ (value 16MHz)
+ (libsource (lib device) (part CRYSTAL))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC62D3))
+ (comp (ref C4)
+ (value 18pF)
+ (libsource (lib device) (part C))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC62F4))
+ (comp (ref C5)
+ (value 18pF)
+ (libsource (lib device) (part C))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53BC631E))
+ (comp (ref U1)
+ (value NCP1117ST50T3G)
+ (libsource (lib regul) (part NCP1117ST50T3G))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2ACE9))
+ (comp (ref U2)
+ (value NCP1117ST33T3G)
+ (libsource (lib regul) (part NCP1117ST50T3G))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2AD08))
+ (comp (ref C1)
+ (value 22uF)
+ (libsource (lib device) (part CP1))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2AE5B))
+ (comp (ref C3)
+ (value 22uF)
+ (libsource (lib device) (part CP1))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2AE76))
+ (comp (ref C6)
+ (value 22uF)
+ (libsource (lib device) (part CP1))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2B150))
+ (comp (ref R5)
+ (value 2K2)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2B787))
+ (comp (ref R2)
+ (value 2K2)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2B990))
+ (comp (ref R3)
+ (value 1K)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2B99F))
+ (comp (ref U3)
+ (value CYRF6936)
+ (libsource (lib device) (part CYRF6936))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2BF57))
+ (comp (ref U4)
+ (value A7105)
+ (libsource (lib device) (part A7105))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2C184))
+ (comp (ref U5)
+ (value NRF24L01)
+ (libsource (lib device) (part NRF24L01))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2C24E))
+ (comp (ref U6)
+ (value CC2500)
+ (libsource (lib device) (part CC2500))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2C3F4))
+ (comp (ref R6)
+ (value 1K)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2D8C4))
+ (comp (ref D2)
+ (value LED)
+ (libsource (lib device) (part LED))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2D9F8))
+ (comp (ref P1)
+ (value ISP)
+ (libsource (lib conn) (part CONN_3X2))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53C2DBCC))
+ (comp (ref P2)
+ (value CONN_5)
+ (libsource (lib conn) (part CONN_5))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53FE5423))
+ (comp (ref JP2)
+ (value JUMPER)
+ (libsource (lib device) (part JUMPER))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53FE5887))
+ (comp (ref JP4)
+ (value JUMPER)
+ (libsource (lib device) (part JUMPER))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 53FE5896))
+ (comp (ref SW1)
+ (value HEX_DIP)
+ (libsource (lib device) (part HEX_DIP))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 54394777))
+ (comp (ref C7)
+ (value 0.1uF)
+ (libsource (lib device) (part C))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 54845FE2))
+ (comp (ref R7)
+ (value 2K2)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 54DCE006))
+ (comp (ref P3)
+ (value CONN_2)
+ (libsource (lib conn) (part CONN_2))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4E4CA))
+ (comp (ref JP3)
+ (value JUMPER)
+ (libsource (lib device) (part JUMPER))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4E4E1))
+ (comp (ref R8)
+ (value 470)
+ (libsource (lib device) (part R))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4E6D8))
+ (comp (ref SW2)
+ (value BIND)
+ (libsource (lib device) (part SW_PUSH_4_PIN))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4EC6E))
+ (comp (ref SW3)
+ (value RESET)
+ (libsource (lib device) (part SW_PUSH_4_PIN))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4EC7B))
+ (comp (ref JP1)
+ (value JUMPER)
+ (libsource (lib device) (part JUMPER))
+ (sheetpath (names /) (tstamps /))
+ (tstamp 56B4EFD5)))
+ (libparts
+ (libpart (lib device) (part A7105)
+ (fields
+ (field (name Reference) U)
+ (field (name Value) A7105)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 3V3) (type input))
+ (pin (num 2) (name SCS) (type input))
+ (pin (num 3) (name GND) (type input))
+ (pin (num 4) (name SCK) (type input))
+ (pin (num 5) (name SDIO) (type input))
+ (pin (num 6) (name GIO1) (type input))
+ (pin (num 7) (name GIO2) (type output))
+ (pin (num 8) (name RXEN) (type input))
+ (pin (num 9) (name TXEN) (type output))))
+ (libpart (lib device) (part C)
+ (description "Condensateur non polarise")
+ (footprints
+ (fp SM*)
+ (fp C?)
+ (fp C1-1))
+ (fields
+ (field (name Reference) C)
+ (field (name Value) C)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name ~) (type passive))
+ (pin (num 2) (name ~) (type passive))))
+ (libpart (lib device) (part CC2500)
+ (fields
+ (field (name Reference) U)
+ (field (name Value) CC2500)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 3V3) (type input))
+ (pin (num 2) (name SI) (type input))
+ (pin (num 3) (name SCLK) (type input))
+ (pin (num 4) (name SO) (type input))
+ (pin (num 5) (name GDO2) (type input))
+ (pin (num 6) (name GND) (type input))
+ (pin (num 7) (name GDOo) (type input))
+ (pin (num 8) (name CSn) (type input))
+ (pin (num 9) (name PA_EN) (type input))
+ (pin (num 10) (name LNA_EN) (type input))))
+ (libpart (lib device) (part CP1)
+ (description "Condensateur polarise")
+ (footprints
+ (fp CP*)
+ (fp SM*))
+ (fields
+ (field (name Reference) C)
+ (field (name Value) CP1)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name ~) (type passive))
+ (pin (num 2) (name ~) (type passive))))
+ (libpart (lib device) (part CRYSTAL)
+ (fields
+ (field (name Reference) X)
+ (field (name Value) CRYSTAL)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 1) (type passive))
+ (pin (num 2) (name 2) (type passive))
+ (pin (num 3) (name 3) (type passive))
+ (pin (num 4) (name 4) (type passive))))
+ (libpart (lib device) (part CYRF6936)
+ (fields
+ (field (name Reference) U)
+ (field (name Value) CYRF6936)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 5.0V) (type input))
+ (pin (num 2) (name NCS) (type input))
+ (pin (num 4) (name SCK) (type input))
+ (pin (num 5) (name GND) (type input))
+ (pin (num 6) (name GND) (type input))
+ (pin (num 8) (name MOSI) (type input))
+ (pin (num 9) (name RST) (type input))
+ (pin (num 10) (name MISO) (type input))))
+ (libpart (lib device) (part HEX_DIP)
+ (fields
+ (field (name Reference) SW)
+ (field (name Value) HEX_DIP)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 1) (type output))
+ (pin (num 2) (name C) (type passive))
+ (pin (num 3) (name 4) (type output))
+ (pin (num 4) (name 2) (type output))
+ (pin (num 5) (name C) (type passive))
+ (pin (num 6) (name 8) (type output))))
+ (libpart (lib device) (part JUMPER)
+ (fields
+ (field (name Reference) JP)
+ (field (name Value) JUMPER)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 1) (type passive))
+ (pin (num 2) (name 2) (type passive))))
+ (libpart (lib device) (part LED)
+ (footprints
+ (fp LED-3MM)
+ (fp LED-5MM)
+ (fp LED-10MM)
+ (fp LED-0603)
+ (fp LED-0805)
+ (fp LED-1206)
+ (fp LEDV))
+ (fields
+ (field (name Reference) D)
+ (field (name Value) LED)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name A) (type passive))
+ (pin (num 2) (name K) (type passive))))
+ (libpart (lib device) (part NRF24L01)
+ (fields
+ (field (name Reference) U)
+ (field (name Value) NRF24L01)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name GND) (type input))
+ (pin (num 2) (name 3V3) (type input))
+ (pin (num 3) (name CE) (type input))
+ (pin (num 4) (name CSN) (type input))
+ (pin (num 5) (name SCK) (type input))
+ (pin (num 6) (name MOSI) (type input))
+ (pin (num 7) (name MISO) (type input))
+ (pin (num 8) (name IRQ) (type NotConnected))))
+ (libpart (lib device) (part R)
+ (description Resistance)
+ (footprints
+ (fp R?)
+ (fp SM0603)
+ (fp SM0805)
+ (fp R?-*)
+ (fp SM1206))
+ (fields
+ (field (name Reference) R)
+ (field (name Value) R)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name ~) (type passive))
+ (pin (num 2) (name ~) (type passive))))
+ (libpart (lib device) (part SW_PUSH_4_Pin)
+ (description "Push Button 4 Pin")
+ (fields
+ (field (name Reference) SW)
+ (field (name Value) SW_PUSH_4_Pin)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 1) (type passive))
+ (pin (num 2) (name 2) (type input))
+ (pin (num 3) (name 3) (type passive))
+ (pin (num 4) (name 4) (type input))))
+ (libpart (lib conn) (part CONN_2)
+ (description "Symbole general de connecteur")
+ (fields
+ (field (name Reference) P)
+ (field (name Value) CONN_2)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name P1) (type passive))
+ (pin (num 2) (name PM) (type passive))))
+ (libpart (lib conn) (part CONN_3X2)
+ (description "Symbole general de connecteur")
+ (fields
+ (field (name Reference) P)
+ (field (name Value) CONN_3X2)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name 1) (type passive))
+ (pin (num 2) (name 2) (type passive))
+ (pin (num 3) (name 3) (type passive))
+ (pin (num 4) (name 4) (type passive))
+ (pin (num 5) (name 5) (type passive))
+ (pin (num 6) (name 6) (type passive))))
+ (libpart (lib conn) (part CONN_5)
+ (description "Symbole general de connecteur")
+ (fields
+ (field (name Reference) P)
+ (field (name Value) CONN_5)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name ~) (type passive))
+ (pin (num 2) (name ~) (type passive))
+ (pin (num 3) (name ~) (type passive))
+ (pin (num 4) (name ~) (type passive))
+ (pin (num 5) (name ~) (type passive))))
+ (libpart (lib regul) (part NCP1117ST50T3G)
+ (description "NCP1117ST50T3G, 1A Low drop-out regulator, Fixed Output 5V, SOT223")
+ (docs http://www.onsemi.com/pub_link/Collateral/NCP1117-D.PDF)
+ (footprints
+ (fp SOT223))
+ (fields
+ (field (name Reference) U)
+ (field (name Value) NCP1117ST50T3G)
+ (field (name Footprint) ~)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name GND) (type power_in))
+ (pin (num 2) (name VO) (type power_out))
+ (pin (num 3) (name VI) (type power_in))))
+ (libpart (lib atmel) (part ATMEGA168A-A)
+ (description "ATMEGA168A, TQFP32, 16k Flash, 1kB SRAM, 512B EEPROM")
+ (docs http://www.atmel.com/dyn/resources/prod_documents/doc8271.pdf)
+ (fields
+ (field (name Reference) IC)
+ (field (name Value) ATMEGA168A-A)
+ (field (name Footprint) TQFP32)
+ (field (name Datasheet) ~))
+ (pins
+ (pin (num 1) (name "(PCINT19/OC2B/INT1)PD3") (type BiDi))
+ (pin (num 2) (name "(PCINT20/XCK/T0)PD4") (type BiDi))
+ (pin (num 3) (name GND) (type power_in))
+ (pin (num 4) (name VCC) (type power_in))
+ (pin (num 5) (name GND) (type power_in))
+ (pin (num 6) (name VCC) (type power_in))
+ (pin (num 7) (name "(PCINT6/XTAL1/TOSC1)PB6") (type BiDi))
+ (pin (num 8) (name "(PCINT7/XTAL2/TOSC2)PB7") (type BiDi))
+ (pin (num 9) (name "(PCINT21/OC0B/T1)PD5") (type BiDi))
+ (pin (num 10) (name "(PCINT22/OC0A/AIN0)PD6") (type BiDi))
+ (pin (num 11) (name "(PCINT23/AIN1)PD7") (type BiDi))
+ (pin (num 12) (name "(PCINT0/CLKO/ICP1)PB0") (type BiDi))
+ (pin (num 13) (name "(PCINT1/OC1A)PB1") (type BiDi))
+ (pin (num 14) (name "(PCINT2/OC1B/~SS~)PB2") (type BiDi))
+ (pin (num 15) (name "(PCINT3/OC2A/MOSI)PB3") (type BiDi))
+ (pin (num 16) (name "(PCINT4/MISO)PB4") (type BiDi))
+ (pin (num 17) (name "(PCINT5/SCK)PB5") (type BiDi))
+ (pin (num 18) (name AVCC) (type power_in))
+ (pin (num 19) (name ADC6) (type NotConnected))
+ (pin (num 20) (name AREF) (type BiDi))
+ (pin (num 21) (name GND) (type power_in))
+ (pin (num 22) (name ADC7) (type NotConnected))
+ (pin (num 23) (name "(PCINT8/ADC0)PC0") (type BiDi))
+ (pin (num 24) (name "(PCINT9/ADC1)PC1") (type BiDi))
+ (pin (num 25) (name "(PCINT10/ADC2)PC2") (type BiDi))
+ (pin (num 26) (name "(PCINT11/ADC3)PC3") (type BiDi))
+ (pin (num 27) (name "(PCINT12/SDA/ADC4)PC4") (type BiDi))
+ (pin (num 28) (name "(PCINT14/SCL/ADC5)PC5") (type BiDi))
+ (pin (num 29) (name "(PCINT14/~RESET~)PC6") (type BiDi))
+ (pin (num 30) (name "(PCINT16/RXD)PD0") (type BiDi))
+ (pin (num 31) (name "(PCINT17/TXD)PD1") (type BiDi))
+ (pin (num 32) (name "(PCINT18/INT0)PD2") (type BiDi)))))
+ (libraries
+ (library (logical device)
+ (uri "C:\\Program Files\\KiCad\\share\\library\\device.lib"))
+ (library (logical conn)
+ (uri "C:\\Program Files\\KiCad\\share\\library\\conn.lib"))
+ (library (logical regul)
+ (uri "C:\\Program Files\\KiCad\\share\\library\\regul.lib"))
+ (library (logical atmel)
+ (uri "C:\\Program Files\\KiCad\\share\\library\\atmel.lib")))
+ (nets
+ (net (code 1) (name GND)
+ (node (ref P2) (pin 4))
+ (node (ref C7) (pin 2))
+ (node (ref SW1) (pin 5))
+ (node (ref SW1) (pin 2))
+ (node (ref C5) (pin 2))
+ (node (ref C4) (pin 1))
+ (node (ref X1) (pin 4))
+ (node (ref SW3) (pin 4))
+ (node (ref SW3) (pin 3))
+ (node (ref SW2) (pin 4))
+ (node (ref SW2) (pin 3))
+ (node (ref D1) (pin 2))
+ (node (ref R3) (pin 2))
+ (node (ref U6) (pin 6))
+ (node (ref U5) (pin 1))
+ (node (ref U4) (pin 3))
+ (node (ref U3) (pin 6))
+ (node (ref U3) (pin 5))
+ (node (ref C3) (pin 2))
+ (node (ref C1) (pin 2))
+ (node (ref U2) (pin 1))
+ (node (ref U1) (pin 1))
+ (node (ref C6) (pin 2))
+ (node (ref IC1) (pin 21))
+ (node (ref IC1) (pin 5))
+ (node (ref IC1) (pin 3))
+ (node (ref X1) (pin 2))
+ (node (ref C2) (pin 2))
+ (node (ref D2) (pin 2))
+ (node (ref P1) (pin 6)))
+ (net (code 2) (name "")
+ (node (ref D2) (pin 1))
+ (node (ref R6) (pin 2)))
+ (net (code 3) (name 3V3)
+ (node (ref R5) (pin 2))
+ (node (ref U6) (pin 1))
+ (node (ref U5) (pin 2))
+ (node (ref C7) (pin 1))
+ (node (ref U4) (pin 1))
+ (node (ref U2) (pin 2))
+ (node (ref IC1) (pin 18))
+ (node (ref IC1) (pin 6))
+ (node (ref P1) (pin 2))
+ (node (ref IC1) (pin 4))
+ (node (ref R1) (pin 1))
+ (node (ref C6) (pin 1)))
+ (net (code 4) (name /CC25_CSN)
+ (node (ref IC1) (pin 11))
+ (node (ref U6) (pin 8)))
+ (net (code 5) (name /MISO)
+ (node (ref U3) (pin 10))
+ (node (ref IC1) (pin 10))
+ (node (ref U5) (pin 7))
+ (node (ref U6) (pin 4)))
+ (net (code 6) (name /SCK)
+ (node (ref IC1) (pin 2))
+ (node (ref U4) (pin 4))
+ (node (ref U6) (pin 3))
+ (node (ref U3) (pin 4))
+ (node (ref U5) (pin 5)))
+ (net (code 7) (name /MOSI)
+ (node (ref U5) (pin 6))
+ (node (ref IC1) (pin 9))
+ (node (ref U6) (pin 2))
+ (node (ref U4) (pin 5))
+ (node (ref U3) (pin 8)))
+ (net (code 8) (name +5V)
+ (node (ref U2) (pin 3))
+ (node (ref U1) (pin 2))
+ (node (ref C3) (pin 1))
+ (node (ref U3) (pin 1))
+ (node (ref R6) (pin 1)))
+ (net (code 9) (name /D11)
+ (node (ref P1) (pin 4))
+ (node (ref SW1) (pin 4))
+ (node (ref IC1) (pin 15)))
+ (net (code 10) (name /RESET)
+ (node (ref IC1) (pin 29))
+ (node (ref SW3) (pin 1))
+ (node (ref P1) (pin 5))
+ (node (ref R1) (pin 2))
+ (node (ref SW3) (pin 2)))
+ (net (code 11) (name /D12)
+ (node (ref P1) (pin 1))
+ (node (ref IC1) (pin 16))
+ (node (ref SW1) (pin 3)))
+ (net (code 12) (name "")
+ (node (ref U4) (pin 7))
+ (node (ref U4) (pin 8)))
+ (net (code 13) (name "")
+ (node (ref U4) (pin 6))
+ (node (ref U4) (pin 9)))
+ (net (code 14) (name /A7105_CSN)
+ (node (ref IC1) (pin 32))
+ (node (ref U4) (pin 2)))
+ (net (code 15) (name /CC25_LANEN)
+ (node (ref U6) (pin 5))
+ (node (ref U6) (pin 10)))
+ (net (code 16) (name /CC25_PAEN)
+ (node (ref U6) (pin 9))
+ (node (ref U6) (pin 7)))
+ (net (code 17) (name /NRF_CE)
+ (node (ref R5) (pin 1))
+ (node (ref U5) (pin 3)))
+ (net (code 18) (name /NRF_CSN)
+ (node (ref U5) (pin 4))
+ (node (ref IC1) (pin 12)))
+ (net (code 19) (name "")
+ (node (ref R8) (pin 1))
+ (node (ref P3) (pin 2))
+ (node (ref JP3) (pin 2)))
+ (net (code 20) (name /PPM_IN)
+ (node (ref JP2) (pin 1))
+ (node (ref P2) (pin 1))
+ (node (ref R2) (pin 2)))
+ (net (code 21) (name "")
+ (node (ref JP3) (pin 1))
+ (node (ref P2) (pin 5)))
+ (net (code 22) (name "")
+ (node (ref JP4) (pin 2))
+ (node (ref P3) (pin 1)))
+ (net (code 23) (name "")
+ (node (ref JP2) (pin 2))
+ (node (ref R7) (pin 1)))
+ (net (code 24) (name "")
+ (node (ref R3) (pin 1))
+ (node (ref JP1) (pin 2)))
+ (net (code 25) (name /RX)
+ (node (ref IC1) (pin 30))
+ (node (ref R7) (pin 2)))
+ (net (code 26) (name "")
+ (node (ref P2) (pin 2))
+ (node (ref JP4) (pin 1)))
+ (net (code 27) (name /TX)
+ (node (ref IC1) (pin 31))
+ (node (ref R8) (pin 2)))
+ (net (code 28) (name /CYRF_RST)
+ (node (ref IC1) (pin 28))
+ (node (ref U3) (pin 9)))
+ (net (code 29) (name /CYRF_CSN)
+ (node (ref U3) (pin 2))
+ (node (ref IC1) (pin 13)))
+ (net (code 30) (name /A0)
+ (node (ref IC1) (pin 23))
+ (node (ref SW1) (pin 6)))
+ (net (code 31) (name /D10)
+ (node (ref SW1) (pin 1))
+ (node (ref IC1) (pin 14)))
+ (net (code 32) (name /xtl2)
+ (node (ref X1) (pin 1))
+ (node (ref IC1) (pin 8))
+ (node (ref C5) (pin 1)))
+ (net (code 33) (name /xtl1)
+ (node (ref IC1) (pin 7))
+ (node (ref X1) (pin 3))
+ (node (ref C4) (pin 2)))
+ (net (code 34) (name "")
+ (node (ref D1) (pin 1))
+ (node (ref SW2) (pin 1))
+ (node (ref SW2) (pin 2))
+ (node (ref R4) (pin 2)))
+ (net (code 35) (name /A3)
+ (node (ref IC1) (pin 26)))
+ (net (code 36) (name /D3)
+ (node (ref IC1) (pin 1))
+ (node (ref R2) (pin 1))
+ (node (ref JP1) (pin 1)))
+ (net (code 37) (name /A4)
+ (node (ref IC1) (pin 27)))
+ (net (code 38) (name /A2)
+ (node (ref IC1) (pin 25)))
+ (net (code 39) (name /A1)
+ (node (ref IC1) (pin 24)))
+ (net (code 40) (name /A6)
+ (node (ref IC1) (pin 19)))
+ (net (code 41) (name /A7)
+ (node (ref IC1) (pin 22)))
+ (net (code 42) (name /PB5)
+ (node (ref P1) (pin 3))
+ (node (ref IC1) (pin 17))
+ (node (ref R4) (pin 1)))
+ (net (code 43) (name "")
+ (node (ref IC1) (pin 20))
+ (node (ref C2) (pin 1)))
+ (net (code 44) (name "")
+ (node (ref U5) (pin 8)))
+ (net (code 45) (name /BATT)
+ (node (ref C1) (pin 1))
+ (node (ref P2) (pin 3))
+ (node (ref U1) (pin 3)))))
\ No newline at end of file
diff --git a/PCB v2.3d/Multipro-txV2-3d.pro b/PCB v2.3d/Multipro-txV2-3d.pro
new file mode 100644
index 0000000..1e8e02d
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d.pro
@@ -0,0 +1,41 @@
+update=04/02/2016 18:14:57
+last_client=pcbnew
+[pcbnew]
+version=1
+LastNetListRead=Multipro-txV2-3d.net
+UseCmpFile=1
+PadDrill=0.750000000000
+PadDrillOvalY=0.750000000000
+PadSizeH=1.250000000000
+PadSizeV=1.250000000000
+PcbTextSizeV=1.500000000000
+PcbTextSizeH=1.500000000000
+PcbTextThickness=0.300000000000
+ModuleTextSizeV=1.000000000000
+ModuleTextSizeH=1.000000000000
+ModuleTextSizeThickness=0.150000000000
+SolderMaskClearance=0.000000000000
+SolderMaskMinWidth=0.000000000000
+DrawSegmentWidth=0.400000000000
+BoardOutlineThickness=0.100000000000
+ModuleOutlineThickness=0.150000000000
+[pcbnew/libraries]
+LibDir=../Multipro-txV2
+LibName1=sockets
+LibName2=connect
+LibName3=discret
+LibName4=pin_array
+LibName5=divers
+LibName6=smd_capacitors
+LibName7=smd_resistors
+LibName8=smd_crystal&oscillator
+LibName9=smd_dil
+LibName10=smd_transistors
+LibName11=libcms
+LibName12=display
+LibName13=led
+LibName14=dip_sockets
+LibName15=pga_sockets
+LibName16=valves
+LibName17=Logo
+LibName18=LogoBsilk
diff --git a/PCB v2.3d/Multipro-txV2-3d.sch b/PCB v2.3d/Multipro-txV2-3d.sch
new file mode 100644
index 0000000..df2fb8d
--- /dev/null
+++ b/PCB v2.3d/Multipro-txV2-3d.sch
@@ -0,0 +1,1452 @@
+EESchema Schematic File Version 2
+LIBS:power
+LIBS:device
+LIBS:transistors
+LIBS:conn
+LIBS:linear
+LIBS:regul
+LIBS:74xx
+LIBS:cmos4000
+LIBS:adc-dac
+LIBS:memory
+LIBS:xilinx
+LIBS:special
+LIBS:microcontrollers
+LIBS:dsp
+LIBS:microchip
+LIBS:analog_switches
+LIBS:motorola
+LIBS:texas
+LIBS:intel
+LIBS:audio
+LIBS:interface
+LIBS:digital-audio
+LIBS:philips
+LIBS:display
+LIBS:cypress
+LIBS:siliconi
+LIBS:opto
+LIBS:atmel
+LIBS:contrib
+LIBS:valves
+LIBS:Multipro-txV2-3d-cache
+EELAYER 27 0
+EELAYER END
+$Descr A4 11693 8268
+encoding utf-8
+Sheet 1 1
+Title ""
+Date "5 feb 2016"
+Rev ""
+Comp ""
+Comment1 ""
+Comment2 ""
+Comment3 ""
+Comment4 ""
+$EndDescr
+$Comp
+L ATMEGA328-A IC1
+U 1 1 53BC5C99
+P 3300 4100
+F 0 "IC1" H 2550 5350 40 0000 L BNN
+F 1 "ATMEGA328-A" H 3700 2700 40 0000 L BNN
+F 2 "TQFP32" H 3300 4100 30 0000 C CIN
+F 3 "" H 3300 4100 60 0000 C CNN
+ 1 3300 4100
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2050 3300 2400 3300
+Wire Wire Line
+ 2050 2700 2050 3000
+Wire Wire Line
+ 2050 3000 2050 3100
+Wire Wire Line
+ 2050 3100 2050 3300
+Wire Wire Line
+ 2400 3100 2050 3100
+Connection ~ 2050 3100
+Wire Wire Line
+ 2400 3000 2050 3000
+Connection ~ 2050 3000
+$Comp
+L C C2
+U 1 1 53BC5DA8
+P 1700 3900
+F 0 "C2" H 1700 4000 40 0000 L CNN
+F 1 "0.1uF" H 1706 3815 40 0000 L CNN
+F 2 "~" H 1738 3750 30 0000 C CNN
+F 3 "~" H 1700 3900 60 0000 C CNN
+ 1 1700 3900
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2400 3600 1700 3600
+Wire Wire Line
+ 1700 3600 1700 3700
+$Comp
+L GND #PWR01
+U 1 1 53BC5DDF
+P 1700 4250
+F 0 "#PWR01" H 1700 4250 30 0001 C CNN
+F 1 "GND" H 1700 4180 30 0001 C CNN
+F 2 "" H 1700 4250 60 0000 C CNN
+F 3 "" H 1700 4250 60 0000 C CNN
+ 1 1700 4250
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 1700 4100 1700 4250
+$Comp
+L GND #PWR02
+U 1 1 53BC5E19
+P 2150 5600
+F 0 "#PWR02" H 2150 5600 30 0001 C CNN
+F 1 "GND" H 2150 5530 30 0001 C CNN
+F 2 "" H 2150 5600 60 0000 C CNN
+F 3 "" H 2150 5600 60 0000 C CNN
+ 1 2150 5600
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2400 5100 2150 5100
+Wire Wire Line
+ 2150 5100 2150 5200
+Wire Wire Line
+ 2150 5200 2150 5300
+Wire Wire Line
+ 2150 5300 2150 5600
+Wire Wire Line
+ 2400 5200 2150 5200
+Connection ~ 2150 5200
+Wire Wire Line
+ 2400 5300 2150 5300
+Connection ~ 2150 5300
+Wire Wire Line
+ 4300 4450 4900 4450
+Wire Wire Line
+ 4900 4450 5050 4450
+$Comp
+L R R1
+U 1 1 53BC5FEA
+P 4900 4100
+F 0 "R1" V 4980 4100 40 0000 C CNN
+F 1 "10K" V 4907 4101 40 0000 C CNN
+F 2 "~" V 4830 4100 30 0000 C CNN
+F 3 "~" H 4900 4100 30 0000 C CNN
+ 1 4900 4100
+ 1 0 0 -1
+$EndComp
+Connection ~ 4900 4450
+Wire Wire Line
+ 4900 3850 4900 3750
+$Comp
+L GND #PWR03
+U 1 1 53BC607C
+P 5850 4650
+F 0 "#PWR03" H 5850 4650 30 0001 C CNN
+F 1 "GND" H 5850 4580 30 0001 C CNN
+F 2 "" H 5850 4650 60 0000 C CNN
+F 3 "" H 5850 4650 60 0000 C CNN
+ 1 5850 4650
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 5650 4450 5850 4450
+Wire Wire Line
+ 5850 4450 5850 4650
+Wire Wire Line
+ 4900 4350 4900 4450
+Wire Wire Line
+ 5700 3850 5700 3500
+$Comp
+L R R4
+U 1 1 53BC6125
+P 5250 3500
+F 0 "R4" V 5330 3500 40 0000 C CNN
+F 1 "1K" V 5257 3501 40 0000 C CNN
+F 2 "~" V 5180 3500 30 0000 C CNN
+F 3 "~" H 5250 3500 30 0000 C CNN
+ 1 5250 3500
+ 0 -1 -1 0
+$EndComp
+Wire Wire Line
+ 6300 3850 6300 3950
+$Comp
+L GND #PWR04
+U 1 1 53BC6155
+P 6300 3950
+F 0 "#PWR04" H 6300 3950 30 0001 C CNN
+F 1 "GND" H 6300 3880 30 0001 C CNN
+F 2 "" H 6300 3950 60 0000 C CNN
+F 3 "" H 6300 3950 60 0000 C CNN
+ 1 6300 3950
+ 1 0 0 -1
+$EndComp
+$Comp
+L LED D1
+U 1 1 53BC617C
+P 6000 3850
+F 0 "D1" H 6000 3950 50 0000 C CNN
+F 1 "LED" H 6000 3750 50 0000 C CNN
+F 2 "~" H 6000 3850 60 0000 C CNN
+F 3 "~" H 6000 3850 60 0000 C CNN
+ 1 6000 3850
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 5700 3850 5800 3850
+Wire Wire Line
+ 6200 3850 6300 3850
+$Comp
+L CRYSTAL X1
+U 1 1 53BC62D3
+P 2500 6450
+F 0 "X1" V 2450 6750 60 0000 C CNN
+F 1 "16MHz" V 2550 6750 60 0000 C CNN
+F 2 "~" H 2500 6450 60 0000 C CNN
+F 3 "~" H 2500 6450 60 0000 C CNN
+ 1 2500 6450
+ -1 0 0 -1
+$EndComp
+$Comp
+L C C4
+U 1 1 53BC62F4
+P 3000 6250
+F 0 "C4" V 3050 6350 40 0000 L CNN
+F 1 "18pF" V 3150 6200 40 0000 L CNN
+F 2 "~" H 3038 6100 30 0000 C CNN
+F 3 "~" H 3000 6250 60 0000 C CNN
+ 1 3000 6250
+ -1 0 0 1
+$EndComp
+$Comp
+L C C5
+U 1 1 53BC631E
+P 3000 6650
+F 0 "C5" V 3050 6750 40 0000 L CNN
+F 1 "18pF" V 3150 6600 40 0000 L CNN
+F 2 "~" H 3038 6500 30 0000 C CNN
+F 3 "~" H 3000 6650 60 0000 C CNN
+ 1 3000 6650
+ -1 0 0 1
+$EndComp
+Wire Wire Line
+ 2000 6050 2200 6050
+Wire Wire Line
+ 2200 6050 3000 6050
+Wire Wire Line
+ 2000 6850 2800 6850
+Wire Wire Line
+ 2800 6850 3000 6850
+$Comp
+L GND #PWR05
+U 1 1 53BC636B
+P 3350 6800
+F 0 "#PWR05" H 3350 6800 30 0001 C CNN
+F 1 "GND" H 3350 6730 30 0001 C CNN
+F 2 "" H 3350 6800 60 0000 C CNN
+F 3 "" H 3350 6800 60 0000 C CNN
+ 1 3350 6800
+ 1 0 0 -1
+$EndComp
+Text Label 2000 6050 0 60 ~ 0
+xtl1
+Text Label 2050 6850 0 60 ~ 0
+xtl2
+Wire Wire Line
+ 4300 3600 4650 3600
+Wire Wire Line
+ 4300 3700 4650 3700
+Text Label 4450 3600 0 60 ~ 0
+xtl1
+Text Label 4450 3700 0 60 ~ 0
+xtl2
+Wire Wire Line
+ 4300 3850 4650 3850
+Text Label 4500 3850 0 60 ~ 0
+A0
+Wire Wire Line
+ 4300 3950 4650 3950
+Wire Wire Line
+ 4300 4050 4650 4050
+Wire Wire Line
+ 4300 4150 4650 4150
+Wire Wire Line
+ 4300 4250 4650 4250
+Wire Wire Line
+ 4300 4350 4800 4350
+Wire Wire Line
+ 2400 4350 2100 4350
+Wire Wire Line
+ 2400 4450 2100 4450
+Text Label 2150 4450 0 60 ~ 0
+A7
+Text Label 2150 4350 0 60 ~ 0
+A6
+Text Label 4500 3950 0 60 ~ 0
+A1
+Text Label 4500 4050 0 60 ~ 0
+A2
+Text Label 4500 4150 0 60 ~ 0
+A3
+Text Label 4500 4250 0 60 ~ 0
+A4
+Text Label 4350 4350 0 60 ~ 0
+CYRF_RST
+Wire Wire Line
+ 4300 4600 4650 4600
+Wire Wire Line
+ 4300 4700 4650 4700
+Wire Wire Line
+ 4300 4800 5100 4800
+Wire Wire Line
+ 4300 4900 5350 4900
+Wire Wire Line
+ 5350 4900 5450 4900
+Wire Wire Line
+ 4300 5000 5100 5000
+Wire Wire Line
+ 4300 5100 5100 5100
+Wire Wire Line
+ 4300 5200 5100 5200
+Wire Wire Line
+ 4300 5300 5100 5300
+Text Label 4450 4600 0 60 ~ 0
+RX
+Text Label 4450 4700 0 60 ~ 0
+TX
+Text Label 4450 4800 0 60 ~ 0
+A7105_CSN
+Text Label 4450 4900 0 60 ~ 0
+D3
+Text Label 4450 5000 0 60 ~ 0
+SCK
+Text Label 4450 5100 0 60 ~ 0
+MOSI
+Text Label 4450 5200 0 60 ~ 0
+MISO
+Text Label 4450 5300 0 60 ~ 0
+CC25_CSN
+Wire Wire Line
+ 4300 3000 4950 3000
+Wire Wire Line
+ 4300 3100 4950 3100
+Wire Wire Line
+ 4300 3200 4650 3200
+Wire Wire Line
+ 4300 3300 4650 3300
+Wire Wire Line
+ 4300 3400 4650 3400
+Text Label 4450 3000 0 60 ~ 0
+NRF_CSN
+Text Label 4450 3100 0 60 ~ 0
+CYRF_CSN
+Text Label 4450 3200 0 60 ~ 0
+D10
+Text Label 4450 3300 0 60 ~ 0
+D11
+Text Label 4450 3400 0 60 ~ 0
+D12
+Wire Wire Line
+ 4300 3500 5000 3500
+Wire Wire Line
+ 5500 3500 5700 3500
+Wire Wire Line
+ 5700 3500 5800 3500
+$Comp
+L +BATT #PWR06
+U 1 1 53C2AB0F
+P 900 950
+F 0 "#PWR06" H 900 900 20 0001 C CNN
+F 1 "+BATT" H 900 1050 30 0000 C CNN
+F 2 "" H 900 950 60 0000 C CNN
+F 3 "" H 900 950 60 0000 C CNN
+ 1 900 950
+ 1 0 0 -1
+$EndComp
+$Comp
+L 3V3 #PWR07
+U 1 1 53C2AB1E
+P 3800 1000
+F 0 "#PWR07" H 3800 1100 40 0001 C CNN
+F 1 "3V3" H 3800 1125 40 0000 C CNN
+F 2 "" H 3800 1000 60 0000 C CNN
+F 3 "" H 3800 1000 60 0000 C CNN
+ 1 3800 1000
+ 1 0 0 -1
+$EndComp
+$Comp
+L NCP1117ST50T3G U1
+U 1 1 53C2ACE9
+P 1550 1350
+F 0 "U1" H 1700 1154 40 0000 C CNN
+F 1 "NCP1117ST50T3G" H 1550 1550 40 0000 C CNN
+F 2 "~" H 1550 1350 60 0000 C CNN
+F 3 "~" H 1550 1350 60 0000 C CNN
+ 1 1550 1350
+ 1 0 0 -1
+$EndComp
+$Comp
+L NCP1117ST50T3G U2
+U 1 1 53C2AD08
+P 3150 1350
+F 0 "U2" H 3300 1154 40 0000 C CNN
+F 1 "NCP1117ST33T3G" H 3150 1550 40 0000 C CNN
+F 2 "~" H 3150 1350 60 0000 C CNN
+F 3 "~" H 3150 1350 60 0000 C CNN
+ 1 3150 1350
+ 1 0 0 -1
+$EndComp
+$Comp
+L CP1 C1
+U 1 1 53C2AE5B
+P 900 1500
+F 0 "C1" H 950 1600 50 0000 L CNN
+F 1 "22uF" H 950 1400 50 0000 L CNN
+F 2 "~" H 900 1500 60 0000 C CNN
+F 3 "~" H 900 1500 60 0000 C CNN
+ 1 900 1500
+ 1 0 0 -1
+$EndComp
+$Comp
+L CP1 C3
+U 1 1 53C2AE76
+P 2150 1500
+F 0 "C3" H 2200 1600 50 0000 L CNN
+F 1 "22uF" H 2200 1400 50 0000 L CNN
+F 2 "~" H 2150 1500 60 0000 C CNN
+F 3 "~" H 2150 1500 60 0000 C CNN
+ 1 2150 1500
+ 1 0 0 -1
+$EndComp
+$Comp
+L GND #PWR08
+U 1 1 53C2AEB5
+P 1550 1900
+F 0 "#PWR08" H 1550 1900 30 0001 C CNN
+F 1 "GND" H 1550 1830 30 0001 C CNN
+F 2 "" H 1550 1900 60 0000 C CNN
+F 3 "" H 1550 1900 60 0000 C CNN
+ 1 1550 1900
+ 1 0 0 -1
+$EndComp
+$Comp
+L GND #PWR09
+U 1 1 53C2AEC4
+P 900 1900
+F 0 "#PWR09" H 900 1900 30 0001 C CNN
+F 1 "GND" H 900 1830 30 0001 C CNN
+F 2 "" H 900 1900 60 0000 C CNN
+F 3 "" H 900 1900 60 0000 C CNN
+ 1 900 1900
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 900 1700 900 1900
+Wire Wire Line
+ 900 1300 1150 1300
+Wire Wire Line
+ 900 950 900 1300
+Wire Wire Line
+ 1950 1300 2150 1300
+Wire Wire Line
+ 2150 1300 2500 1300
+Wire Wire Line
+ 2500 1300 2750 1300
+Wire Wire Line
+ 1550 1600 1550 1700
+Wire Wire Line
+ 1550 1700 1550 1900
+Wire Wire Line
+ 2150 1700 1550 1700
+Connection ~ 1550 1700
+Connection ~ 2150 1300
+$Comp
+L +5V #PWR010
+U 1 1 53C2B0E8
+P 2500 1000
+F 0 "#PWR010" H 2500 1090 20 0001 C CNN
+F 1 "+5V" H 2500 1090 30 0000 C CNN
+F 2 "" H 2500 1000 60 0000 C CNN
+F 3 "" H 2500 1000 60 0000 C CNN
+ 1 2500 1000
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2500 1000 2500 1300
+Wire Wire Line
+ 2500 1300 2500 1400
+$Comp
+L CP1 C6
+U 1 1 53C2B150
+P 3800 1500
+F 0 "C6" H 3850 1600 50 0000 L CNN
+F 1 "22uF" H 3850 1400 50 0000 L CNN
+F 2 "~" H 3800 1500 60 0000 C CNN
+F 3 "~" H 3800 1500 60 0000 C CNN
+ 1 3800 1500
+ 1 0 0 -1
+$EndComp
+$Comp
+L GND #PWR011
+U 1 1 53C2B15F
+P 3150 1900
+F 0 "#PWR011" H 3150 1900 30 0001 C CNN
+F 1 "GND" H 3150 1830 30 0001 C CNN
+F 2 "" H 3150 1900 60 0000 C CNN
+F 3 "" H 3150 1900 60 0000 C CNN
+ 1 3150 1900
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 3150 1600 3150 1700
+Wire Wire Line
+ 3150 1700 3150 1900
+Wire Wire Line
+ 3800 1700 3150 1700
+Connection ~ 3150 1700
+Wire Wire Line
+ 3550 1300 3800 1300
+Wire Wire Line
+ 3800 1300 3800 1000
+Entry Wire Line
+ 8100 2950 8200 3050
+Wire Wire Line
+ 8100 2650 7400 2650
+Entry Wire Line
+ 8100 3250 8200 3350
+Entry Wire Line
+ 8100 3100 8200 3200
+Entry Wire Line
+ 8100 3400 8200 3500
+Entry Wire Line
+ 8100 3550 8200 3650
+Entry Wire Line
+ 8100 3700 8200 3800
+Entry Wire Line
+ 8100 2800 8200 2900
+Entry Wire Line
+ 8100 2650 8200 2750
+Wire Wire Line
+ 8100 2800 7400 2800
+Wire Wire Line
+ 8100 2950 7400 2950
+Wire Wire Line
+ 8100 3100 7400 3100
+Wire Wire Line
+ 8100 3250 7400 3250
+Wire Wire Line
+ 8100 3400 7400 3400
+Wire Wire Line
+ 8100 3550 7400 3550
+Wire Wire Line
+ 8100 3700 7400 3700
+Text Label 7450 3700 0 60 ~ 0
+CYRF_RST
+Text Label 7450 3550 0 60 ~ 0
+A7105_CSN
+Text Label 7450 3400 0 60 ~ 0
+SCK
+Text Label 7450 3250 0 60 ~ 0
+MOSI
+Text Label 7450 3100 0 60 ~ 0
+MISO
+Text Label 7450 2950 0 60 ~ 0
+CC25_CSN
+Text Label 7450 2800 0 60 ~ 0
+NRF_CSN
+Text Label 7450 2650 0 60 ~ 0
+CYRF_CSN
+Entry Wire Line
+ 8100 4800 8200 4900
+$Comp
+L R R5
+U 1 1 53C2B787
+P 7450 4800
+F 0 "R5" V 7530 4800 40 0000 C CNN
+F 1 "2K2" V 7457 4801 40 0000 C CNN
+F 2 "~" V 7380 4800 30 0000 C CNN
+F 3 "~" H 7450 4800 30 0000 C CNN
+ 1 7450 4800
+ 0 1 1 0
+$EndComp
+$Comp
+L 3V3 #PWR012
+U 1 1 53C2B7A5
+P 7200 4600
+F 0 "#PWR012" H 7200 4700 40 0001 C CNN
+F 1 "3V3" H 7200 4725 40 0000 C CNN
+F 2 "" H 7200 4600 60 0000 C CNN
+F 3 "" H 7200 4600 60 0000 C CNN
+ 1 7200 4600
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 7200 4600 7200 4800
+Wire Wire Line
+ 7700 4800 8100 4800
+Text Label 7750 4800 0 60 ~ 0
+NRF_CE
+$Comp
+L 3V3 #PWR013
+U 1 1 53C2B981
+P 2050 2700
+F 0 "#PWR013" H 2050 2800 40 0001 C CNN
+F 1 "3V3" H 2050 2825 40 0000 C CNN
+F 2 "" H 2050 2700 60 0000 C CNN
+F 3 "" H 2050 2700 60 0000 C CNN
+ 1 2050 2700
+ 1 0 0 -1
+$EndComp
+$Comp
+L R R2
+U 1 1 53C2B990
+P 5700 4900
+F 0 "R2" V 5780 4900 40 0000 C CNN
+F 1 "2K2" V 5707 4901 40 0000 C CNN
+F 2 "~" V 5630 4900 30 0000 C CNN
+F 3 "~" H 5700 4900 30 0000 C CNN
+ 1 5700 4900
+ 0 -1 -1 0
+$EndComp
+$Comp
+L R R3
+U 1 1 53C2B99F
+P 6450 5300
+F 0 "R3" V 6530 5300 40 0000 C CNN
+F 1 "1K" V 6457 5301 40 0000 C CNN
+F 2 "~" V 6380 5300 30 0000 C CNN
+F 3 "~" H 6450 5300 30 0000 C CNN
+ 1 6450 5300
+ 0 -1 -1 0
+$EndComp
+Wire Wire Line
+ 5950 4900 6500 4900
+$Comp
+L GND #PWR014
+U 1 1 53C2BAA6
+P 6700 5500
+F 0 "#PWR014" H 6700 5500 30 0001 C CNN
+F 1 "GND" H 6700 5430 30 0001 C CNN
+F 2 "" H 6700 5500 60 0000 C CNN
+F 3 "" H 6700 5500 60 0000 C CNN
+ 1 6700 5500
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6700 5300 6700 5500
+Text Label 6150 4900 0 60 ~ 0
+PPM_IN
+$Comp
+L CYRF6936 U3
+U 1 1 53C2BF57
+P 10350 1350
+F 0 "U3" H 10850 1900 60 0000 C CNN
+F 1 "CYRF6936" H 10350 2150 60 0000 C CNN
+F 2 "" H 10350 950 60 0000 C CNN
+F 3 "" H 10350 950 60 0000 C CNN
+ 1 10350 1350
+ 1 0 0 -1
+$EndComp
+$Comp
+L A7105 U4
+U 1 1 53C2C184
+P 10350 3050
+F 0 "U4" H 10850 3700 60 0000 C CNN
+F 1 "A7105" H 10350 3850 60 0000 C CNN
+F 2 "" H 10350 2650 60 0000 C CNN
+F 3 "" H 10350 2650 60 0000 C CNN
+ 1 10350 3050
+ 1 0 0 -1
+$EndComp
+$Comp
+L NRF24L01 U5
+U 1 1 53C2C24E
+P 10350 4750
+F 0 "U5" H 10850 5400 60 0000 C CNN
+F 1 "NRF24L01" H 10350 5550 60 0000 C CNN
+F 2 "" H 10350 4350 60 0000 C CNN
+F 3 "" H 10350 4350 60 0000 C CNN
+ 1 10350 4750
+ 1 0 0 -1
+$EndComp
+$Comp
+L CC2500 U6
+U 1 1 53C2C3F4
+P 10350 6200
+F 0 "U6" H 10850 6800 60 0000 C CNN
+F 1 "CC2500" H 10350 6900 60 0000 C CNN
+F 2 "" H 10350 5800 60 0000 C CNN
+F 3 "" H 10350 5800 60 0000 C CNN
+ 1 10350 6200
+ 1 0 0 -1
+$EndComp
+Wire Bus Line
+ 8200 2750 8200 2900
+Wire Bus Line
+ 8200 2900 8200 3050
+Wire Bus Line
+ 8200 3050 8200 3200
+Wire Bus Line
+ 8200 3200 8200 3350
+Wire Bus Line
+ 8200 3350 8200 3500
+Wire Bus Line
+ 8200 3500 8200 3650
+Wire Bus Line
+ 8200 3650 8200 3800
+Wire Bus Line
+ 8200 3800 8200 4900
+Wire Bus Line
+ 8200 4900 8200 7100
+Wire Bus Line
+ 8650 750 8650 900
+Wire Bus Line
+ 8650 900 8650 1050
+Wire Bus Line
+ 8650 1050 8650 1500
+Wire Bus Line
+ 8650 1500 8650 1650
+Wire Bus Line
+ 8650 1650 8650 1850
+Wire Bus Line
+ 8650 1850 8650 2550
+Wire Bus Line
+ 8650 2550 8650 2850
+Wire Bus Line
+ 8650 2850 8650 3000
+Wire Bus Line
+ 8650 3000 8650 4400
+Wire Bus Line
+ 8650 4400 8650 4550
+Wire Bus Line
+ 8650 4550 8650 4700
+Wire Bus Line
+ 8650 4700 8650 4850
+Wire Bus Line
+ 8650 4850 8650 5000
+Wire Bus Line
+ 8650 5000 8650 5700
+Wire Bus Line
+ 8650 5700 8650 5850
+Wire Bus Line
+ 8650 5850 8650 6000
+Wire Bus Line
+ 8650 6000 8650 6600
+Wire Bus Line
+ 8650 6600 8650 7100
+Wire Wire Line
+ 9700 1000 8750 1000
+Wire Wire Line
+ 9700 1150 8750 1150
+Wire Wire Line
+ 9700 1600 8750 1600
+Wire Wire Line
+ 9700 1750 8750 1750
+Wire Wire Line
+ 9700 1950 8750 1950
+Entry Wire Line
+ 8650 900 8750 1000
+Entry Wire Line
+ 8650 1050 8750 1150
+Entry Wire Line
+ 8650 1500 8750 1600
+Entry Wire Line
+ 8650 1650 8750 1750
+Entry Wire Line
+ 8650 1850 8750 1950
+Wire Wire Line
+ 9700 2500 9150 2500
+Wire Wire Line
+ 9700 2650 8750 2650
+Wire Wire Line
+ 9700 2950 8750 2950
+Wire Wire Line
+ 9700 3100 8750 3100
+Wire Wire Line
+ 9700 3250 9100 3250
+Wire Wire Line
+ 9100 3250 9100 3700
+Wire Wire Line
+ 9100 3700 9700 3700
+Wire Wire Line
+ 9700 3400 9250 3400
+Wire Wire Line
+ 9250 3400 9250 3550
+Wire Wire Line
+ 9250 3550 9700 3550
+Entry Wire Line
+ 8650 2550 8750 2650
+Entry Wire Line
+ 8650 2850 8750 2950
+Entry Wire Line
+ 8650 3000 8750 3100
+$Comp
+L 3V3 #PWR015
+U 1 1 53C2CB43
+P 9150 2350
+F 0 "#PWR015" H 9150 2450 40 0001 C CNN
+F 1 "3V3" H 9150 2475 40 0000 C CNN
+F 2 "" H 9150 2350 60 0000 C CNN
+F 3 "" H 9150 2350 60 0000 C CNN
+ 1 9150 2350
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9150 2500 9150 2350
+$Comp
+L GND #PWR016
+U 1 1 53C2CBE8
+P 9500 2850
+F 0 "#PWR016" H 9500 2850 30 0001 C CNN
+F 1 "GND" H 9500 2780 30 0001 C CNN
+F 2 "" H 9500 2850 60 0000 C CNN
+F 3 "" H 9500 2850 60 0000 C CNN
+ 1 9500 2850
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 2800 9500 2800
+Wire Wire Line
+ 9500 2800 9500 2850
+Text Label 8900 3100 0 60 ~ 0
+MOSI
+Text Label 8900 2950 0 60 ~ 0
+SCK
+Text Label 8900 2650 0 60 ~ 0
+A7105_CSN
+$Comp
+L GND #PWR017
+U 1 1 53C2CC8E
+P 9500 4250
+F 0 "#PWR017" H 9500 4250 30 0001 C CNN
+F 1 "GND" H 9500 4180 30 0001 C CNN
+F 2 "" H 9500 4250 60 0000 C CNN
+F 3 "" H 9500 4250 60 0000 C CNN
+ 1 9500 4250
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 4200 9500 4200
+Wire Wire Line
+ 9500 4200 9500 4250
+$Comp
+L 3V3 #PWR018
+U 1 1 53C2CD36
+P 9250 4100
+F 0 "#PWR018" H 9250 4200 40 0001 C CNN
+F 1 "3V3" H 9250 4225 40 0000 C CNN
+F 2 "" H 9250 4100 60 0000 C CNN
+F 3 "" H 9250 4100 60 0000 C CNN
+ 1 9250 4100
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 4350 9250 4350
+Wire Wire Line
+ 9250 4350 9250 4100
+Wire Wire Line
+ 9700 4500 8750 4500
+Wire Wire Line
+ 9700 4650 8750 4650
+Wire Wire Line
+ 9700 4800 8750 4800
+Wire Wire Line
+ 9700 4950 8750 4950
+Wire Wire Line
+ 9700 5100 8750 5100
+Entry Wire Line
+ 8650 4400 8750 4500
+Entry Wire Line
+ 8650 4550 8750 4650
+Entry Wire Line
+ 8650 4700 8750 4800
+Entry Wire Line
+ 8650 4850 8750 4950
+Entry Wire Line
+ 8650 5000 8750 5100
+Text Label 8900 4500 0 60 ~ 0
+NRF_CE
+Text Label 8900 4650 0 60 ~ 0
+NRF_CSN
+Text Label 8900 4800 0 60 ~ 0
+SCK
+Text Label 8900 4950 0 60 ~ 0
+MOSI
+Text Label 8900 5100 0 60 ~ 0
+MISO
+Wire Wire Line
+ 9700 5650 9250 5650
+Wire Wire Line
+ 9250 5650 9250 5350
+Wire Wire Line
+ 9700 6250 8900 6250
+Wire Wire Line
+ 8900 6250 8900 7000
+Wire Wire Line
+ 8900 7000 9700 7000
+Wire Wire Line
+ 9700 6550 9050 6550
+Wire Wire Line
+ 9050 6550 9050 6850
+Wire Wire Line
+ 9050 6850 9700 6850
+$Comp
+L GND #PWR019
+U 1 1 53C2D1E0
+P 9350 6450
+F 0 "#PWR019" H 9350 6450 30 0001 C CNN
+F 1 "GND" H 9350 6380 30 0001 C CNN
+F 2 "" H 9350 6450 60 0000 C CNN
+F 3 "" H 9350 6450 60 0000 C CNN
+ 1 9350 6450
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 6400 9350 6400
+Wire Wire Line
+ 9350 6400 9350 6450
+Wire Wire Line
+ 9700 5800 8750 5800
+Wire Wire Line
+ 9700 5950 8750 5950
+Wire Wire Line
+ 9700 6100 8750 6100
+Wire Wire Line
+ 9700 6700 8750 6700
+Entry Wire Line
+ 8650 5700 8750 5800
+Entry Wire Line
+ 8650 5850 8750 5950
+Entry Wire Line
+ 8650 6000 8750 6100
+Entry Wire Line
+ 8650 6600 8750 6700
+Text Label 8900 5800 0 60 ~ 0
+MOSI
+Text Label 8900 5950 0 60 ~ 0
+SCK
+Text Label 8900 6100 0 60 ~ 0
+MISO
+Text Label 9100 6700 0 60 ~ 0
+CC25_CSN
+Text Label 9100 6850 0 60 ~ 0
+CC25_PAEN
+Text Label 9100 7000 0 60 ~ 0
+CC25_LANEN
+$Comp
+L 3V3 #PWR020
+U 1 1 53C2D624
+P 4900 3750
+F 0 "#PWR020" H 4900 3850 40 0001 C CNN
+F 1 "3V3" H 4900 3875 40 0000 C CNN
+F 2 "" H 4900 3750 60 0000 C CNN
+F 3 "" H 4900 3750 60 0000 C CNN
+ 1 4900 3750
+ 1 0 0 -1
+$EndComp
+Connection ~ 2500 1300
+$Comp
+L R R6
+U 1 1 53C2D8C4
+P 2500 1650
+F 0 "R6" V 2580 1650 40 0000 C CNN
+F 1 "1K" V 2507 1651 40 0000 C CNN
+F 2 "~" V 2430 1650 30 0000 C CNN
+F 3 "~" H 2500 1650 30 0000 C CNN
+ 1 2500 1650
+ 1 0 0 -1
+$EndComp
+$Comp
+L LED D2
+U 1 1 53C2D9F8
+P 2500 2250
+F 0 "D2" H 2500 2350 50 0000 C CNN
+F 1 "LED" H 2500 2150 50 0000 C CNN
+F 2 "~" H 2500 2250 60 0000 C CNN
+F 3 "~" H 2500 2250 60 0000 C CNN
+ 1 2500 2250
+ 0 1 1 0
+$EndComp
+Wire Wire Line
+ 2500 1900 2500 2050
+$Comp
+L GND #PWR021
+U 1 1 53C2DAEB
+P 2500 2550
+F 0 "#PWR021" H 2500 2550 30 0001 C CNN
+F 1 "GND" H 2500 2480 30 0001 C CNN
+F 2 "" H 2500 2550 60 0000 C CNN
+F 3 "" H 2500 2550 60 0000 C CNN
+ 1 2500 2550
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2500 2450 2500 2550
+$Comp
+L CONN_3X2 P1
+U 1 1 53C2DBCC
+P 6150 2900
+F 0 "P1" H 6150 3150 50 0000 C CNN
+F 1 "ISP" V 6150 2950 40 0000 C CNN
+F 2 "" H 6150 2900 60 0000 C CNN
+F 3 "" H 6150 2900 60 0000 C CNN
+ 1 6150 2900
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 5750 2750 5350 2750
+Wire Wire Line
+ 5750 2850 5350 2850
+Wire Wire Line
+ 5750 2950 5350 2950
+Wire Wire Line
+ 6550 2750 6950 2750
+Wire Wire Line
+ 6550 2850 6950 2850
+Wire Wire Line
+ 6550 2950 6800 2950
+Text Label 5500 2750 0 60 ~ 0
+D12
+Text Label 5500 2850 0 60 ~ 0
+PB5
+Text Label 4450 3500 0 60 ~ 0
+PB5
+Text Label 4450 4450 0 60 ~ 0
+RESET
+Text Label 5450 2950 0 60 ~ 0
+RESET
+Text Label 6600 2850 0 60 ~ 0
+D11
+$Comp
+L GND #PWR022
+U 1 1 53C2DF8B
+P 6800 3150
+F 0 "#PWR022" H 6800 3150 30 0001 C CNN
+F 1 "GND" H 6800 3080 30 0001 C CNN
+F 2 "" H 6800 3150 60 0000 C CNN
+F 3 "" H 6800 3150 60 0000 C CNN
+ 1 6800 3150
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6800 2950 6800 3150
+Wire Wire Line
+ 6950 2750 6950 2450
+$Comp
+L GND #PWR023
+U 1 1 53C41453
+P 9400 1500
+F 0 "#PWR023" H 9400 1500 30 0001 C CNN
+F 1 "GND" H 9400 1430 30 0001 C CNN
+F 2 "" H 9400 1500 60 0000 C CNN
+F 3 "" H 9400 1500 60 0000 C CNN
+ 1 9400 1500
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 1450 9400 1450
+Wire Wire Line
+ 9400 1300 9400 1450
+Wire Wire Line
+ 9400 1450 9400 1500
+Wire Wire Line
+ 9700 1300 9400 1300
+Connection ~ 9400 1450
+$Comp
+L +5V #PWR024
+U 1 1 53C41598
+P 9200 650
+F 0 "#PWR024" H 9200 740 20 0001 C CNN
+F 1 "+5V" H 9200 740 30 0000 C CNN
+F 2 "" H 9200 650 60 0000 C CNN
+F 3 "" H 9200 650 60 0000 C CNN
+ 1 9200 650
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 9700 850 9200 850
+Wire Wire Line
+ 9200 850 9200 650
+Text Label 6800 3150 1 60 ~ 0
+GND
+Text Label 9400 1300 0 60 ~ 0
+GND
+Text Label 9500 2800 0 60 ~ 0
+GND
+Text Label 9500 4200 0 60 ~ 0
+GND
+Text Label 9400 6400 0 60 ~ 0
+GND
+$Comp
+L 3V3 #PWR025
+U 1 1 53CC3C56
+P 9250 5350
+F 0 "#PWR025" H 9250 5450 40 0001 C CNN
+F 1 "3V3" H 9250 5475 40 0000 C CNN
+F 2 "" H 9250 5350 60 0000 C CNN
+F 3 "" H 9250 5350 60 0000 C CNN
+ 1 9250 5350
+ 1 0 0 -1
+$EndComp
+Text Label 8900 1600 0 60 ~ 0
+MOSI
+Text Label 8900 1950 0 60 ~ 0
+MISO
+Text Label 8950 1150 0 60 ~ 0
+SCK
+Text Label 8950 1000 0 60 ~ 0
+CYRF_CSN
+Text Label 8900 1750 0 60 ~ 0
+CYRF_RST
+$Comp
+L 3V3 #PWR026
+U 1 1 53CC42D8
+P 6950 2450
+F 0 "#PWR026" H 6950 2550 40 0001 C CNN
+F 1 "3V3" H 6950 2575 40 0000 C CNN
+F 2 "" H 6950 2450 60 0000 C CNN
+F 3 "" H 6950 2450 60 0000 C CNN
+ 1 6950 2450
+ 1 0 0 -1
+$EndComp
+$Comp
+L CONN_5 P2
+U 1 1 53FE5423
+P 4100 6750
+F 0 "P2" V 4050 6750 50 0000 C CNN
+F 1 "CONN_5" V 4150 6750 50 0000 C CNN
+F 2 "" H 4100 6750 60 0000 C CNN
+F 3 "" H 4100 6750 60 0000 C CNN
+ 1 4100 6750
+ -1 0 0 -1
+$EndComp
+Text Label 5200 6550 2 60 ~ 0
+PPM_IN
+Wire Wire Line
+ 4500 6850 4850 6850
+Wire Wire Line
+ 4850 6850 4850 7200
+$Comp
+L GND #PWR027
+U 1 1 53FE54D3
+P 4850 7200
+F 0 "#PWR027" H 4850 7200 30 0001 C CNN
+F 1 "GND" H 4850 7130 30 0001 C CNN
+F 2 "" H 4850 7200 60 0000 C CNN
+F 3 "" H 4850 7200 60 0000 C CNN
+ 1 4850 7200
+ -1 0 0 -1
+$EndComp
+Wire Wire Line
+ 4500 6750 4650 6750
+Wire Wire Line
+ 4650 6750 4650 6100
+$Comp
+L +BATT #PWR028
+U 1 1 53FE5585
+P 4650 6100
+F 0 "#PWR028" H 4650 6050 20 0001 C CNN
+F 1 "+BATT" H 4650 6200 30 0000 C CNN
+F 2 "" H 4650 6100 60 0000 C CNN
+F 3 "" H 4650 6100 60 0000 C CNN
+ 1 4650 6100
+ -1 0 0 -1
+$EndComp
+Wire Wire Line
+ 4500 6550 4800 6550
+Wire Wire Line
+ 4800 6550 5200 6550
+Wire Wire Line
+ 4500 6650 5050 6650
+Wire Wire Line
+ 4500 6950 5050 6950
+$Comp
+L JUMPER JP2
+U 1 1 53FE5887
+P 5350 6300
+F 0 "JP2" H 5350 6450 60 0000 C CNN
+F 1 "JUMPER" H 5350 6220 40 0000 C CNN
+F 2 "~" H 5350 6300 60 0000 C CNN
+F 3 "~" H 5350 6300 60 0000 C CNN
+ 1 5350 6300
+ 1 0 0 -1
+$EndComp
+$Comp
+L JUMPER JP4
+U 1 1 53FE5896
+P 5350 6650
+F 0 "JP4" H 5350 6800 60 0000 C CNN
+F 1 "JUMPER" H 5350 6570 40 0000 C CNN
+F 2 "~" H 5350 6650 60 0000 C CNN
+F 3 "~" H 5350 6650 60 0000 C CNN
+ 1 5350 6650
+ 1 0 0 -1
+$EndComp
+Text Label 6200 6300 0 60 ~ 0
+RX
+Text Label 6450 6950 0 60 ~ 0
+TX
+$Comp
+L HEX_DIP SW1
+U 1 1 54394777
+P 5500 1600
+F 0 "SW1" H 5500 1250 60 0000 C CNN
+F 1 "HEX_DIP" H 5500 1950 60 0000 C CNN
+F 2 "" H 5500 1600 60 0000 C CNN
+F 3 "" H 5500 1600 60 0000 C CNN
+ 1 5500 1600
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6000 1750 6350 1750
+Wire Wire Line
+ 6000 1600 6600 1600
+Wire Wire Line
+ 6000 1450 6350 1450
+Text Label 6100 1750 0 60 ~ 0
+D10
+Text Label 6100 1450 0 60 ~ 0
+D12
+Wire Wire Line
+ 5000 1450 4700 1450
+Wire Wire Line
+ 5000 1750 4700 1750
+Text Label 4750 1450 0 60 ~ 0
+D11
+Text Label 4800 1750 0 60 ~ 0
+A0
+Wire Wire Line
+ 5000 1600 4450 1600
+Wire Wire Line
+ 4450 1600 4450 1950
+Wire Wire Line
+ 6600 1600 6600 2000
+$Comp
+L GND #PWR029
+U 1 1 54394CCF
+P 4450 1950
+F 0 "#PWR029" H 4450 1950 30 0001 C CNN
+F 1 "GND" H 4450 1880 30 0001 C CNN
+F 2 "" H 4450 1950 60 0000 C CNN
+F 3 "" H 4450 1950 60 0000 C CNN
+ 1 4450 1950
+ 1 0 0 -1
+$EndComp
+$Comp
+L GND #PWR030
+U 1 1 54394CDE
+P 6600 2000
+F 0 "#PWR030" H 6600 2000 30 0001 C CNN
+F 1 "GND" H 6600 1930 30 0001 C CNN
+F 2 "" H 6600 2000 60 0000 C CNN
+F 3 "" H 6600 2000 60 0000 C CNN
+ 1 6600 2000
+ 1 0 0 -1
+$EndComp
+Connection ~ 5700 3500
+$Comp
+L GND #PWR031
+U 1 1 548220D4
+P 6400 3650
+F 0 "#PWR031" H 6400 3650 30 0001 C CNN
+F 1 "GND" H 6400 3580 30 0001 C CNN
+F 2 "" H 6400 3650 60 0000 C CNN
+F 3 "" H 6400 3650 60 0000 C CNN
+ 1 6400 3650
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 6400 3400 6400 3500
+Wire Wire Line
+ 6400 3500 6400 3650
+$Comp
+L C C7
+U 1 1 54845FE2
+P 1700 5050
+F 0 "C7" H 1700 5150 40 0000 L CNN
+F 1 "0.1uF" H 1706 4965 40 0000 L CNN
+F 2 "~" H 1738 4900 30 0000 C CNN
+F 3 "~" H 1700 5050 60 0000 C CNN
+ 1 1700 5050
+ 1 0 0 -1
+$EndComp
+$Comp
+L GND #PWR032
+U 1 1 54845FF1
+P 1700 5500
+F 0 "#PWR032" H 1700 5500 30 0001 C CNN
+F 1 "GND" H 1700 5430 30 0001 C CNN
+F 2 "" H 1700 5500 60 0000 C CNN
+F 3 "" H 1700 5500 60 0000 C CNN
+ 1 1700 5500
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 1700 4850 1700 4600
+Wire Wire Line
+ 1700 5250 1700 5500
+$Comp
+L 3V3 #PWR033
+U 1 1 548461AD
+P 1700 4600
+F 0 "#PWR033" H 1700 4700 40 0001 C CNN
+F 1 "3V3" H 1700 4725 40 0000 C CNN
+F 2 "" H 1700 4600 60 0000 C CNN
+F 3 "" H 1700 4600 60 0000 C CNN
+ 1 1700 4600
+ 1 0 0 -1
+$EndComp
+$Comp
+L R R7
+U 1 1 54DCE006
+P 5900 6300
+F 0 "R7" V 5980 6300 40 0000 C CNN
+F 1 "2K2" V 5907 6301 40 0000 C CNN
+F 2 "~" V 5830 6300 30 0000 C CNN
+F 3 "~" H 5900 6300 30 0000 C CNN
+ 1 5900 6300
+ 0 -1 -1 0
+$EndComp
+Wire Wire Line
+ 2200 6400 2200 6050
+Connection ~ 2200 6050
+Wire Wire Line
+ 2800 6500 2800 6850
+Connection ~ 2800 6850
+$Comp
+L GND #PWR034
+U 1 1 56B4E3D6
+P 1800 6600
+F 0 "#PWR034" H 1800 6600 30 0001 C CNN
+F 1 "GND" H 1800 6530 30 0001 C CNN
+F 2 "" H 1800 6600 60 0000 C CNN
+F 3 "" H 1800 6600 60 0000 C CNN
+ 1 1800 6600
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 2200 6500 1800 6500
+Wire Wire Line
+ 1800 6500 1800 6600
+$Comp
+L CONN_2 P3
+U 1 1 56B4E4CA
+P 6550 6600
+F 0 "P3" V 6500 6600 40 0000 C CNN
+F 1 "CONN_2" V 6600 6600 40 0000 C CNN
+F 2 "~" H 6550 6600 60 0000 C CNN
+F 3 "~" H 6550 6600 60 0000 C CNN
+ 1 6550 6600
+ 1 0 0 -1
+$EndComp
+$Comp
+L JUMPER JP3
+U 1 1 56B4E4E1
+P 5350 6950
+F 0 "JP3" H 5350 7100 60 0000 C CNN
+F 1 "JUMPER" H 5350 6870 40 0000 C CNN
+F 2 "~" H 5350 6950 60 0000 C CNN
+F 3 "~" H 5350 6950 60 0000 C CNN
+ 1 5350 6950
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 5050 6300 4800 6300
+Wire Wire Line
+ 4800 6300 4800 6550
+Connection ~ 4800 6550
+Wire Wire Line
+ 6150 6300 6600 6300
+$Comp
+L R R8
+U 1 1 56B4E6D8
+P 6150 6950
+F 0 "R8" V 6230 6950 40 0000 C CNN
+F 1 "470" V 6157 6951 40 0000 C CNN
+F 2 "~" V 6080 6950 30 0000 C CNN
+F 3 "~" H 6150 6950 30 0000 C CNN
+ 1 6150 6950
+ 0 -1 -1 0
+$EndComp
+Wire Wire Line
+ 5650 6950 5800 6950
+Wire Wire Line
+ 5800 6950 5900 6950
+Wire Wire Line
+ 6400 6950 6600 6950
+Wire Wire Line
+ 6200 6700 5800 6700
+Wire Wire Line
+ 5800 6700 5800 6950
+Connection ~ 5800 6950
+Wire Wire Line
+ 5650 6650 5650 6500
+Wire Wire Line
+ 5650 6500 6200 6500
+Wire Wire Line
+ 2800 6400 2900 6400
+Wire Wire Line
+ 2900 6400 2900 6450
+Wire Wire Line
+ 2900 6450 3000 6450
+Wire Wire Line
+ 3000 6450 3350 6450
+Wire Wire Line
+ 3350 6450 3350 6800
+Connection ~ 3000 6450
+$Comp
+L SW_PUSH_4_PIN SW2
+U 1 1 56B4EC6E
+P 6100 3400
+F 0 "SW2" H 6250 3510 50 0000 C CNN
+F 1 "BIND" H 6100 3200 50 0000 C CNN
+F 2 "~" H 6100 3400 60 0000 C CNN
+F 3 "~" H 6100 3400 60 0000 C CNN
+ 1 6100 3400
+ 1 0 0 -1
+$EndComp
+$Comp
+L SW_PUSH_4_PIN SW3
+U 1 1 56B4EC7B
+P 5350 4450
+F 0 "SW3" H 5500 4560 50 0000 C CNN
+F 1 "RESET" H 5350 4250 50 0000 C CNN
+F 2 "~" H 5350 4450 60 0000 C CNN
+F 3 "~" H 5350 4450 60 0000 C CNN
+ 1 5350 4450
+ 1 0 0 -1
+$EndComp
+Connection ~ 6400 3500
+Wire Wire Line
+ 5800 3500 5800 3400
+Wire Wire Line
+ 5650 4450 5650 4550
+Wire Wire Line
+ 5050 4450 5050 4550
+$Comp
+L JUMPER JP1
+U 1 1 56B4EFD5
+P 5800 5300
+F 0 "JP1" H 5800 5450 60 0000 C CNN
+F 1 "JUMPER" H 5800 5220 40 0000 C CNN
+F 2 "~" H 5800 5300 60 0000 C CNN
+F 3 "~" H 5800 5300 60 0000 C CNN
+ 1 5800 5300
+ 1 0 0 -1
+$EndComp
+Wire Wire Line
+ 5350 4900 5350 5300
+Wire Wire Line
+ 5350 5300 5500 5300
+Connection ~ 5350 4900
+Wire Bus Line
+ 8650 7100 8200 7100
+Text Label 4650 6200 0 60 ~ 0
+BATT
+Text Label 900 1050 0 60 ~ 0
+BATT
+Wire Wire Line
+ 6100 5300 6200 5300
+$EndSCHEMATC
diff --git a/PCB v2.3d/PCB_v2.3d.jpg b/PCB v2.3d/PCB_v2.3d.jpg
new file mode 100644
index 0000000..e1133b4
Binary files /dev/null and b/PCB v2.3d/PCB_v2.3d.jpg differ
diff --git a/PCB v2.3d/Readme.txt b/PCB v2.3d/Readme.txt
new file mode 100644
index 0000000..ee5a7e0
--- /dev/null
+++ b/PCB v2.3d/Readme.txt
@@ -0,0 +1,35 @@
+These are KiCad files and you are free to do what you will with them. KiCad is a good, free, and fairly
+easy to learn. Build your own BOM and gerber files.
+
+This is a variant of the Multipro V2.3c circuit design. It is basicly the same as the 2.3c board as far
+as component placement goes. What's changed is the added resistors for the serial protocol and also
+the addition of solder jumpers on the bottom of the board for the various options to connect the TX, RX, and PPM
+lines through them. See below for more detail.
+
+The schematic has been updated to reflect the added components and jumper pads as well as cleaned
+up a little. As it sits now, the .net file loads without any complaints and DRC checks pass.
+
+The jumpers, and how they are used:
+
+
+There are four solder type jumpers on the bottom side of the board near the lower left corner when the
+bottom of the board is facing towards you. The silkscreen shows which jumper is which. These four jumpers
+enable the board to be configured in several ways as explaned below.
+
+ (J-1) Use (PPM V/V) if the incoming PPM signal is at a higher voltage level, leave open if ~~5V.
+
+ (J-2) Use (Jumper 2) to connect the incomming PPM signal to the RX pin on the processor
+
+ (J-3) Short (TELEM) only if you have done a telemetry mod to your radio, leave open if not needed. When
+ connected, pin 2 of the two pin header (P3) is also connected.
+
+ (J-4) Use (MOD) only to connect the transmitter pin 2 to pin 1 of the two pin header (P3).
+
+The direction this project is going, it is most likely J-2 will be the only one needing to be shorted for
+the serial method of sending model protocols.
+
+
+These files are submitted without any guarentee of accureacy or suitability for any intended use. I am strictly
+an amature with time on his hands. Although I have done all I know to make it correct, things outside of my
+knowledge base are beyond my control. Do not use untested equipment around persons not familiar with the hazards
+of remote controlled vehicals.
\ No newline at end of file
diff --git a/PCB v2.3d/Schematic_v2.3d.jpg b/PCB v2.3d/Schematic_v2.3d.jpg
new file mode 100644
index 0000000..5a8ed64
Binary files /dev/null and b/PCB v2.3d/Schematic_v2.3d.jpg differ
diff --git a/Protocols_Details.md b/Protocols_Details.md
new file mode 100644
index 0000000..108327c
--- /dev/null
+++ b/Protocols_Details.md
@@ -0,0 +1,432 @@
+#Protocols details
+**You'll find below a detailed description of every supported protocols sorted by RF modules.**
+
+Legend:
+- Extended limits supported: -125%..+125% can be used and will be transmitted. Otherwise the default is -100%..+100% only.
+- Autobind protocol: you do not need to press the bind button at power up to bind, this is done automatically.
+
+The AETR mentionned here for all protocols depends on the TX settings compilation option set in _Config.h.
+
+***
+#A7105 RF Module
+
+##FLYSKY
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+Note that the RX ouput will be AETR.
+
+###Sub_protocol V9X9
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|LIGHT|PICTURE|VIDEO
+
+###Sub_protocol V6X6
+CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---
+FLIP|LIGHT|PICTURE|VIDEO|HEADLESS|RTH|XCAL|YCAL
+
+###Sub_protocol V912
+CH5|CH6
+---|---
+BTMBTN|TOPBTN
+
+##HUBSAN
+Models: Hubsan H102D, H107/L/C/D and Hubsan H107P/C+/D+
+
+Autobind protocol
+
+Telemetry enabled for battery voltage and TX RSSI
+
+Option=vTX frequency (H107D) 5645 - 5900 MHz
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+***
+#CC2500 RF Module
+
+##FRSKYV = FrSky 1 way
+Models: FrSky receivers V8R4, V8R7 and V8FR.
+
+Extended limits supported
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4
+---|---|---|---
+CH1|CH2|CH3|CH4
+
+##FRSKYD
+Models: FrSky receivers D4R and D8R. DIY RX-F801 and RX-F802 receivers.
+
+Extended limits supported
+
+Telemetry enabled for A0, A1, RSSI, TSSI and Hub
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+
+##FRSKYX
+Models: FrSky receivers X4R, X6R and X8R.
+
+Extended limits supported
+
+Telemetry enabled for A1 (RxBatt), A2, RSSI, TSSI and Hub
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+###Sub_protocol CH_16
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16
+---|---|---|---|---|---|---|---|---|----|----|----|----|----|----|----
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16
+
+###Sub_protocol CH_8
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+
+##SFHSS
+Models: Futaba RXs and XK models.
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+***
+#CYRF6936 RF Module
+
+##DEVO
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+Note that the RX ouput will be EATR.
+
+Bind procedure using serial:
+- With the TX off, put the binding plug in and power on the RX (RX LED slow blink), then power it down and remove the binding plug. Receiver should now be in autobind mode.
+- Turn on the TX, set protocol = Devo with option=0, turn off the TX (TX is now in autobind mode).
+- Turn on RX (RX LED fast blink).
+- Turn on TX (RX LED solid, TX LED fast blink).
+- Wait for bind on the TX to complete (TX LED solid).
+- Make sure to set the RX_Num value for model match.
+- Change option to 1 to use the global ID.
+- Do not touch option/RX_Num anymore.
+
+Bind procedure using PPM:
+- With the TX off, put the binding plug in and power on the RX (RX LED slow blink), then power it down and remove the binding plug. Receiver should now be in autobind mode.
+- Turn on RX (RX LED fast blink).
+- Turn the dial to the model number running protocol DEVO on the module.
+- Press the bind button and turn on the TX. TX is now in autobind mode.
+- Release bind button after 1 second: RX LED solid, TX LED fast blink.
+- Wait for bind on the TX to complete (TX LED solid).
+- Press the bind button for 1 second. TX/RX is now in fixed ID mode.
+- To verify that the TX is in fixed mode: power cycle the TX, the module LED should be solid ON (no blink).
+- Note: Autobind/fixed ID mode is linked to the dial number. Which means that you can have multiple dial numbers set to the same protocol DEVO with different RX_Num and have different bind modes at the same time. It enables PPM users to get model match under DEVO.
+
+##DSM
+Extended limits supported
+
+Telemetry enabled for TSSI and plugins
+
+option=number of channels from 4 to 12. An invalid option value will end up with 6 channels.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---|---|----|----|----
+A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+
+Notes:
+ - model/type/number of channels indicated on the RX can be different from what the RX is in fact wanting to see. So don't hesitate to test different combinations until you have something working. Using Auto is the best way to find these settings.
+ - RX ouput will always be TAER independently of the input AETR, RETA...
+
+###Sub_protocol DSM2_22
+DSM2, Resolution 1024, refresh rate 22ms
+###Sub_protocol DSM2_11
+DSM2, Resolution 2048, refresh rate 11ms
+###Sub_protocol DSMX_22
+DSMX, Resolution 2048, refresh rate 22ms
+###Sub_protocol DSMX_11
+DSMX, Resolution 2048, refresh rate 11ms
+###Sub_protocol AUTO
+The "AUTO" feature enables the TX to automatically choose what are the best settings for your DSM RX and update your model protocol settings accordingly.
+
+The current radio firmware which are able to use the "AUTO" feature are ersky9x (9XR Pro, 9Xtreme, Taranis, ...) and er9x for M128 (9XR) and M2561.
+For these firmwares, you must have a telemetry enabled TX and you have to make sure you set the Telemetry "Usr proto" to "DSMx".
+Also on er9x you will need to be sure to match the polarity of the telemetry serial (normal or inverted by bitbashing), while on ersky9x you can set "Invert COM1" accordinlgy.
+
+##J6Pro
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---|---|----|----|----
+A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+
+***
+#NRF24L01 RF Module
+
+##ASSAN
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+
+The transmitter must be close to the receiver while binding.
+
+##BAYANG
+Models: EAchine H8(C) mini, BayangToys X6/X7/X9, JJRC JJ850, Floureon H101 ...
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---|---|---|---|----
+A|E|T|R|FLIP|RTH|PICTURE|VIDEO|HEADLESS|INVERTED
+
+##CG023
+Models: EAchine CG023/CG031/3D X4
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol YD829
+Models: Attop YD-822/YD-829/YD-829C ...
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP||PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol H8_3D
+Models: EAchine H8 mini 3D, JJRC H20/H22
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP|LIGTH|OPT1|OPT2|CAL
+
+JJRC H20: OPT1=Headless, OPT2=RTH
+
+JJRC H22: OPT1=RTH, OPT2=180/360° flip mode
+
+H8 3D: OPT1=RTH then press a direction to enter headless mode (like stock TX), OPT2=switch 180/360° flip mode
+
+CAL: calibrate accelerometers
+
+##CX10
+Extended limits supported
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|FLIP|RATE
+
+Rate: -100%=rate 1, 0%=rate 2, +100%=rate 3
+
+###Sub_protocol GREEN
+Models: Cheerson CX-10 green pcb
+
+Same channels assignement as above.
+
+###Sub_protocol BLUE
+Models: Cheerson CX-10 blue pcb & some newer red pcb, CX-10A, CX-10C, CX11, CX12, Floureon FX10, JJRC DHD D1
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|RATE|PICTURE|VIDEO
+
+Rate: -100%=rate 1, 0%=rate 2, +100%=rate 3 or headless for CX-10A
+
+###Sub_protocol DM007
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP|MODE|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol Q282 and Q242
+
+CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---
+FLIP|LED|PICTURE|VIDEO|HEADLESS|RTH|XCAL|YCAL
+
+Model: JXD 509 is using Q282 with CH12=Start/Stop motors
+
+###Sub_protocol JC3015_1
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|MODE|PICTURE|VIDEO
+
+###Sub_protocol JC3015_2
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|MODE|LED|DFLIP
+
+###Sub_protocol MK33041
+
+CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---
+FLIP|MODE|PICTURE|VIDEO|HEADLESS|RTH
+
+##ESKY
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|GYRO|PITCH
+
+##FY326
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|RTH|HEADLESS|EXPERT|CALIBRATE
+
+##FQ777
+Model: FQ777-124
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|RTH|HEADLESS|EXPERT
+
+##HISKY
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|GEAR|PITCH|GYRO|CH8
+
+GYRO: -100%=6G, +100%=3G
+
+###HK310
+Models: RX HK-3000, HK3100 and XY3000 (TX are HK-300, HK-310 and TL-3C)
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+|||T|R|AUX|T_FSAFE|R_FSAFE|AUX_FSAFE
+
+##KN
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
+---|---|---|---|---|---|---|---|---|----|----
+A|E|T|R|DR|THOLD|IDLEUP|GYRO|Ttrim|Atrim|Etrim
+
+Dual Rate: +100%=full range, Throttle Hold: +100%=hold, Idle Up: +100%=3D, GYRO: -100%=6G, +100%=3G
+
+###Sub_protocol WLTOYS
+###Sub_protocol FEILUN
+Same channels assignement as above.
+
+##HONTAI
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
+---|---|---|---|---|---|---|---|---|----|----
+A|E|T|R|FLIP|LED|PICTURE|VIDEO|HEADLESS|RTH|CAL
+
+###Sub_protocol HONTAI
+###Sub_protocol JJRCX1
+CH6|
+---|
+ARM|
+
+###Sub_protocol X5C1 clone
+
+##MJXQ
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
+---|---|---|---|---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LED|PICTURE|VIDEO|HEADLESS|RTH|AUTOFLIP|PAN|TILT
+
+###Sub_protocol WLH08
+###Sub_protocol X600
+Only 3 TX IDs available, change RX_Num value 0..2 to cycle through them
+###Sub_protocol X800
+Only 3 TX IDs available, change RX_Num value 0..2 to cycle through them
+###Sub_protocol H26D
+###Sub_protocol E010
+
+##MT99XX
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LED|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol MT
+Models: MT99xx
+###Sub_protocol H7
+Models: Eachine H7, Cheerson CX023
+###Sub_protocol YZ
+Model: Yi Zhan i6S
+Only one model can be flown at the same time since the ID is hardcoded.
+###Sub_protocol LS
+Models: LS114, 124, 215
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|INVERT|PICTURE|VIDEO|HEADLESS
+
+##Shenqi
+Autobind protocol
+
+Model: Shenqiwei 1/20 Mini Motorcycle
+
+CH1|CH2|CH3|CH4
+---|---|---|---
+ | |T|R
+
+Throttle +100%=full forward,0%=stop,-100%=full backward.
+
+##SLT
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|GEAR|PITCH
+
+##Symax
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP||PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol SYMAX
+Models: Syma X5C-1/X11/X11C/X12
+
+###Sub_protocol SYMAX5C
+Model: Syma X5C (original) and X2
+
+##V2X2
+Models: WLToys V202/252/272, JXD 385/388, JJRC H6C, Yizhan Tarantula X6 ...
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
+---|---|---|---|---|---|---|---|---|----|----
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS|MAG_CAL_X|MAG_CAL_Y
+
+PICTURE: also automatic Missile Launcher and Hoist in one direction
+
+VIDEO: also Sprayer, Bubbler, Missile Launcher(1), and Hoist in the other dir
+
+##YD717
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol YD717
+###Sub_protocol SKYWLKR
+###Sub_protocol SYMAX4
+###Sub_protocol XINXUN
+###Sub_protocol NIHUI
+Same channels assignement as above.
diff --git a/README.md b/README.md
index d223102..d9c1ed6 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,21 @@
+<<<<<<< HEAD
# DIY-Multiprotocol-TX-Module
+=======
+# Overview of the MPTM
- 
+The **Multiprotocol Tx Module** (or **MPTM**) is a 2.4GHz transmitter module which enables almost any TX to control lot of different models available on the market.
+The source code is partly based on the [Deviation TX project](http://www.deviationtx.com), thanks to all the developers for their great job on protocols.
+>>>>>>> refs/remotes/pascallanger/master
+
+## Quicklinks
+* [Download latest releases of the firmware](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases)
+* [Forum on rcroups](http://www.rcgroups.com/forums/showthread.php?t=2165676)
+* [Available Protocols list](docs/Protocol_Details.md)
+* [The old documentation](docs/README-old.md)
+* [Documentation to-do list](docs/Documentation_To_Do_List.md)
+
+<<<<<<< HEAD
Fork du projet https://github.com/pascallanger/DIY-Multiprotocol-TX-Module
Afin d'ajouter :
@@ -186,4 +200,114 @@ A|E|T|R|FLIP 360|FLIP|VIDEO|LED|MODE 2
Same channels assignement as above.
-###D'autres à venir
\ No newline at end of file
+###D'autres à venir
+=======
+## Outline of the documentation
+1. Introduction (this page)
+1. [Available protocols](docs/Protocol_Details.md)
+1. [Compatible Transmitters](docs/Transmitters.md)
+1. [Module Hardware options](docs/Hardware.md)
+1. [Compiling and programming the module (ATmega328)](docs/Compiling.md) and [Compiling STM32](Compiling_STM32.md).
+1. Transmitter Setup
+ - [Taranis](docs/Tx-Taranis.md)
+ - [FlySky TH9X, Turnigy 9X/R](docs/Tx-FlyskyTH9X.md)
+1. [How to for popular models](docs/Models.md)
+1. [Troubleshooting](docs/Troubleshooting.md)
+2. [Advanced Topics (not for the fainthearted!)](docs/Advanced_Topics.md)
+
+## Introduction
+A functioning MPTM consists of (see image below):
+
+
+1. A host RC Tx
+
+1. A Multiprotocol Transmitter Module that connects to a host transmitter. This module is typically comprised of
+
+ * A microcontroller (currently ATMega328P) that interfaces with the Tx, controls the module functions and forwards the RC commands to the RF hardware
+
+ * One or more (but at least one) RF modules that provide the capability to communicate with RC receivers. To communicate with the receiver the RF module in the Tx must match with the RF module type in the receiver. The four most common 2.4GHz RF chips on the market are supported TI CC2500, Nordic NRF24L01, Cypress CYRF6936, and the Amiccom A7105
+
+ * MPTM firmware loaded on to the microprocessor. At a high level, this firmware performs a few different functions:
+ * It interfaces with signals from the host Tx and decodes these for transmission to the model, it manages the activation of the correct hardware RF module for each protocol
+ * It implements the unique communication protocols for each receiver/model and manages the all-important binding process with a receiver/model
+ * In the case of some protocols (for example DSMX and FrSky) it receives and decodes the telemetry information and makes this available to the receiver.
+1. The physical 2.4GHz antenna (or in some cases multiple antennas) for the modules
+
+
+
+In constructing a functioning module there are important choices to be made and tradeoffs to be aware of. The most important are:
+
+##**Choice 1:** Which MPTM hardware option
+
+There are currently four generic paths to get your hands on an MPTM. These are outlined in detail on the [hardware](docs/Hardware.md) page. Here they are, in order of increasing difficulty:
+ - **Ready-made MPTM** - Available from Banggood which includes a 4-in-1 RF module and an antenna switcher
+ - **DIY MPTM** - Purchase one of the PCB options from [OSHPark](http://www.oshpark.com) and then solder on your own components and RF modules
+ - **OrangeRx MPTM** You can improve the Orange Rx Transmitter module available from Hobbyking by uploading this firmware
+ - **Scratchbuild a MPTM** - Build the module from scratch using perfboard base, an Arduino Pro Mini and discrete components.
+
+The last option is where it all started and how the pioneers in this project made their boards. However, due to the growing interest in “one module to rule them all” you now have options to purchase a ready-made board (with old firmware that you will need to upgrade).
+
+For more information on these options see the [hardware](docs/Hardware.md) page
+
+##**Choice 2:** Which RF modules to include in the MPTM
+
+This depends on your specific needs. However, recent the availability of the 4-in-1 RF modules from Banggood for less than $35 makes it easy to “have it all”. Most manufacturers of RC systems (Spektrum, FrSky, FlySky) and toys (Syma, Hubsan, Horizon Hobby, etc.) use one of these four RF chips to manage the RF link between the transmitter and the reciever/model. Here is an incomplete list of the RF modules and some of the most popular toys that use them. For the complete list see the [Protocol Details](docs/Protocol_Details.md) page.
+
+Manufacturer|RF Chip|Example Protocols
+:-----------|-------|:-------
+Cyprus Semiconductor| CYRF6936|DSM/DSMX
+||Walkera Devo
+||J6Pro
+Texas Instruments|CC2500|FrSky
+||Futaba SFHSS
+Amiccom|A7105|FlySky
+||Turnigy (most)
+||Hubsan
+Nordic Semiconductor|NRF24L01|HiSky
+||Syma
+||ASSAN
+||and most other Chinese models
+
+For example, if you have no interest in binding your Tx to an model with and FrSky or Futaba SFHSS receiver you do not need to include the CC2500 RF module in your system.
+
+##**Choice 3:** Which protocols to upload to the MPTM
+
+Of course there always a catch. In this case it is the 32K memory limit on the ATmega328 processor. Due to the amazing work done by devs on this project, the memory required by all the possible protocols exceeds this limit considerably. This means that you will need to make a choice of which protocols you will compile into your firmware. Fortunately, the process of selecting and compiling is not too difficult and it is fully documented on the [Compiling and Programming](docs/Compiling.md) page.
+Also, the lead dev Pascal Langer (rcgroups:hpnuts) makes this process even easier for many users by making compiled binaries available for three popular combinations of RF modules. These are always “fresh” (based on the latest stable firmware) and available on the [Releases](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases) page.
+
+Midelic has ported a version the firmware to an STM32 ARM microcontroller. If you go the route of building this version of the DIY MPTM then the memory limits do not apply.
+
+##**Choice 4:** Choosing the type of interface between the MPTM and your Tx (PPM or Serial)
+
+The all the MPTM options supports industry standard PPM interface that works with all transmitters with either:
+ - a module bay or
+ - a trainer port or
+ - any PPM signal that can be accessed inside the Tx.
+
+Most of the older FM radios support the PPM interface.
+
+If you are the owner of a transmitter that supports the er9X/erSky9X or OpenTX firmwares (Frsky Taranis running erSky9x or OpenTx, or any of the FlySky/Turnigy family of Txs running ER9X, ERSky9x or OpenTx) you have the additional option to use a serial protocol to communicate between your Tx and the MPTM. (Owners of Walkera Devo transmitters should look at the [Deviation Tx](http://www.deviationtx.com) project for how to achieve the same end goal). This serial protocol does not require any hardware modifications, but will require updating the firmware on your radio. For those willing to do this, there are some nice advantages:
+ - The model and protocol selection and binding is done from the Model Settings menu on the Tx
+ - For telemetry capable receivers, the telemetry integration is done seamlessly with the Tx firmware. (Note that FrSky TH9X/Turnigy 9X/R transmitters require a telemetry mod to be done before telemetry can work)
+See the [Setting up your Tx](docs/TransmitterSetup.md) page for more details.
+
+#How to get started?
+1. Browse the [Protocols](docs/Protocol_Details.md) page to see which protocols you would like on your module
+1. Go to the [Hardware Options](docs/Hardware.md) page to decide which of the MPTM options appeals to you and which RF modules you plan to integrate
+1. Once you have your module, you should go to [Compiling and Programming](docs/Compiling.md) page to download, compile and program your MPTM
+1. Finally, you should visit the [Setting up your Tx](docs/TransmitterSetup.md) page to configure the last few settings before you can fly to your heart’s content!!!!!
+
+# Troubleshooting
+Visit the [Troubleshooting](docs/Troubleshooting.md) page. Please bear in mind that the MPTM is a complex system of hardware and software and it make take some patience to get it up and running. Also remember that the developers of the system are actual users of the system. This means that at any moment in time the system is working perfectly for them. A corollary to this is that if you are struggling there are likely two scenarios. First, that the problem is with your hardware or with your configuration, second, and much more unlikely but not impossible scenario, is that you are struggling with a new undiscovered bug. (The author of this documentation speaks from experience ;-) Please check the RC Groups forum and search for keywords relating to your problem before posting a reply. When you do post a reply please so humbly and respectfully – you will find many helpful people there. In your reply please include as much relevant information as possible and attach compilation output and _Config.h files as text attachments to keep the forum clean.
+# A final word
+A very big thanks to all the people who have shared their time so graciously to create this great project. If you come across them on RC Groups, please be kind and show appreciation. In no particular order:
+* Pascal Langer (rcgroups: hpnuts)
+* Midelic (rcgroups: midelic)
+* Mike Blandford (rcgroups: Mike Blandford)
+* PhracturedBlue – from Deviation-tx
+* goebish – from Deviation-tx
+* victzh – from Deviation-tx
+* hexfet – from Deviation-tx
+
+Your help would be greatly appreciated. If protocol reverse-engineering and dev is not your thing then any help with testing and contributing to the documentation would be amazing. Given the number of different Tx/module hardware/RF module/protocol/model combinations the process of testing and documenting is a major bottleneck for the developers. Anything you can do to help will free them up to do even greater things.
+>>>>>>> refs/remotes/pascallanger/master
diff --git a/docs/Advanced_ATmega_Serial_Uploader.md b/docs/Advanced_ATmega_Serial_Uploader.md
new file mode 100644
index 0000000..4d74670
--- /dev/null
+++ b/docs/Advanced_ATmega_Serial_Uploader.md
@@ -0,0 +1,71 @@
+#ATmega Serial Uploader
+
+Mike Blandford adapted the optiboot bootloader for the 4-in-1 module to allow flashing of the module using a standard Arduino USB to serial adapter or FTDI adapter. No need to open the module case. Once set up is very easy to use:
+
+1. plug the serial wires into the module connector,
+2. To activate the bootloader, set the rotary switch to 0
+3. hold the bind button down for 0.5s while connecting the USB end of the serial cable into the computer
+4. Press upload on the Arduino IDE or issue an AVRdude command from the terminal.
+
+It uses a baudrate of 57600, so is the same as a Pro Mini.
+
+The Serial / FTDI connections on the Tx module are as follows:
+- Top Pin: Programmer Tx
+- 2nd Pin:
+- 3rd Pin: Programmer V+
+- 4th Pin: Programmer Gnd
+- 5th Pin: Programmer Rx
+
+The bootloader starts up, waits half a second, then checks the rotary switch and the bind button. If they aren't as described above, then the normal application runs.
+
+While the bootloader is running, if it detects a communication problem, it configures the watchdog to reset in 16mS, then waits forever. 16mS later the board should reset, and then restart the bootloader, dropping back to the application half a second later.
+
+This bootloader is for reading and writing the flash only, the EEPROM is not supported, neither is reading/writing the fuses, but it only uses 512 bytes of flash.
+
+##Install the bootloader
+To get the bootloader onto the ATmega you need to connect an flashing tool (like USBasp) to the 6-pin ISP connector on the board.
+Simply flash the .hex file to get the bootloader on the chip, and change the high fuse at the same time.
+
+The bootloader only uses 512 bytes of flash and is avaialble for download [here](http://www.rcgroups.com/forums/showatt.php?attachmentid=9291360&d=1472324155). The orginal rcgroups post is [here](http://www.rcgroups.com/forums/showpost.php?p=35584619&postcount=4867).
+
+The HIGH fuse needs to be set to 0xD6. (See the section below on Setting the Fuses with AVRdude.)
+
+## Setting fuses with AVRdude
+###Determining the location of the avrdude program
+The Arduino IDE is used to upload firmware and set fuses on the ATMega microprocessor.
+
+You can install avrdude on your computer, but it is already contained in the Arduino IDE bundle and we suggest that you use the Arduino-bundled version.
+
+1. Unplug any programmer that may be connected to the computer
+1. In the Arduino IDE click on Sketch -> Upload Using Programmer
+1. After a series of compiling messages you will see an error that a programmer is not found. Scroll up and find the programming command that caused the errors (usually the last white line before the red errors) and copy it into TextEdit or Notepad.
+1. This is your programming command and it should look something like this:
+
+**Mac:**
+
+
+> ```
+> /Applications/Arduino.app/Contents/Java/hardware/tools /avr/bin/avrdude -C/Applications/Arduino.app/Contents/ Java/hardware/tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique to your system} /Multiprotocol.ino.hex:i
+> ```
+
+**PC:**
+
+
+> ```
+> C:\Program Files (x86)\Arduino\Contents\Java\hardware\tools\ avr\bin\avrdude -CC:\Program Files (x86)\Arduino\Contents\Java\ hardware\tools\avr\etc\avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique on your system}\ Multiprotocol.ino.hex:i
+> ```
+
+
+Select all the text up to the ```-Uflash ``` command, copy it and paste it into a new line and add a “-v” (without the "") at the end of the line.
+
+ This is your “verify” command and it should look something like this:
+
+> ```
+> /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/ tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -v
+> ```
+
+
+We will be using these two commands to program the module.
+
+1. Verify that the connection is working by pasting the Verify line into a terminal. You should see output that includes the fuse settings.
+2. 1. To program the High Fuse copy the “verify” command and paste it into the shell add the following text to the end of the line ```-U hfuse:w:0xD6:m ``` . Press Enter.
diff --git a/docs/Advanced_Bluetooth_Telemetry.md b/docs/Advanced_Bluetooth_Telemetry.md
new file mode 100644
index 0000000..00ee878
--- /dev/null
+++ b/docs/Advanced_Bluetooth_Telemetry.md
@@ -0,0 +1,30 @@
+#Bluetooth Telemetry in PPM Mode
+###Telemetry
+
+There are 4 protocols supporting telemetry: Hubsan, DSM, FrSkyD and FrSkyX.
+
+Hubsan displays the battery voltage and TX RSSI.
+
+DSM displays TX RSSI and full telemetry.
+
+FrSkyD displays full telemetry (A0, A1, RX RSSI, TX RSSI and Hub).
+
+FrSkyX displays full telemetry (A1, A2, RX RSSI, TX RSSI and Hub).
+
+### If used in PPM mode
+
+Telemetry is available as a serial output on the TX pin of the Atmega328p using the FrSky hub format for Hubsan, FrSkyD, FrSkyX and DSM format for DSM2/X. The serial paramets depends on the protocol:
+
+Protocol|Serial Parameters
+--------|-----------------
+Hubsan|9600bps 8n1
+FrSkyD|9600bps 8n1
+FrSkyX|57,600bps 8n1
+DSM2/X|125,000bps 8n1
+
+The serial stream is also available on pin 5 of the Module connector (pins numbered from top to bottom) on the [4-in-1 module](Module_BG_4-in-1.md) and the [V2.3d modules](Module_Build_yourself_PCB.md) provided the Tx jumper has been soldered. See the linked module documentation for what this means.
+
+
+You can connect it to your TX if it is telemetry enabled or use a bluetooth adapter (HC05/HC06) along with an app on your phone/tablet ([app example](https://play.google.com/store/apps/details?id=biz.onomato.frskydash&hl=fr)) to display telemetry information and setup alerts.
+
+
diff --git a/docs/Advanced_Manually_Setting_ATmega328_Fuses.md b/docs/Advanced_Manually_Setting_ATmega328_Fuses.md
new file mode 100644
index 0000000..76897cb
--- /dev/null
+++ b/docs/Advanced_Manually_Setting_ATmega328_Fuses.md
@@ -0,0 +1,57 @@
+#Manually Setting ATmega328 Fuses
+
+To understand fuses refer to the ATmega328P datasheet (See Section 28.3 Fuse Bits)
+## Fuse settings
+Here are some fuse settings for common configurations:
+
+Board|Low Fuse|High Fuse|Extended Fuse
+-----|--------|---------|-------------
+Arduino Pro Mini with Arduino bootloader|0xFF|0xD2|0xFD
+DIY 3.2d PCB without bootloader |0xFF|0xD3|0xFD
+DIY 3.2d PCB with [custom mikeb bootloader](Advanced_ATmega_Serial_Uploader.md) |0xFF|0xD6|0xFD
+Banggood 4-in-1 module without bootloader |0xFF|0xD3|0xFD
+Banggood 4-in-1 module with [custom mikeb bootloader](Advanced_ATmega_Serial_Uploader.md) |0xFF|0xD6|0xFD
+
+
+##Determining the location of the avrdude program
+The Arduino IDE is used to upload firmware and set fuses on the ATMega microprocessor.
+
+You can install avrdude on your computer, but it is already contained in the Arduino IDE bundle and we suggest that you use the Arduino-bundled version.
+
+1. Unplug any programmer that may be connected to the computer
+1. In the Arduino IDE click on Sketch -> Upload Using Programmer
+1. After a series of compiling messages you will see an error that a programmer is not found. Scroll up and find the programming command that caused the errors (usually the last white line before the red errors) and copy it into TextEdit or Notepad.
+1. This is your programming command. You can use it to manually upload the latest .hex file compiled by the Arduino IDE "Verify" button, and it should look something like this:
+
+**Mac:**
+
+
+> ```
+> /Applications/Arduino.app/Contents/Java/hardware/tools /avr/bin/avrdude -C/Applications/Arduino.app/Contents/ Java/hardware/tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique to your system} /Multiprotocol.ino.hex:i
+> ```
+
+**PC:**
+
+
+> ```
+> C:\Program Files (x86)\Arduino\Contents\Java\hardware\tools\ avr\bin\avrdude -CC:\Program Files (x86)\Arduino\Contents\Java\ hardware\tools\avr\etc\avrdude.conf -patmega328p -cusbasp -Pusb -Uflash:w:{this part will be unique on your system}\ Multiprotocol.ino.hex:i
+> ```
+
+
+Select all the text up to the ```-Uflash ``` command, copy it and paste it into a new line and add a “-v” (without the "") at the end of the line.
+
+ This is your “verify” command and it should look something like this:
+
+> ```
+> /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Applications/Arduino.app/Contents/Java/hardware/ tools/avr/etc/avrdude.conf -patmega328p -cusbasp -Pusb -v
+> ```
+
+
+We will be using the command line to program the module.
+
+1. It is good practice to check on the connection with the board before you program fuses. Paste the "verify" command from above into a command line terminal. It should retun with messages that indicate an ATmega328p was successfully found and it should return the current fuse settings.
+1. To program the Low Fuse copy the “verify” command and paste it into the shell add the following text to the end of the line ```-U lfuse:w:0xFF:m ``` . Press Enter. ** Note: If you want a different fuse setting, change the 0xFF with the hexadecimal value of the low fuse setting. **
+1. To program the Extended Fuse copy the “verify” command and paste it into the shell add the following text to the end of the line ```-U efuse:w:0xFD:m ``` . Press Enter. ** Note: If you want a different fuse setting, change the 0xFD with the hexadecimal value of the extended fuse setting. **
+1. There are two options for the High fuse.
+ - If you selected the 4-in-1 Board in the Arduino IDE then you compiled firmware to not include the unecessary Arduino bootloader. To program the High Fuse copy the “verify” command and paste it into the shell and add the following text to the end of the line ```-U hfuse:w:0xD3:m ``` . Press Enter. ** Note: If you want a different fuse setting, change the 0xD3 with the hexadecimal value of the extended fuse setting. **
+ - If you selected the Arduino Pro-Mini (or any other Arduino board) in the Arduino IDE then you compiled firmware to include the Arduino bootloader. To program the High Fuse copy the “verify” command and paste it into the shell and add the following text to the end of the line ```-U hfuse:w:0xD2:m ``` . Press Enter. ** Note: If you want a different fuse setting, replace the 0xD2 with the hexadecimal value of the extended fuse setting. **
diff --git a/docs/Advanced_Topics.md b/docs/Advanced_Topics.md
new file mode 100644
index 0000000..643007a
--- /dev/null
+++ b/docs/Advanced_Topics.md
@@ -0,0 +1,20 @@
+#Advanced Topics {This page is currently a proof of concept}
+Warning: the topics on this page are not for the fainthearted. It is strongly recommended that you have some experience in getting up and runnning with your module before you dive in there. On the other hand what is described on this page are some very useful options that could greatly increase the value and the enjoyment of your Multiprotocol module.
+#Serial uploader that works through the transmitter pins
+This document describes how you can set up your ATmega-based Mulitprotocol module to allow you to update the firmware by connecting a USB to TTL serial (like a FTDI) adapter to the module's transmitter interface pins. It is great if you exclusively use the Serial interface with your transmitter because the Bind button is used as "bootloader" button. It requires a small custom bootloader to be uploaded and a simple interface cable to be soldered up. See the [Advanced ATmega Serial Uploader](Advanced_ATmega_Serial_Uploader.md) page for more details.
+Created and supported by: Mike Blandford
+
+RCGroups page: http://www.rcgroups.com/forums/showpost.php?p=35584619&postcount=4867
+
+#Bluetooth telemetry board for telemetry in PPM mode
+This document describes a simple bluetooth module to stream telemetry information to a mobile device like an Android smartphone or tablet. This is very useful with modules used in the PPM mode with transmitters that do not support telemetry. See the [Advanced Bluetooth Telemetry](Advanced_Bluetooth_Telemetry.md) page for more details.
+Created and supported by: Midelic
+
+RCGroups page: None
+
+
+#Manually setting fuses on ATmega328
+This document describes a relatively simple process to set the fuses on ATmega328 using the flexibility of the command line. It does not require installation of AVRdude because it uses the AVRdude that is bundled with the Arduino IDE. See the [Advanced Manually Setting ATmega328 Fuses](Advanced_Manually_Setting_ATmega328_Fuses.md) page for more details.
+Created and supported by: hpnuts
+
+RCGroups page: No rcgroups page
diff --git a/docs/BOM_DIY_ATmega.md b/docs/BOM_DIY_ATmega.md
new file mode 100644
index 0000000..3968e7c
--- /dev/null
+++ b/docs/BOM_DIY_ATmega.md
@@ -0,0 +1,35 @@
+#Bill of Materials DIY ATmega Module
+
+Here is the bill of materials for the ATmega328 version of the DIY MPTM.
+
+If you are looking for the BOM for the DIY STM32 version click [here](BOM_DIY_STM32.md).
+
+Digikey may not be your preferred supplier, but you should find enough information on their page to cross reference parts.
+
+## BOM DIY ATmega PCB - V3.2d
+ This BOM is for the board that looks like this - check carefully:
+
+
+
+Qty|Part|Description|Value|Package|Digikey Part Number
+---|----|-----------|-----|-------|-------------------
+2|C4 C5|Ceramic Cap|18pF|0603|[445-1272-1-ND](http://www.digikey.com/product-detail/en/tdk-corporation/C1608C0G1H180J080AA/445-1272-1-ND/567674)
+2|C2 C7|Ceramic Cap|0.1uF|0603|[45-1316-1-ND](http://www.digikey.com/product-detail/en/tdk-corporation/C1608X7R1E104K080AA/445-1316-1-ND/567697)
+3|C1 C3 C6|Cap Tantal|22uF/16V|1206|[478-8254-1-ND](https://www.digikey.com/product-detail/en/avx-corporation/F931C226MAA/478-8254-1-ND/4005702)
+2|LED|Red/Green Led|LED3mm|||
+1|IC1|ATmega328P|||[ATMEGA328P-AURCT-ND](http://www.digikey.com/product-detail/en/atmel/ATMEGA328P-AUR/ATMEGA328P-AURCT-ND/3789455)
+1|JP1 JP2|Pin header|1x3||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|U4 U6|Pin header|1x10||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|P1|ISP|2x3||[3M9459-ND](http://www.digikey.com/product-search/en?keywords=3M%20961206-6404-AR)
+1|P2|Receptacle|5-pin||[WM14512-ND](http://www.digikey.com/product-search/en?keywords=Molex%2C%20LLC%200022142054)
+2|R4 R6|Resistor|1K|0603|[P1.0KGCT-ND](http://www.digikey.com/product-search/en?keywords=P1.0KGCT-ND)
+1|R2|Resistor|2.2K|0603|[P2.2KGCT-ND](http://www.digikey.com/product-search/en?keywords=P2.2KGCT-ND)
+2|R1 R3|Resistor|10k|0603|[P10KGCT-ND](http://www.digikey.com/product-search/en?keywords=P10KGCT-ND)
+1|R5|Resistor|20K|0603|[P20KGCT-ND](http://www.digikey.com/product-search/en?keywords=P20KGCT-ND)
+1|SW1|Hex Switch||4-DIP|[FR01KR16P-W-S-ND](https://www.digikey.com/product-detail/en/nkk-switches/FR01KR16P-W-S/FR01KR16P-W-S-ND/2104098)
+1|Sw2|Momentary Switch||6mm|[ 450-1643-ND](https://www.digikey.com/product-detail/en/te-connectivity-alcoswitch-switches/2-1825910-7/450-1642-ND/1632528)
+1|SW3|Momentary Switch||6mm|[CKN9104CT-ND](http://www.digikey.com/product-search/en?keywords=CKN9104CT-ND)
+1|U1|Voltage reg 5V|AMS1117-50|SOT223|[LM1117MP-5.0/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MP-5.0-NOPB/LM1117MP-5.0-NOPBCT-ND/363589)
+1|U2|Voltage reg 3.3V|AMS1117-33|SOT223|[LM1117MPX-3.3/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MPX-3.3-NOPB/LM1117MPX-3.3-NOPBCT-ND/1010516)
+1|X1|8 MHz Crystal|8MHz||[535-10267-1-ND](http://www.digikey.com/product-search/en?keywords=535-10267-1-ND)
+1||2.4GHz Antenna|||[553-1309-ND](http://www.digikey.com/product-search/en?keywords=553-1309-ND)
diff --git a/docs/BOM_DIY_STM32.md b/docs/BOM_DIY_STM32.md
new file mode 100644
index 0000000..e87ad62
--- /dev/null
+++ b/docs/BOM_DIY_STM32.md
@@ -0,0 +1,77 @@
+#Bill of Materials DIY STM32 Module
+
+Here is the bill of materials for the STM32 version of the DIY MPTM. There are two versions. Carefully compare your board with the picture below to determine which version you have.
+
+If you are looking for the BOM for the DIY ATmega328 3.2d version click [here](BOM_DIY_ATmega.md).
+
+Digikey may not be your preferred supplier, but you should find enough information on their page to cross reference parts.
+
+## BOM DIY STM32 PCB - the first Version
+ This BOM is for the board that looks like this - check carefully:
+
+
+
+Qty|Part|Description|Value|Package|Digikey Part Number
+---|----|-----------|-----|-------|-------------------
+1|3.3VJumper|Jumper|1x2||[3M9467-ND](https://www.digikey.com/product-detail/en/3m/961102-5604-AR/3M9467-ND/2071508)
+2|C1,C2|Cap Cera|0.1uF|0805|[311-1361-1-ND](https://www.digikey.com/product-detail/en/yageo/CC0805ZRY5V9BB104/311-1361-1-ND/2103145)
+3|C3,8,9|Cap Tantal|22uF/16V|1206|[478-8254-1-ND](https://www.digikey.com/product-detail/en/avx-corporation/F931C226MAA/478-8254-1-ND/4005702)
+1|D1|Diode Shottky|1N5819||[1N5819HW-FDICT-ND](https://www.digikey.com/product-detail/en/diodes-incorporated/1N5819HW-7-F/1N5819HW-FDICT-ND/815283)
+1|IC1|Voltage reg 3.3V|AMS1117-33|SOT223|[LM1117MPX-3.3/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MPX-3.3-NOPB/LM1117MPX-3.3-NOPBCT-ND/1010516)
+1|IC2|Voltage reg 5V|AMS1117-50|SOT223|[LM1117MP-5.0/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MP-5.0-NOPB/LM1117MP-5.0-NOPBCT-ND/363589)
+1|J301|Receptacle|5-pin||[WM3103-ND](http://www.digikey.com/product-search/en?keywords=WM3103-ND)
+1|JP1|Pin header|1x3||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|JP2|Pin header|1x4||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|L1|High Freq Inductor|10uH|1812|[CM453232-100KLCT-ND](https://www.digikey.com/product-detail/en/bourns-inc/CM453232-100KL/CM453232-100KLCT-ND/3437938)
+1|LED|Red Led|LED3mm|||
+2|R1,R8|SMD Resistor|2.2K|0805|[RMCF0805JT2K20CT-ND ](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT2K20/RMCF0805JT2K20CT-ND/1942563)
+3|R2,R5,R10|SMD Resistor|10K|0805|[RMCF0805JT10K0CT-ND](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT10K0/RMCF0805JT10K0CT-ND/1942577)
+1|R3|SMD Resistor|4.7K|0805|[311-4.70KCRCT-ND](https://www.digikey.com/product-detail/en/yageo/RC0805FR-074K7L/311-4.70KCRCT-ND/730876)
+1|R5|SMD Resistor|1K|0805|[311-1.0KARCT-ND](https://www.digikey.com/product-detail/en/yageo/RC0805JR-071KL/311-1.0KARCT-ND/731165)
+1|R7|SMD Resistor|470|0805|[RMCF0805JT470RCT-ND](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT470R/RMCF0805JT470RCT-ND/1942551)
+1|Switch|Hex Switch||4-DIP|[FR01KR16P-W-S-ND](https://www.digikey.com/product-detail/en/nkk-switches/FR01KR16P-W-S/FR01KR16P-W-S-ND/2104098)
+1|Switch|Momentary Switch||6mm|[ 450-1643-ND](https://www.digikey.com/product-detail/en/te-connectivity-alcoswitch-switches/2-1825910-7/450-1642-ND/1632528)
+1|MCU|STM32F103CBT6||LQFP48|[STM32F103CBT6](https://www.digikey.com/product-detail/en/stmicroelectronics/STM32F103CBT6/497-6288-ND/1754420)
+1|U$1|4-in-1 RF Module|||[Banggood 4-in-1 Module](http://www.banggood.com/DIY-2_4G-CC2500-NRF24L01-A7105-CYRF6936-Multi-RF-4-IN-1-Wireless-Module-p-1046308.html)
+1|Y2|8mHz Resonator|8mHz||[490-1195-1-ND](https://www.digikey.com/product-detail/en/murata-electronics-north-america/CSTCE8M00G55-R0/490-1195-1-ND/584632)
+1|U1|Dual INPUT-XOR|SN74LVC2G00DCTR|SSOP-8|[296-13257-1-ND](https://www.digikey.com/product-detail/en/texas-instruments/SN74LVC2G00DCTR/296-13257-1-ND/484537)
+1|U.FL|SMD ant. conn.|||[WM5587CT-ND](https://www.digikey.com/product-detail/en/molex-llc/0734120110/WM5587CT-ND/1894612)
+
+
+## BOM DIY STM32 PCB - the V0.8
+ This BOM is for the board that looks like this - check carefully:
+
+
+
+Qty|Part|Description|Value|Package|Digikey Part Number
+---|----|-----------|-----|-------|-------------------
+1|J301|Receptacle|5-pin||[WM3103-ND](http://www.digikey.com/product-search/en?keywords=WM3103-ND)
+1|SV201|Jumper|1x3||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|SV202|Pin header|1x4||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|SV203|Pin header|1x4||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+1|SV204|Pin header|1x3||[S1011EC-40-ND](https://www.digikey.com/product-detail/en/sullins-connector-solutions/PRPC040SAAN-RC/S1011EC-40-ND/2775214)
+3|C101, 102, 103|Cap Tantal|22uF/16V|1206|[478-8254-1-ND](https://www.digikey.com/product-detail/en/avx-corporation/F931C226MAA/478-8254-1-ND/4005702)
+7|C201, 202, 204, 205, 206, 209, 301|Cap Cera|0.1uF|0805|[311-1361-1-ND](https://www.digikey.com/product-detail/en/yageo/CC0805ZRY5V9BB104/311-1361-1-ND/2103145)
+1|C203|Cap Cera|4u7|0805|[311-1371-1-ND](https://www.digikey.com/product-detail/en/yageo/CC0805ZRY5V6BB475/311-1371-1-ND/2103155)
+1|C207|Cap Cera|1uF|0805|[311-1365-1-ND](https://www.digikey.com/product-detail/en/yageo/CC0805KKX7R7BB105/311-1365-1-ND/2103149)
+1|C208|Cap Cera|10nF|0805|[311-1085-1-ND](http://www.digikey.com/product-detail/en/yageo/CC0603KRX7R9BB103/311-1085-1-ND/302995)
+1|D301, D302, D303|Diode Shottky|BAT48||[497-5711-1-ND](https://www.digikey.com/product-detail/en/stmicroelectronics/BAT48JFILM/497-5711-1-ND/1299964)
+1|IC101|Voltage reg 5V|AMS1117-50|SOT223|[LM1117MP-5.0/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MP-5.0-NOPB/LM1117MP-5.0-NOPBCT-ND/363589)
+1|IC102|Voltage reg 3.3V|AMS1117-33|SOT223|[LM1117MPX-3.3/NOPBCT-ND](https://www.digikey.com/product-detail/en/texas-instruments/LM1117MPX-3.3-NOPB/LM1117MPX-3.3-NOPBCT-ND/1010516)
+1|L101|High Freq Inductor|10uH|1812|[CM453232-100KLCT-ND](https://www.digikey.com/product-detail/en/bourns-inc/CM453232-100KL/CM453232-100KLCT-ND/3437938)
+1|LED101, LED102|Red/Green Led|LED3mm|||
+2|R302, R303|SMD Resistor|2.2K|0805|[RMCF0805JT2K20CT-ND ](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT2K20/RMCF0805JT2K20CT-ND/1942563)
+3|R202, R203|SMD Resistor|10K|0805|[RMCF0805JT10K0CT-ND](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT10K0/RMCF0805JT10K0CT-ND/1942577)
+1|R301, R305|SMD Resistor|4.7K|0805|[311-4.70KCRCT-ND](https://www.digikey.com/product-detail/en/yageo/RC0805FR-074K7L/311-4.70KCRCT-ND/730876)
+1|R101, 201|SMD Resistor|1K|0805|[311-1.0KARCT-ND](https://www.digikey.com/product-detail/en/yageo/RC0805JR-071KL/311-1.0KARCT-ND/731165)
+1|R304|SMD Resistor|470|0805|[RMCF0805JT470RCT-ND](https://www.digikey.com/product-detail/en/stackpole-electronics-inc/RMCF0805JT470R/RMCF0805JT470RCT-ND/1942551)
+1|S201|Hex Switch||4-DIP|[FR01KR16P-W-S-ND](https://www.digikey.com/product-detail/en/nkk-switches/FR01KR16P-W-S/FR01KR16P-W-S-ND/2104098)
+1|S202|Momentary Switch||6mm|[ 450-1643-ND](https://www.digikey.com/product-detail/en/te-connectivity-alcoswitch-switches/2-1825910-7/450-1642-ND/1632528)
+1|IC201|STM32F103CBT6||LQFP48|[STM32F103CBT6](https://www.digikey.com/product-detail/en/stmicroelectronics/STM32F103CBT6/497-6288-ND/1754420)
+1|M401|4-in-1 RF Module|||[Banggood 4-in-1 Module](http://www.banggood.com/DIY-2_4G-CC2500-NRF24L01-A7105-CYRF6936-Multi-RF-4-IN-1-Wireless-Module-p-1046308.html)
+1|Y201|8mHz Resonator|8mHz||[490-1195-1-ND](https://www.digikey.com/product-detail/en/murata-electronics-north-america/CSTCE8M00G55-R0/490-1195-1-ND/584632)
+1|U301|Dual INPUT-XOR|SN74LVC2G00DCTR|SSOP-8|[296-13257-1-ND](https://www.digikey.com/product-detail/en/texas-instruments/SN74LVC2G00DCTR/296-13257-1-ND/484537)
+1|CON401|SMD ant. conn.|||[WM5587CT-ND](https://www.digikey.com/product-detail/en/molex-llc/0734120110/WM5587CT-ND/1894612)
+
+
+
diff --git a/docs/Bind_Timing.md b/docs/Bind_Timing.md
new file mode 100644
index 0000000..64cb257
--- /dev/null
+++ b/docs/Bind_Timing.md
@@ -0,0 +1,10 @@
+#Getting your Bind timing right.
+On many consumer models it it important for the Tx to send a bind signal in a narrow window once the model has powered up.
+
+If the bind signal is not recieved during this window, the bind sequence times out. Try this:
+
+ 1. power the transmitter up with the throttle stick high. This will trigger the warning window on the transmitter and put a hold on the transmitter bind process.
+ 1. turn on the model
+ 1. while holding the bind button (if in PPM mode), at the right moment bring the throttle down to instantly bring the transmitter into bind mode.
+
+If you are using Serial Mode it is best to check the Autobind box in the Model Settings menu. This will automatically initiate a bind sequence as soon as the Tx module powers up (Note: the Tx module only powers up when the transmitter passes the Switch/Throttle Warning page).
diff --git a/docs/Compiling.md b/docs/Compiling.md
new file mode 100644
index 0000000..725a397
--- /dev/null
+++ b/docs/Compiling.md
@@ -0,0 +1,210 @@
+# Compiling and Programming (ATmega 328P)
+
+**If you are Compling for the STM32 version of the Multiprotocol Module please go to the dedicated [Compiling and Programming STM32](Compiling_STM32.md) page.**
+
+**This page describes the basic Compiling and Programming process. There are some other more advanced processes that have some superior features described under the [Advanced Topics](Advanced_Topics.md) page.** Some options are:
+ - Using an FTDI cable to upload firmware over the module - Tx pins
+
+
+Multiprotocol source can be compiled using the Arduino IDE.
+
+##Install the Arduino IDE and the Multiprotocol project
+1. Download the Arduino IDE. The currently supported Arduino version is 1.6.10. available for [Windows]( https://www.arduino.cc/download_handler.php?f=/arduino-1.6.10-windows.exe) and [Mac OSX](http://arduino.cc/download_handler.php?f=/arduino-1.6.10-macosx.zip)
+1. Download the zip file with the Multiprotocol module source code from [here](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/archive/master.zip)
+1. Unzip and copy the source code folder **Multiprotocol** to a folder of your choosing
+1. Click on the **Multiprotocol.ino** file in the **Multiprotocol** folder and the Arduino environment should appear and the Multiprotocol project will be loaded.
+
+##Prepare the Arduino IDE:
+The Arduino IDE must be customized to optimally compile the firmware. The following additions to the environment will remove the Arduino bootloader to free up additional memory for protocols.
+###Mac OSX:
+1. Using finder navigate to ```Applications``` folder
+1. Ctl-Click on the Arduino application and select **Show Package Contents**.
+1. Browse to ```Contents/Java/hardware/arduino`` and double click on boards.txt
+1. Copy and paste the following text into the end of the file and save it:
+
+```
+##############################################################
+## Multi 4-in-1 (3.3V, 16 MHz) w/ ATmega328
+## --------------------------------------------------
+multi.name=Multi 4-in-1
+
+multi.upload.tool=avrdude
+multi.upload.protocol=arduino
+
+multi.bootloader.tool=avrdude
+multi.bootloader.unlock_bits=0x3F
+multi.bootloader.lock_bits=0x0F
+
+multi.build.board=AVR_PRO
+multi.build.core=arduino
+multi.build.variant=eightanaloginputs
+
+multi.menu.cpu.16MHzatmega328=ATmega328 (3.3V, 16 MHz)
+
+multi.menu.cpu.16MHzatmega328.upload.maximum_size=32768
+multi.menu.cpu.16MHzatmega328.upload.maximum_data_size=2048
+multi.menu.cpu.16MHzatmega328.upload.speed=57600
+
+multi.menu.cpu.16MHzatmega328.bootloader.low_fuses=0xFF
+multi.menu.cpu.16MHzatmega328.bootloader.high_fuses=0xD3
+multi.menu.cpu.16MHzatmega328.bootloader.extended_fuses=0xFD
+
+multi.menu.cpu.16MHzatmega328.build.mcu=atmega328p
+multi.menu.cpu.16MHzatmega328.build.f_cpu=16000000L
+##############################################################
+```
+1. Open the file *platform.txt* in the same folder and change the line that reads
+
+```compiler.c.elf.extra_flags= ```
+
+to
+
+```compiler.c.elf.extra_flags=-Wl,--relax ```
+
+paste the following text into the end of the file and save it.
+
+Close and reopen the Arduino IDE and load the Multiprotocol project.
+
+### Windows:
+Using File Explorer navigate to
+
+```C:\Program Files(x86)\Arduino\hardware\arduino\avr ```
+
+Open ```boards.txt``` in your favourite text editor (Notepad)
+
+Copy and paste the "Multi 4-in-1" text listed above into the end of the file and save it.
+
+Open the file *platform.txt* in the same folder and change the line that reads
+
+```compiler.c.elf.extra_flags= ```
+
+to
+
+```compiler.c.elf.extra_flags=-Wl,--relax ```
+
+Close and reopen the Arduino IDE and load the Multiprotocol project.
+
+## Common process for OSX and Windows
+If you have module with an Arduino Pro-Mini then scroll down to [Programming Arduino Pro-Mini Boards](#Programming_Arduino_Pro_Mini)
+
+If you are using one of the DIY Mulitprotocol modules with the ATmega soldered directly to a PCB (like the 3.2d board or the Banggood readymade 4-in-1 module) then follow these instructions.
+###Preparing for ATMega328P microcontroller
+1. Under the Tools -> Board select the Multi 4-in-1 board
+1. Under Tools -> Programmer select your programmer (probably USBASP)
+
+
+###Customize the firmware to your hardware and your needs
+On all modules with ATMega microprocessors, the memory required for all the protocols exceeds the available 32k of flash memory. You will need to select which protocols you wish to use that will fit into the available memory.
+
+Before customizing your firmware it would be good to review the protocol on the [Protocol Details](Protocol_Details.md) page and to identify the protocols you would like to support on your module.
+
+At the same time make a note of RF modules required by your protocols. For example, if you do not wish to use the FlySky or the Husan protocols then you do not need to compile support the the A7105 RF Module into your firmware. Similarly, if you have no need to bind with ASSAN RC receivers then you do not need to compile the ASSAN protocol into your firmware.
+
+If you plan to use the PPM communication interface with your transmitter, then you need to perform protocol selection with the 16 position switch on your module. This will limit the available protocols you can usefully include on your firmware to 15. You should make a list of your 15 chosen protocols, sub protocols and options like this:
+
+Switch Position|Protocol|Sub-Protocol|Option|Notes
+---------------|--------|------------|------|-----
+1.|DSM|DSM2|2|6 channels @ 22ms
+2.|DSM|DSMX|6|6 channels @ 11ms
+....|...|...|...|...
+....|...|...|...|...
+15.|FRSKYX|CH_16| |FrSky X receiver 16 chan
+
+
+With the above information (required RF modules, selected protocols and 16 pos switch mapping) you are ready to customize your firmware.
+
+All customization is done by editing the ```_Config.h ``` file in the Multiprotocol Arduino project.
+
+In the Arduino IDE and click on the down arrow on the far right of the tab bar to show a list of project files (see the red circle on the screenshot below). Scroll down and select the _Config.h file.
+
+
+Comment out any of the RF modules that you do not need by typing ```// ``` at the begining of the line that reads :
+```#define _INSTALLED ``` . The following line shows the CC2500 module removed
+
+> ```#define A7105_INSTALLED ```
+
+> ```#define CYRF6936_INSTALLED ```
+
+> **```//#define CC2500_INSTALLED ```**
+
+> ```#define NFR24L01_INSTALLED ```
+
+Scroll down to the available protocols and comment out all the protocols you will not require. The following example shows the DEVO protocol commented out.
+
+> ```#ifdef CYRF6936_INSTALLED ```
+
+> **``` // #define DEVO_CYRF6936_INO ```**
+
+> ``` #define DSM_CYRF6936_INO ```
+
+> ``` #define J6PRO_CYRF6936_INO ```
+
+> ``` #endif ```
+
+If you have a Taranis Tx and you plan on using Serial mode with telemetry find and uncomment the INVERT_TELEMETRY line below:
+> ```//Uncomment to invert the polarity of the telemetry serial signal.```
+
+> ```//For ER9X and ERSKY9X it must be commented. For OpenTX it must be uncommented.```
+
+> ```#define INVERT_TELEMETRY 1```
+
+ Scroll down to the bottom of the file and list your switch mapping to your desired **protocol/sub-protocol/options**. You typically only need to change the three relevant columns. On models that require a rebind on every start-up (like Syma quads) you can change the **```NO_AUTOBIND ```** to **```AUTOBIND ```**.
+
+You can now compile the firmware by clicking on the check mark (Tooltip: Verify) on the menu bar. If everything goes according to plan you should see something like the following line in the lower pane of the window:
+
+> Sketch uses 32,464 bytes (99%) of program storage space. Maximum is 32,768 bytes.
+> Global variables use 1,219 bytes (59%) of dynamic memory, leaving 829 bytes for local variables. Maximum is 2,048 bytes.
+
+if you see something like the following, your firmware is still too big and you need to deselect additional protocols:
+> Sketch uses 34,096 bytes (104%) of program storage space. Maximum is 32,768 bytes.
+> Global variables use 1,236 bytes (60%) of dynamic memory, leaving 812 bytes for local variables. Maximum is 2,048 bytes.
+> Sketch too big; see http://www.arduino.cc/en/Guide/Troubleshooting#size for tips on reducing it.
+
+If there is another error carefully read the error to see the approximate line number where you made a typing error.
+
+
+###Connecting the programmer
+To complete this step you need an USBASP programmer like the one shown below and a 10-pin to 6-pin programming cable.
+
+
+
+1. Before you connect the programmer make sure that you have selected the 3.3V mode and not the 5V mode. The RF Modules are not 5V tolerant and you will harm with 5V. On most programmers this is done by moving a jumper on the programmer.
+1. Please re-read item 1. above before going on.
+1. Turn the rotary switch on the DIY Multiprotocol module to the 0 position. If you do not have a switch (if you are using only Serial mode) then it the same as being in the 0 position. The upload will not work if the switch is in any other position.
+1. Connect the 6-pin programming connector to the 6-pin ASP IVR connector on the DIY Multiprotocol board. Be sure to match the ground pin of the programmer connector to the ground pin on the board (see the images below for the pin layout and the location of the ground pin on the board) {insert pictures AVR ISP Pinout.png and images of boards with ground pin marked}
+1. You are now ready to plug in the USB programmer to the computer
+1. You are now ready to flash the firmware. In the Arduino IDE click **Sketch -> Upload Using Programmer**.
+2. If you get an error that indicates a valid microprocessor was not found there is something wrong with:
+ - your connections,
+ - your programmer, or
+ - your board
+ - Google around with the specific error message to get suggestions of how to fix it. The most common cause is problems with the connection setup and in some cases problems with the cheap programmers from Chinese sources.
+1. The final step is to flash the fuses of the microprocessor. These correct fuses will do a few things:
+ - Prevent the EEPROM from being erased each time the firmware is flashed. This will preserve your Tx ID and save you from having to rebind all your models after an update of the firmware
+ - Configure the clock source of the board - this is very important if you built the board from components. The ATMega328P microprocessor is configured at the factory to use an internal 8Mhz clock. The DIY Multiprotocol boards have a much more accurate 16MHz external crystal and the fuses will tell the MCU to use this clock source. (If you were able to flash the board but after setting the fuses the board no longer responds, it is very likely that you have a problem with your external clock.)
+ - Set the program counter to point at the right place when the module is powered up. The fuses configure the MCU to use a bootloader or not. If you compiled the firmware without a bootloader then the fuses must be set accordingly.
+1. In the Arduino IDE ensure that the **4-in-1 Multi** is selected under **Tools -> Board:** click on **Tools -> Burn Bootloader**. Do not worry if it returns the error that no bootloader was found (in the case of the 4-in-1 board), it has burned the fuses. If you IDE was set to provide verbose compilation and uploading output, you should be able to see the final value of the fuses in the Arduino IDE.
+
+If the output indicates that the fuses have been successfully written give yourself a pat on the back. Well done, you have successfully programmed your DIY Multiprotocol module and you are ready to go on to the final step [Setting up your Transmitter](TransmitterSetup.md) before you can begin to fly!!!!
+
+
+##Programming Arduino Pro-Mini Boards
+Use this method only for Arduino Pro Mini boards with bootloader.
+
+1. Use an external FTDI adapter like one of these options:
+
+1. The programmer should be set to 3.3V or nothing to not supply any over voltage to the multimodule and avoid any damages.
+1. Under the **Tools -> Board:** select the **Arduino Pro-Mini**
+1. Under **Tools -> Processor** select the **Atmega328p (5V, 16Mhz)**
+1. Under **Tools -> Port** select your the serial port your programmer is connected to (it should appear on the the list)
+1. Scroll back to the section [Customize the firmware to your hardware and your needs](#CustomizeFirmareToYourNeeds) above and follow the instructions remembering that you can simply use the Upload button in the Arduino IDE to upload firmware using the Arduino bootloader:
+ - From the Arduino environment, you can use Upload button which will compile and upload to the module: Sketch->Upload (Ctrl+U)
+
+To change the fuses you will need to use an external programmer (like USBasp mentioned above) and a flash tool that fits over the MCU and connects to the required pins, like this one:
+[
](http://www.hobbyking.com/hobbyking/store/__27195__Atmel_Atmega_Socket_Firmware_Flashing_Tool.html)
+It connects to the USBASP programmer and connects directly to the pins on the microcontroller and it will allow you to set fuses and to program the Pro-Mini like the 4-in-1 boards above, without using the bootloader.
+
+Follow the instructions in [Advanced Topics - Manually Setting Fuses](Advanced_Manually_Setting_ATmega328_Fuses.md) to set the fuses.
+
+If building the board from scratch was your chosen strategy we suspect that you would already know how to do this. If not, Google is your friend, try something like “how to flash fuses on Arduino pro-mini”.
+
diff --git a/docs/Compiling_STM32.md b/docs/Compiling_STM32.md
new file mode 100644
index 0000000..66fb9dd
--- /dev/null
+++ b/docs/Compiling_STM32.md
@@ -0,0 +1,150 @@
+# Compliling and Programming (STM32)
+
+**If you are Compling for the Arduino ATmega328p version of the Multiprotocol Module please go to the dedicated [Compiling and Programming ATmega328](Compiling.md) page.**
+
+Multiprotocol source can be compiled using the Arduino IDE using STM32 Core (Maple) and Arduino ARM-Cortex-M3 libraries.
+
+###Install the Arduino IDE and the Multiprotocol project
+1. Download the Arduino IDE. The currently supported Arduino version is 1.6.5. available for [Windows]( https://www.arduino.cc/download_handler.php?f=/arduino-1.6.5-windows.exe) and [Mac OSX](http://arduino.cc/download_handler.php?f=/arduino-1.6.5-macosx.zip)
+1. Download the [STM32 Core](https://github.com/rogerclarkmelbourne/Arduino_STM32/archive/master.zip) and copy the Arduino_STM32 folder to:
+ - OSX: ```Arduino.app/Contents/Java/hardware``` (you can open Arduino.app by Ctl Clicking on Arduino.app and selecting "Show Package Contents")
+ - Windows: ```C:\Program Files (x86)\Arduino\hardware```
+1. Download the zip file with the Multiprotocol module source code from [here](https://github.com/midelic/DIY-Multiprotocol-TX-Module/archive/multi-STM32.zip)
+1. Unzip and copy the source code folder ```Multiprotocol``` to a folder of your choosing
+1. Click on the ```Multiprotocol.ino file``` in the ```Multiprotocol``` folder and the Arduino environment should appear and the Multiprotocol project will be loaded.
+
+###Prepare the Arduino IDE:
+
+1. In order to compile successfully you need also to modify a maple library file. In ```....\hardware\Arduino_STM32\STM32F1\cores\maple\libmaple\usart_f1.c``` comment out the 2 functions as shown below. This is required to have low-level access to the USART interrupt.
+
+ > ```//void __irq_usart2(void) { usart_irq(&usart2_rb, USART2_BASE); } ```
+
+ > ```//void __irq_usart3(void) { usart_irq(&usart3_rb, USART3_BASE); } ```
+1. Run the IDE, and on the **Tools** menu, select **Board** and then **Boards manager**. Click on the Arduino DUE (32 Bits ARM-Cortex M3) from the list of available boards. You must do this step, it installs the arm-none-eabi-g++ toolchain!
+1. Close and reopen the Arduino IDE and load the Multiprotocol project.
+1. Click on the **Verify** button to test compile the before you make any changes. If there are errors check the process above and be sure to have the right version of the Arduino IDE.
+
+
+## Common process for OSX and Windows
+
+###Customize the firmware to your hardware and your needs
+On all modules with STM32F103 microcontroller, the program flash memory on the microcontroller is large enough to accommodate all the protocols. You do not have to make choices on which protocols to upload. Also, it is likely that you used the Banggood 4-in-1 RF module and you will therefore have access to all the RF modules. However, you can follow these instructions to select only a subset protocols.
+
+If you plan to use the PPM mode then you should follow the instructions to customize the protocol selection switch to protocol mapping.
+
+Before customizing your firmware it would be good to review the protocol on the [Protocol Details](Protocol_Details.md) page and to identify the protocols you would like to support on your module.
+
+At the same time make a note of RF modules required by your protocols. For example, if you do not wish to use the FlySky or the Husan protocols then you do not need to compile support the the A7105 RF Module into your firmware. Similarly, if you have no need to bind with ASSAN RC receivers then you do not need to compile the ASSAN protocol into your firmware.
+
+If you plan to use the PPM communication interface with your transmitter, then you need to perform protocol selection with the 16 position switch on your module. This will limit the available protocols you can usefully access in PPM mode on your module to 15 (this limitation does not apply to Serial mode). You should make a list of your 15 chosen protocols, sub protocols and options like this:
+
+Switch Position|Protocol|Sub-Protocol|Option|Notes
+---------------|--------|------------|------|-----
+1.|DSM|DSM2|2|6 channels @ 22ms
+2.|DSM|DSMX|6|6 channels @ 11ms
+....|...|...|...|...
+....|...|...|...|...
+15.|FRSKYX|CH_16| |FrSky X receiver 16 chan
+
+
+With the above information (required RF modules, selected protocols and 16 pos switch mapping) you are ready to customize your firmware.
+
+All customization is done by editing the ```_Config.h ``` file in the Multiprotocol Arduino project.
+
+In the Arduino IDE and click on the down arrow on the far right of the tab bar to show a list of project files (see the red circle on the screenshot below). Scroll down and select the _Config.h file.
+
+
+It is unlikely that you would need to do this, but you can comment out any of the RF modules that you do not need by typing ```// ``` at the begining of the line that reads :
+```#define _INSTALLED ``` . The following line shows the CC2500 module removed
+
+> ```#define A7105_INSTALLED ```
+
+> ```#define CYRF6936_INSTALLED ```
+
+> **```//#define CC2500_INSTALLED ```**
+
+> ```#define NFR24L01_INSTALLED ```
+
+Again it is unlikely that you would want to do this, but you can scroll down to the available protocols and comment out all the protocols you will not require. The following example shows the DEVO protocol commented out.
+
+> **```#ifdef CYRF6936_INSTALLED ```
+
+> **``` // #define DEVO_CYRF6936_INO ```**
+
+> ``` #define DSM_CYRF6936_INO ```
+
+> ``` #define J6PRO_CYRF6936_INO ```
+
+> ``` #endif ```**
+
+Look for the line containing ```#define INVERT_TELEMETRY``` and make sure that it is uncommented:
+> ```#define INVERT_TELEMETRY ```
+
+ Scroll down to the bottom of the file and list your switch mapping to your desired **protocol/sub-protocol/options**. You typically only need to change the three relevant columns. On models that require a rebind on every start-up (like Syma quads) you can change the **```NO_AUTOBIND ```** to **```AUTOBIND ```**.
+
+Finally, if you have not already done so, specify the correct board for the compiler. Under **Tools** -> **Board:** select the **Generic STM32F103C series** board. You can now compile the firmware by clicking on the check mark (Tooltip: Verify) on the menu bar. If everything goes according to plan you should see something like the following line in the lower pane of the window:
+
+> Sketch uses 32,464 bytes (99%) of program storage space. Maximum is 32,768 bytes.
+> Global variables use 1,219 bytes (59%) of dynamic memory, leaving 829 bytes for local variables. Maximum is 2,048 bytes.
+
+If you get an error carefully read the error to see the approximate line number where the error occured and correct it.
+
+###Preparing for STM32 microcontroller for firmware flashing
+
+There are two option for flashing the firmware. The first (and strongly recommended) is flashing it while it is plugged into and powered by the transmitter. The second is flashing it out of the transmitter (the power is supplied by the FTDI cable). The second option is very risky because if the 3.3V bridge jumper is not removed after flashing it will fry your RF module - **you have been warned**.
+
+####Option 1: Flashing with Tx power
+
+1. Put the module in the Tx
+1. Place a jumper over the BOOT0 pins
+1. Connect your 3.3V/5V FTDI cable (USB - TTL serial) to Multiprotocol serial port (RX,TX,GND,5V).The multimodule RX pin connected to FTDI TX pin and multi TX pin connected to FTDI RX pin.Connect only TX and RX pins(2 pins),the power will be supplied by TX.
+1. In arduino IDE under the **Tools** -> **Board:** check that you have selected the **Generic STM32F103C series** board
+1. Under **Tools** -> **Upload Method:** select **Serial**
+1. Click "Upload" and the sketch will be uploaded normally.This is valid for all arduino versions.
+1. Once the firmware has uploaded, remove the BOOT0 jumper.
+
+
+####Option 2: Flashing without Tx power
+
+The key difference of this method is that the 3.3V FTDI cable must also provide power to the 5V circuitry during the flashing process. To do this, a jumper must be enabled connecting the 3.3V VCC to the 5V line.
+
+**If the module is powered through the transmitter and this jumper is enabled, then it will feed 5V throughout the 3.3V circuit and this will fry your RF modules.**
+
+1. Set BOOT0 jumper
+1. Set the 3.3V jumper.This step only for 3.3V USB-serial!!!.Skip this step if using 5V USB-serial.
+1. Connect your 3.3V FTDI cable (USB - TTL serial) to Multiprotocol serial port (RX,TX,GND,5V).If set 3.3V jumper ,3.3V supply from USB-serial goes to 5V pin.
+1. In arduino IDE under the **Tools** -> **Board:** check that you have selected the **Generic STM32F103C series** board
+1. Under **Tools** -> **Upload Method:** select **Serial**.
+1. Click "Upload" and the sketch will be uploaded normally.
+1. Once the firmware has uploaded:
+ - Remove the 3.3V jumper!!!!
+ - Remove the BOOT0 jumper
+ - Check that you removed the 3.3V jumper
+
+
+###Flashing binary file:
+If you want to flash a pre-compiled binary file (like the Release .bin files) you need specialized software and the FTDI cable.
+1. Set BOOT0 jumper
+1. Connect your 3.3V FTDI cable (USB - TTL serial) to Multiprotocol serial port (RX,TX,GND,5V)
+1. The other steps regarding power supply the same as previous recommandation regarding jumpers.
+For uploading binaries(.bin files) there is a specialized software you need to install on your computer.
+
+#### Windows:
+Download the ST Flash Loader Demonstrator from here: http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/flasher-stm32.html
+
+Run the ST Flash Loader program. There are many tutorials on the web on how to use this program.For example
+
+[here](http://www.scienceprog.com/flashing-programs-to-stm32-embedded-bootloader)
+
+#### OSX:
+To be checked.
+
+###Report issues for the STM32 board
+You can report your problem using the [GitHub issue](https://github.com/midelic/DIY-Multiprotocol-TX-Module/issues) system or go to the [Main thread on RCGROUPS](http://www.rcgroups.com/forums/showthread.php?t=2165676) to ask your question.
+Please provide the following information:
+- Multiprotocol code version
+- STM32 version
+- TX type
+- Using PPM or Serial, if using er9x or ersky9x the version in use
+- Different led status (multimodule and model)
+- Explanation of the behavior and reproduction steps
diff --git a/docs/DIY Multiprotocol Module Overview.png b/docs/DIY Multiprotocol Module Overview.png
new file mode 100644
index 0000000..83b0ab0
Binary files /dev/null and b/docs/DIY Multiprotocol Module Overview.png differ
diff --git a/docs/Documentation_To_Do_List.md b/docs/Documentation_To_Do_List.md
new file mode 100644
index 0000000..2436118
--- /dev/null
+++ b/docs/Documentation_To_Do_List.md
@@ -0,0 +1,28 @@
+#Documentation ToDos
+1. Documentation on all the FlySky boards: (MikeB?)
+ - SKY board erSky9x
+ - AR9X board erSky9x
+ - 9Xtreme board erSky9x
+ - AR9X UNI board
+1. Add to the troubleshooting page
+1. Add how to do custom protocol setup on er9x and OpenTx
+1. Document the OrangeRx Transmitter module (Mikeb?)
+1. enabling Serial on the DIY PCB page
+1. lots of pictures mentioned between the {} markers
+2. Add how to wire the antenna switcher in the "solder your own board and use 4-in-1 Rf module (add pictures of the wires from the ATmega pins to PE1 and PE2)
+1. Someone to add the Build the board from scratch if it is still relevant
+
+#Proposal for renaming options to make things simpler
+
+Multiprotocol Transmitter Module or Multiprotocol Module is not only becoming quite a mouthful but we use module on two different levels. (for example the CC2500 module and the DIY Multiprotocol Module). It is nevertheless very descriptive. Without throwing the proverbial "baby out with the bathwater" I suggest that we set expectations that **MPTM** can be interchangeably used for Multiprotocol Module. If we use the term interchangeably we can see if it begins to stick. I do not suggest that we change any of the github or rcgroups pages.
+
+In addition to this it would be very useful if we could bucket the different MPTM options according to how they are built. For example:
+
+- **Ready-made:** Banggood 4-in-1 module : Readymade Mulitprotocol Module or Readymade Multiprotocol Transmitter Module or Readymade MPTM or Banggood MPTM
+- **DIY:** Modules made from PCBs : DIY Multiprotocol Module, DIY ATmega Multiprotocol Module, DIY STM32 Multiprotocol Module or DIY STM32 MPTM
+- **Scratchbuild:** Modules made from scratch:
+ - Option 1: Perfboard Multiprotocol Module or Perfboard MPTM
+ - Option 2: Scratchbuild Multiprotocol Module or Scratchbuild MPTM
+
+
+1. Move to atmega specific and add ftdi to stm32 AVR ISP programmer like the popular USBASP programming dongle that is 3.3V safe - available from many sellers on ebay. There are reports that some of the cheap programmers are not safe to use with 3.3V units (like this unit). Look for USBAsp programmers with the “LC Technologies” label. {Pascal to confirm these reports are true} Also, you will need a 10-pin to 6-pin connector to connect the USBASP to the board.
diff --git a/docs/Hardware.md b/docs/Hardware.md
new file mode 100644
index 0000000..aa47472
--- /dev/null
+++ b/docs/Hardware.md
@@ -0,0 +1,19 @@
+# Hardware Options for your MPTM
+
+The choice of **Multiprotocol Transmitter Module (MPTM)** hardware is the single biggest choice you will make. Due to the growing popularity of this project the number of hardware choices is growing almost monthly.
+
+There are currently four common hardware options. They are:
+
+1. A ready-made MPTM from Banggood.com (see [here](http://www.banggood.com/2_4G-CC2500-A7105-Flysky-Frsky-Devo-DSM2-Multiprotocol-TX-Module-With-Antenna-p-1048377.html)) that integrates the microprocessor with all four supported RF modules and a hardware antenna switcher.
+[
](Module_BG_4-in-1.md)
+1. A DIY MPTM made using one of the PCBs that are available and soldering on your own components. The picture below shows an example of one before RF modules have been soldered on.
+[
](Module_Build_yourself_PCB.md)
+1. A MPTM based on the OrangeRx DSM transmitter module that natively supports the CYRF6936 RF module. This module can be improved with Mulitprotocol firmware.
+[
](Module_OrangeRx.md)
+1. A scratchbuilt MPTM using perfboard, an Arduino Pro-Mini and the desired RF modules.
+Unless you are handy with a soldering iron and you have access to electronic test equipment (like an oscilloscope) you should consider only Option 1. For a price of about $44 you can get everything you need, neatly assembled
+
+[
](Module_Build_From_Scratch.md)
+
+Click on any of the images above to understand more about each option.
+
diff --git a/docs/Models.md b/docs/Models.md
new file mode 100644
index 0000000..0f6be97
--- /dev/null
+++ b/docs/Models.md
@@ -0,0 +1,22 @@
+#Model Setup
+This is the page to document model or receiver specific setup instructions.
+The complete list of models the protocols they use are documented [here](https://docs.google.com/spreadsheets/d/1nBHzT3VWF6ShAhOqRB5y0Bcc7aXFuRFFlQkHn1RIM84/edit#gid=0)
+
+The Deviation project (on which this project was based) have a useful list of models [here](http://www.deviationtx.com/wiki/supported_models).
+
+#Syma X5C
+
+##Binding
+There are no special binding instructions. The model powers up in Autobind mode and expects the bind sequence from the transmitter within the first 4-5 seconds.
+##Tx Setup
+{How to setup the transmitter switches for rates, flip, picture and video}
+
+#Inductrix (Horizon Hobby)
+
+
+
+##Binding
+{Enter bind instructions here - Which DSM mode works best?}
+
+##Tx Setup
+{How to setup the transmitter optimally for leveling and acro mode}
diff --git a/docs/Module_BG_4-in-1.md b/docs/Module_BG_4-in-1.md
new file mode 100644
index 0000000..04f1f95
--- /dev/null
+++ b/docs/Module_BG_4-in-1.md
@@ -0,0 +1,47 @@
+
+#4-in-1 Banggood module
+Currently the form factor of this module is designed for the JR-style module bay. Many of the popular RC transmitters use the JR-style module bay: FrSky Taranis, FlySky Th9x, Turnigy 9X/R/Pro {other transmitters that come to mind?}
+##What you need
+1. The ready-made module is available from Banggood.com [here](http://www.banggood.com/2_4G-CC2500-A7105-Flysky-Frsky-Devo-DSM2-Multiprotocol-TX-Module-With-Antenna-p-1048377.html)
+
+1. A module case that fits your receiver like the one [here](https://www.xtremepowersystems.net/proddetail.php?prod=XPS-J1CASE)
+
+ or you can 3D print your own from a selection on Thingiverse (example [here](http://www.thingiverse.com/thing:1661833)).
+
+1. 3x2 header pins (to solder onto the board for programming)
+1. AVR ISP programmer like the popular USBASP programming dongle that is 3.3V safe - available from many sellers on [ebay.](http://www.ebay.com/sch/i.html?_odkw=usbasp+progammer&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR3.TRC2.A0.H0.Xusbasp+progammer+3.3V.TRS1&_nkw=usbasp+progammer+3.3V&_sacat=0) There are reports that some of the cheap programmers are not safe to use with 3.3V units (like this unit). Look for USBAsp programmers with the “LC Technologies” label. {Pascal to confirm these reports are true} Also, you will need a 10-pin to 6-pin connector to connect the USBASP to the board.
+
+
+##Build instructions
+The assembly process is trivial but it does depend on:
+- The communication interface between your transmitter and the module, and
+- The version of the module you have
+
+###Common steps
+
+1. Solder the 3x2 header pins onto the module as shown below {insert picture of module with pins}. These header pins are required to program the microcontroller.
+1. Fit the module into the module case. This may require some careful filing or sanding of the module to ensure a nice fit.
+
+###PPM interface
+If you are only planning on using the PPM interface with transmitter you are ready to program the module as described in Compiling and Programming the module.
+
+###Enabling Serial interface
+If you have a transmitter that can support serial communication with the board then you need to wire up the board appropriately. There are two versions of the module and the steps are slightly different.
+
+Check which module you have and based on the pictures below. If you purchased the module after June 2016 then it is likely that you have V2 module.
+
+#### **Version 2 (V2) module**
+
+Solder two bridges over the pads shown in the picture below.
+
+
+
+
+You are now ready to go over to [Compiling and Programming](Compiling.md).
+
+#### **Version 1 (V1) module**
+
+Solder bridges and resistors as illustrated in the picture below.
+
+
+You are now ready to go over to [Compiling and Programming](Compiling.md).
diff --git a/docs/Module_Build_From_Scratch.md b/docs/Module_Build_From_Scratch.md
new file mode 100644
index 0000000..193444d
--- /dev/null
+++ b/docs/Module_Build_From_Scratch.md
@@ -0,0 +1,17 @@
+#Build from stratch
+
+If you can help to fully document this page, or just add additional detail please let us know on the rcgroups [forum](http://www.rcgroups.com/forums/showthread.php?t=2165676).
+
+## Bill of materials
+If this is the option you are following, then you must have a pretty good idea of what you are doing. Check the BOM for the DIY PCB version of the hardware as a starting point. You can find the link [here](Module_Build_yourself_PCB.md).
+
+The Arduino Pro-Mini is available many places online. Check Sparkfun (the original developers of the Pro-Mini) page [here](https://www.sparkfun.com/products/11113)
+
+You will require a second Arduino or a FTDI (USB to TTL serial) cable to program the Pro-Mini. Like the one [here](https://www.sparkfun.com/products/9717). **Make sure you get only a 3.3V FTDI cable - or you will fry your 3.3V RF modules when you connect it up.**
+
+##Reference Schematic
+Here is the schematic you can use to troubleshoot the module
+
+
+##Compiling and programming
+Follow the instruction on the [Compiling and programming page](Compiling.md)
diff --git a/docs/Module_Build_yourself_PCB.md b/docs/Module_Build_yourself_PCB.md
new file mode 100644
index 0000000..6f0c6f0
--- /dev/null
+++ b/docs/Module_Build_yourself_PCB.md
@@ -0,0 +1,91 @@
+
+#DIY MPTM by soldering components on a PCB
+Currently the form factor of this module is designed for the JR-style module bay. Many of the popular RC transmitters use the JR-style module bay: FrSky Taranis, FlySky Th9x, Turnigy 9X/R/Pro
+##What you need
+First you must choose the PCB onto which to solder all the components. There are two PCB options:
+ - ATmega (8-bit) powered PCB V2.3d supporting individual RF modules
+ - STM32 (32-bit) powered PCB supporting the 4-in-1 RF module
+
+The **ATmega-based board** has been designed to accept individual RF modules. This way you can select just the module or modules you want. The downside is that each module requires its own antenna. It can become cumbersome with 4 antennas protruding from the module. It is possible to soder the 4-in-1 module to the PCB using thin insulated wire. This 4-in-1 module requires only one antenna. Finally, the Atmega board has a 32k flash memory. This is big enough to accommodate more than 15 protocols, but it cannot accommodate all the available protocols.
+
+
+
+The **STM32-based** board has been designed to accept the 4-in-1 RF module with the antenna switcher (shown below). This means only one antenna. The STM32F103 processesor also has a much larger flash memory.
+
+
+
+###ATmega board V2.3d
+1. ATmega (8-bit) powered PCB V2.3d available from OSHPark [here](https://oshpark.com/shared_projects/Ztus1ah8).
+2. Individual RF modules The modules are available here:
+ - [CC2500](http://www.banggood.com/2_4G-500K-CC2500-Long-Range-Wireless-Transceiver-Module-p-1075492.html) for FrSkyV, FrSkyD, FrSkyX and SFHSS
+ - CYRF6936 {Can someone please give me a source} for DSM, DEVO, J6Pro
+ - [A7105](http://www.banggood.com/A7105-Wireless-RF-2_4GHz-Transceiver-Module-3_3V-Power-Supply-Module-p-909404.html) for Flysky, Hubsan
+ - [NRF24L01](http://www.banggood.com/2_4G-NRF24L01-PA-LNA-Wireless-Module-16+32mm-Without-Antenna-p-922601.html?utm_source=tradetracker&utm_medium=tradetracker_SE&utm_campaign=tradetracker&utm_content=227736) for Hisky, V2x2, CX-10, SYMAX and plenty other protocols
+ - The 4-in-1 RF module (available [here](http://www.banggood.com/DIY-2_4G-CC2500-NRF24L01-A7105-CYRF6936-Multi-RF-4-IN-1-Wireless-Module-p-1046308.html)) can also be connected with solder wires. To enable the antenna switcher the PE1 and PE2 pads must be soldered to ATmega pins, check the [schematic](#V23D_Schematic)
+1. Electronics component BOM is [here](BOM_DIY_ATmega.md). This BOM is inclusive, you many not need all the parts depending on your needs.
+
+The schematic for the board is [here](#V23D_Schematic). Please note that is is the general schematic - there will be some minor differences (like solder jumpers) between this and the board.
+
+###STM32 powered PCB
+1. STM32 (32-bit) powered PCB supporting the 4-in-1 RF module available from OSHPark [here](https://oshpark.com/shared_projects/toBXcpNK).
+2. The 4-in-1 RF module is available [here](http://www.banggood.com/DIY-2_4G-CC2500-NRF24L01-A7105-CYRF6936-Multi-RF-4-IN-1-Wireless-Module-p-1046308.html)
+1. The BOM for this board is available [here](BOM_DIY_STM32.md). The github project page for the STM32 module is [here](https://github.com/midelic/DIY-Multiprotocol-TX-Module).
+
+The schematic for the board is [here](#STM32_Schematic)
+
+###Common parts
+1. A module case that fits your receiver like the one [here](https://www.xtremepowersystems.net/proddetail.php?prod=XPS-J1CASE)
+
+ or you can 3D print your own from a selection on Thingiverse (example [here](http://www.thingiverse.com/thing:1661833) or [here](http://www.thingiverse.com/thing:1691786)).
+
+1. A 2.4GHz antenna and pigtail
+1. AVR ISP programmer like the popular USBASP programming dongle that is 3.3V safe - available from many sellers on [ebay.](http://www.ebay.com/sch/i.html?_odkw=usbasp+progammer&_osacat=0&_from=R40&_trksid=p2045573.m570.l1313.TR3.TRC2.A0.H0.Xusbasp+progammer+3.3V.TRS1&_nkw=usbasp+progammer+3.3V&_sacat=0) There are reports that some of the cheap programmers are not safe to use with 3.3V units (like this unit). Look for USBAsp programmers with the “LC Technologies” label. {Pascal to confirm these reports are true} Also, you will need a 10-pin to 6-pin connector to connect the USBASP to the board.
+
+
+##Build instructions
+If you got this far you already know what you are doing!!
+
+###Common steps
+
+1. Solder all the parts according to the BOM part numbering and the images for your board (see OSHPARK for the images)
+1. Fit the module into the module case. This may require some careful filing or sanding of the module to ensure a nice fit.
+
+###PPM interface
+If you are only planning on using the PPM interface with transmitter you are ready to program the module as described in Compiling and Programming the module.
+
+###Enabling Serial interface
+If you have a transmitter that can support serial communication with the board then you need to solder some jumpers.
+
+
+#### **ATmega V2.3d board**
+
+There are four solder type jumpers on the bottom side of the board near the lower left corner when the bottom of the board is facing towards you. The silkscreen shows which jumper is which. These four jumpers enable the board to be configured in several ways as explaned below.
+
+ (J-1) Use (PPM V/V) if the incoming PPM signal is at a higher voltage level, leave open if ~~5V.
+
+ (J-2) Use (Jumper 2) to connect the incomming PPM signal to the RX pin on the processor
+
+ (J-3) Short (TELEM) only if you have done a telemetry mod to your radio, leave open if not needed. When connected, pin 2 of the two pin header (P3) is also connected.
+
+ (J-4) Use (MOD) only to connect the transmitter pin 2 to pin 1 of the two pin header (P3).
+
+**It is most likely J-2 will be the only one needing to be shorted for the serial method of sending model protocols.**
+
+You are now ready to go over to [Compiling and Programming](Compiling.md).
+
+#### **STM32 board**
+
+Solder bridges and resistors as illustrated in the picture below. {need to get info from midelic}
+
+
+You are now ready to go over to [Compiling and Programming STM32](Compiling_STM32.md).
+
+#Reference Schematic
+Here is the schematic you can use to troubleshoot the module
+## PCB V2.3d Schematic
+
+## PCB STM32 Schematic
+
+
+
+
diff --git a/docs/Module_OrangeRx.md b/docs/Module_OrangeRx.md
new file mode 100644
index 0000000..cde0932
--- /dev/null
+++ b/docs/Module_OrangeRx.md
@@ -0,0 +1,3 @@
+#OrangeRx Transmitter module
+{need someone to do this if it is important}
+
diff --git a/docs/PPM_Setup.md b/docs/PPM_Setup.md
new file mode 100644
index 0000000..6205526
--- /dev/null
+++ b/docs/PPM_Setup.md
@@ -0,0 +1,57 @@
+#PPM Setup
+
+The Multiprotocol Module is compatible with any transmitter that is able to generate a PPM (Pulse Postion Modulation) output. This includes all transmitters with a module bay or a trainer port. It supports up to 16 channels from a PPM frame in the normal or inverted format (sometimes called positive or negative format in some transmitters).
+If you want the best performance you can set the number of channels and framerate corresponding to the number of channels of the specific receiver/model.
+
+##PPM Connections
+If you do not have a module bay, there are only three wires you need to connect to get PPM to work. (The pins are numbered from top to bottom)
+- PPM on pin 1
+- vbat on pin 3
+- ground on pin 4
+
+Note: vbat should be between 6V and 13V when using the 4-in-1 and 2.3 PCB boards. If you built a module from scratch it depends on the voltage regulator you chose.
+
+
+##Enabling PPM mode in your transmitter
+
+1. Enable the default Tx mode to be AETR. If you do not want to change the default channel order on your Tx you must remember to change the channel order for each new model using the module to AETR under the Model Mixer menu.
+1. The default PPM settings is 8 channels with a frame period of 22.5 ms (sometimes called the frame rate). If you want to optimize performance you should change the channels to the actual number of channels required by your model. The corresponding frame period should be set to (number of channels + 1) * 2.5 ms. For example:
+ - A 4 channel model the frame period is (4 + 1)*2.5 = 12.5 ms.
+ - A 6 channel model the frame period is (6 + 1)*2.5 = 17.5ms.
+
+## Protocol selection in PPM mode
+
+To select the protocol simply switch off the transmitter and rotate the protocol selection switch on the module to the desired position.
+
+**Note that the dial selection must be done before the module receives power - this is not necessarily the same time that the transmitter is powered up. The transmitter often only provides power to the module once it has passed switch checks and throttle position checks.**
+
+The default mapping of protocols to switch positions can be viewed on the Protocol Details page found [here](Protocol_Details.md#DefaultMapping)
+
+The mapping of protocols to protocol selection switch positions can be changed in configuration settings as described on the [Compiling and Programming page](Compiling.md).
+
+##Binding in PPM mode
+
+In PPM mode follow the standard transmitter - receiver binding process:
+ 1. Switch off the transmitter
+ 1. Switch on the receiving device in bind mode (if it is not already autobind). Check the documentation for your device.
+ 1. Press and hold the bind button on the back of the module as you power up the transmitter. Hold the button down until the transmitter powers up the module. The red LED on the module should be flashing at about 5Hz - indicating bind mode.
+ 1. Watch the receiver for the completion of the bind process
+ 1. This is a model supporting autobind (binds every time it powers up) then you should be ready to go
+ 1. For traditional RC receivers with a bind memory - power down the receiver and the Tx and then power up the Tx and the Rx to confirm bind.
+
+If you are having trouble binding to a consumer quad check the section below on [Getting your Bind Timing right](Bind_Timing.md). For more details on setting up specific receivers or models, check out the [Protocol Details page](Protocol_Details.md).
+
+##Telemetry in PPM mode
+
+Telemetry is available as a serial stream on the TX pin of the Atmega328p in the FrSky HUB format. The serial parameters are based on the protocol selected by the protocol selection dial.
+
+Protocol|Serial Parameters
+--------|-----------------
+Hubsan|9600bps 8n1
+FrSkyD|9600bps 8n1
+FrSkyX|57,600bps 8n1
+DSM2/X|125,000bps 8n1
+
+The serial stream is also available on pin 5 of the Module connector (pins numbered from top to bottom) on the [4-in-1 module]() and the [V2.3d modules]() provided the Tx jumper has been soldered. See the linked module documentation for what this means.
+
+You can connect it to your TX if it is telemetry enabled or use a bluetooth adapter (HC05/HC06) along with an app on your phone/tablet [(app example)](https://play.google.com/store/apps/details?id=biz.onomato.frskydash&hl=fr) to display telemetry information and setup alerts.
diff --git a/docs/Protocol_Details.md b/docs/Protocol_Details.md
new file mode 100644
index 0000000..df4bd99
--- /dev/null
+++ b/docs/Protocol_Details.md
@@ -0,0 +1,447 @@
+#Protocols details
+Here are detailed descriptions of every supported protocols (sorted by RF modules) as well as the available options for each protocol.
+
+ If you want to see a list of models that use these protocols see the [Models](Models.md) page.
+
+## Default Mapping of Protocols
+Here is the default mapping of protocols to the 16-position protocol selection switch on the module. You can customize these when you compile your own firmware as described in [Compiling and Programming.](Compiling.md)
+
+**Note that the protocol must be selected before the unit is turned on.**
+
+Dial|Protocol|Sub_protocol|RX Num|Power|Auto Bind|Option|RF Module
+----|--------|------------|------|-----|---------|------|---------
+0|Select serial||||||
+1|FLYSKY|Flysky|0|High|No|0|A7105
+2|HUBSAN|-|0|High|No|0|A7105
+3|FRSKYD|-|0|High|No|-41|CC2500
+4|HISKY|Hisky|0|High|No|0|NRF24L01
+5|V2X2|-|0|High|No|0|NRF24L01
+6|DSM|DSM2|0|High|No|6|CYRF6936
+7|DEVO|-|0|High|No|0|CYRF6936
+8|YD717|YD717|0|High|No|0|NRF24L01
+9|KN|WLTOYS|0|High|No|0|NRF24L01
+10|SYMAX|SYMAX|0|High|No|0|NRF24L01
+11|SLT|-|0|High|No|0|NRF24L01
+12|CX10|BLUE|0|High|No|0|NRF24L01
+13|CG023|CG023|0|High|No|0|NRF24L01
+14|BAYANG|-|0|High|No|0|NRF24L01
+15|SYMAX|SYMAX5C|0|High|No|0|NRF24L01
+
+## Useful notes and definitions
+- **Extended limits supported** - A command range of -125%..+125% will be transmitted. Otherwise the default is -100%..+100% only.
+- **Autobind protocol** - The transmitter will automatically initiate a bind sequence on power up. This is for models where the receiver expects to rebind every time it is powered up. In these protocols you do not need to press the bind button at power up to bind, it will be done automatically.
+- **Channel Order** - The channel order assumed in all the documentation is AETR and it is highly recommended that you keep it this way. You can change this in the compilation settings. However, please indicate your channel order in all questions and posts on the forum pages.
+
+***
+#A7105 RF Module
+
+##FLYSKY
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+Note that the RX ouput will be AETR.
+
+###Sub_protocol V9X9
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|LIGHT|PICTURE|VIDEO
+
+###Sub_protocol V6X6
+CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---
+FLIP|LIGHT|PICTURE|VIDEO|HEADLESS|RTH|XCAL|YCAL
+
+###Sub_protocol V912
+CH5|CH6
+---|---
+BTMBTN|TOPBTN
+
+##HUBSAN
+Models: Hubsan H102D, H107/L/C/D and Hubsan H107P/C+/D+
+
+Autobind protocol
+
+Telemetry enabled for battery voltage and TX RSSI
+
+Option=vTX frequency (H107D) 5645 - 5900 MHz
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+***
+#CC2500 RF Module
+
+##FRSKYV = FrSky 1 way
+Models: FrSky receivers V8R4, V8R7 and V8FR.
+
+Extended limits supported
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4
+---|---|---|---
+CH1|CH2|CH3|CH4
+
+##FRSKYD
+Models: FrSky receivers D4R and D8R. DIY RX-F801 and RX-F802 receivers.
+
+Extended limits supported
+
+Telemetry enabled for A0, A1, RSSI, TSSI and Hub
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+
+##FRSKYX
+Models: FrSky receivers X4R, X6R and X8R.
+
+Extended limits supported
+
+Telemetry enabled for A1 (RxBatt), A2, RSSI, TSSI and Hub
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+###Sub_protocol CH_16
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16
+---|---|---|---|---|---|---|---|---|----|----|----|----|----|----|----
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14|CH15|CH16
+
+###Sub_protocol CH_8
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+
+##SFHSS
+Models: Futaba RXs and XK models.
+
+Option=fine frequency tuning. This value is different for each board. To determine the option value, find the two limits where the RX loses connection then set the option value to half way between them. If you have a 4in1 V2 board the value is around 40.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+***
+#CYRF6936 RF Module
+
+##DEVO
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|CH5|CH6|CH7|CH8
+
+Note that the RX ouput will be EATR.
+
+Bind procedure using serial:
+- With the TX off, put the binding plug in and power on the RX (RX LED slow blink), then power it down and remove the binding plug. Receiver should now be in autobind mode.
+- Turn on the TX, set protocol = Devo with option=0, turn off the TX (TX is now in autobind mode).
+- Turn on RX (RX LED fast blink).
+- Turn on TX (RX LED solid, TX LED fast blink).
+- Wait for bind on the TX to complete (TX LED solid).
+- Make sure to set the RX_Num value for model match.
+- Change option to 1 to use the global ID.
+- Do not touch option/RX_Num anymore.
+
+Bind procedure using PPM:
+- With the TX off, put the binding plug in and power on the RX (RX LED slow blink), then power it down and remove the binding plug. Receiver should now be in autobind mode.
+- Turn on RX (RX LED fast blink).
+- Turn the dial to the model number running protocol DEVO on the module.
+- Press the bind button and turn on the TX. TX is now in autobind mode.
+- Release bind button after 1 second: RX LED solid, TX LED fast blink.
+- Wait for bind on the TX to complete (TX LED solid).
+- Press the bind button for 1 second. TX/RX is now in fixed ID mode.
+- To verify that the TX is in fixed mode: power cycle the TX, the module LED should be solid ON (no blink).
+- Note: Autobind/fixed ID mode is linked to the dial number. Which means that you can have multiple dial numbers set to the same protocol DEVO with different RX_Num and have different bind modes at the same time. It enables PPM users to get model match under DEVO.
+
+##DSM
+###Sub_protocol DSM2
+Extended limits supported
+
+Telemetry enabled for TSSI and plugins
+
+option=number of channels and frame rate:
+ - 0 : 4 channels @22ms
+ - 1 : 5 channels @22ms
+ - 2 : 6 channels @22ms
+ - 3 : 7 channels @22ms
+
+ - 4 : 4 channels @11ms
+ - 5 : 5 channels @11ms
+ - 6 : 6 channels @11ms
+ - 7 : 7 channels @11ms
+
+ - 8 : 8 channels @22ms
+ - 9 : 9 channels @22ms
+ - 10 : 10 channels @22ms
+ - 11 : 11 channels @22ms
+ - 12 : 12 channels @22ms
+
+Value 6 is usually giving the best results with most of the RX.
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---|---|----|----|----
+A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+
+Note that the RX ouput will be TAER.
+
+###Sub_protocol DSMX
+Same as above
+
+##J6Pro
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---|---|----|----|----
+A|E|T|R|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+
+***
+#NRF24L01 RF Module
+
+##ASSAN
+Extended limits supported
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---|---|---|---|---
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+
+The transmitter must be close to the receiver while binding.
+
+##BAYANG
+Models: EAchine H8(C) mini, BayangToys X6/X7/X9, JJRC JJ850, Floureon H101 ...
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---|---|---|---|----
+A|E|T|R|FLIP|RTH|PICTURE|VIDEO|HEADLESS|INVERTED
+
+##CG023
+Models: EAchine CG023/CG031/3D X4
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol YD829
+Models: Attop YD-822/YD-829/YD-829C ...
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP||PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol H8_3D
+Models: EAchine H8 mini 3D, JJRC H20/H22
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP|LIGTH|OPT1|OPT2|CAL
+
+JJRC H20: OPT1=Headless, OPT2=RTH
+
+JJRC H22: OPT1=RTH, OPT2=180/360° flip mode
+
+H8 3D: OPT1=RTH then press a direction to enter headless mode (like stock TX), OPT2=switch 180/360° flip mode
+
+CAL: calibrate accelerometers
+
+##CX10
+Extended limits supported
+
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|FLIP|RATE
+
+Rate: -100%=rate 1, 0%=rate 2, +100%=rate 3
+
+###Sub_protocol GREEN
+Models: Cheerson CX-10 green pcb
+
+Same channels assignement as above.
+
+###Sub_protocol BLUE
+Models: Cheerson CX-10 blue pcb & some newer red pcb, CX-10A, CX-10C, CX11, CX12, Floureon FX10, JJRC DHD D1
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|RATE|PICTURE|VIDEO
+
+Rate: -100%=rate 1, 0%=rate 2, +100%=rate 3 or headless for CX-10A
+
+###Sub_protocol DM007
+
+CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---
+FLIP|MODE|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol Q282 and Q242
+
+CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12
+---|---|---|---|---|---|---|---
+FLIP|LED|PICTURE|VIDEO|HEADLESS|RTH|XCAL|YCAL
+
+Model: JXD 509 is using Q282 with CH12=Start/Stop motors
+
+###Sub_protocol JC3015_1
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|MODE|PICTURE|VIDEO
+
+###Sub_protocol JC3015_2
+
+CH5|CH6|CH7|CH8
+---|---|---|---
+FLIP|MODE|LED|DFLIP
+
+###Sub_protocol MK33041
+
+CH5|CH6|CH7|CH8|CH9|CH10
+---|---|---|---|---|---
+FLIP|MODE|PICTURE|VIDEO|HEADLESS|RTH
+
+##ESKY
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|GYRO|PITCH
+
+##FY326
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|RTH|HEADLESS|EXPERT|CALIBRATE
+
+##FQ777
+Model: FQ777-124
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|RTH|HEADLESS|EXPERT
+
+##HISKY
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+A|E|T|R|GEAR|PITCH|GYRO|CH8
+
+GYRO: -100%=6G, +100%=3G
+
+###HK310
+Models: RX HK-3000, HK3100 and XY3000 (TX are HK-300, HK-310 and TL-3C)
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
+---|---|---|---|---|---|---|---
+|||T|R|AUX|T_FSAFE|R_FSAFE|AUX_FSAFE
+
+##KN
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
+---|---|---|---|---|---|---|---|---|----|----
+A|E|T|R|DR|THOLD|IDLEUP|GYRO|Ttrim|Atrim|Etrim
+
+Dual Rate (DR): +100%=full range, Throttle Hold (THOLD): +100%=hold, Idle Up (IDLEUP): +100%=3D, GYRO: -100%=6G, +100%=3G
+
+###Sub_protocol WLTOYS
+###Sub_protocol FEILUN
+Same channels assignement as above.
+
+##MJXQ
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13
+---|---|---|---|---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LED|PICTURE|VIDEO|HEADLESS|RTH|AUTOFLIP|PAN|TILT
+
+###Sub_protocol WLH08
+###Sub_protocol X600
+Only 3 TX IDs available, change RX_Num value 0..2 to cycle through them
+###Sub_protocol X800
+Only 3 TX IDs available, change RX_Num value 0..2 to cycle through them
+###Sub_protocol H26D
+###Sub_protocol E010
+Only 1 TX ID available
+
+##MT99XX
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LED|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol MT
+Models: MT99xx
+###Sub_protocol H7
+Models: Eachine H7, Cheerson CX023
+###Sub_protocol YZ
+Model: Yi Zhan i6S
+Only one model can be flown at the same time since the ID is hardcoded.
+###Sub_protocol LS
+Models: LS114, 124, 215
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|INVERT|PICTURE|VIDEO|HEADLESS
+
+##Shenqi
+Autobind protocol
+
+Model: Shenqiwei 1/20 Mini Motorcycle
+
+CH1|CH2|CH3|CH4
+---|---|---|---
+ | |T|R
+
+Throttle +100%=full forward,0%=stop,-100%=full backward.
+
+##SLT
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6
+---|---|---|---|---|---
+A|E|T|R|GEAR|PITCH
+
+##Symax
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|RATES|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol SYMAX
+Models: Syma X5C-1/X11/X11C/X12
+
+###Sub_protocol SYMAX5C
+Model: Syma X5C (original) and X2
+
+##V2X2
+Models: WLToys V202/252/272, JXD 385/388, JJRC H6C, Yizhan Tarantula X6 ...
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11
+---|---|---|---|---|---|---|---|---|----|----
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS|MAG_CAL_X|MAG_CAL_Y
+
+PICTURE: also automatic Missile Launcher and Hoist in one direction
+
+VIDEO: also Sprayer, Bubbler, Missile Launcher(1), and Hoist in the other dir
+
+##YD717
+Autobind protocol
+
+CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
+---|---|---|---|---|---|---|---|---
+A|E|T|R|FLIP|LIGHT|PICTURE|VIDEO|HEADLESS
+
+###Sub_protocol YD717
+###Sub_protocol SKYWLKR
+###Sub_protocol SYMAX4
+###Sub_protocol XINXUN
+###Sub_protocol NIHUI
+Same channels assignement as above.
diff --git a/docs/README-old.md b/docs/README-old.md
new file mode 100644
index 0000000..3d6b7ff
--- /dev/null
+++ b/docs/README-old.md
@@ -0,0 +1,399 @@
+# Legacy Documentation
+
+Multiprotocol is a 2.4GHz transmitter which enables any TX to control lot of different models available on the market.
+
+The source code is partly based on the Deviation TX project, thanks to all the developpers for their great job on protocols.
+
+[Forum link on RCGROUPS](http://www.rcgroups.com/forums/showthread.php?t=2165676) for additional information or requesting a new protocol integration.
+
+ 
+
+**To download the latest compiled version (hex file), click on [Release](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases) on the top menu.**
+
+##Contents
+
+[Compatible TX](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#compatible-tx)
+
+[Protocols](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#protocols)
+
+[Hardware](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#hardware)
+
+[Compilation and programmation](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#compilation-and-programmation)
+
+[Troubleshooting](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#troubleshooting)
+
+##Compatible TX
+
+###Using standard PPM output (trainer port)
+The multiprotocol TX module can be used on any TX with a trainer port.
+
+Channels order is AETR by default but can be changed in the _Config.h.
+
+The protocol selection is done via a dip switch, rotary dip switch or scsi ID selector.
+
+
+
+
+
+You can access to up to 15 different protocols and associated settings.
+
+Settings per selection are located in _Config.h:
+ - Protocol and type: many main protocols have variants
+ - RX Num: number your different RXs and make sure only one model will react to the commands
+ - Power: High or low, enables to lower the power setting of your TX (indoor for example).
+ - Option: -127..+127 allowing to set specific protocol options. Like for Hubsan to set the video frequency.
+ - Autobind: Yes or No. At the model selection (or power applied to the TX) a bind sequence will be initiated
+
+###Using a serial output
+The multiprotocol TX module takes full advantage of being used on a Turnigy 9X, 9XR, 9XR Pro, Taranis, 9Xtreme, AR9X, ... running [er9x](http://openrcforums.com/forum/viewtopic.php?f=5&t=4598) or [ersky9X](http://openrcforums.com/forum/viewtopic.php?f=7&t=4676). An OpenTX version for Taranis is available [here](http://plaisthos.de/opentx/).
+
+This enables full integration using the radio GUI to setup models with all the available protocols options.
+
+
+
+Options are:
+ - Protocol and type: many main protocols have variants
+ - RX Num: number your different RXs and make sure only one model will react to the commands
+ - Power: High or low, enables to lower the power setting of your TX (indoor for example).
+ - Option: -127..+127 allowing to set specific protocol options. Like for Hubsan to set the video frequency.
+ - Bind: bind a RX/model
+ - Autobind: Yes or No. At the model selection (or power applied to the TX) a bind sequence will be initiated
+ - Range: test range by setting the transmission power to the lowest value
+
+Notes:
+ - Using this solution does not need any modification of the TX since it uses the TX module slot PPM pin for serial transfer.
+ - There are 2 versions of serial protocol either 8 or 16 channels. 16 channels is the latest and only available version going forward. Make sure to use the right version based on your version of er9x/ersky9x.
+ - Channels order is AETR by default but can be changed in _Config.h.
+
+###Telemetry
+
+There are 4 protocols supporting telemetry: Hubsan, DSM, FrSkyD and FrSkyX.
+
+Hubsan displays the battery voltage and TX RSSI.
+
+DSM displays TX RSSI and full telemetry.
+
+FrSkyD displays full telemetry (A0, A1, RX RSSI, TX RSSI and Hub).
+
+FrSkyX displays full telemetry (A1, A2, RX RSSI, TX RSSI and Hub).
+
+### If used in PPM mode
+
+Telemetry is available as a serial 9600 8 n 1 output on the TX pin of the Atmega328p using the FrSky hub format for Hubsan, FrSkyD, FrSkyX and DSM format for DSM2/X.
+
+You can connect it to your TX if it is telemetry enabled or use a bluetooth adapter (HC05/HC06) along with an app on your phone/tablet ([app example](https://play.google.com/store/apps/details?id=biz.onomato.frskydash&hl=fr)) to display telemetry information and setup alerts.
+
+### If used in Serial mode
+Telemetry is built in for er9x and ersky9x TXs.
+
+To enable telemetry on a Turnigy 9X or 9XR you need to modify your TX following one of the Frsky mod like this [one](http://blog.oscarliang.net/turnigy-9x-advance-mod/).
+
+Note: DSM telemetry is not available on er9x due to a lack of flash space.
+
+Enabling telemetry on a 9XR PRO and may be other TXs does not require any hardware modifications. The additional required serial pin is already available on the TX back module pins.
+
+Once the TX is telemetry enabled, it just needs to be configured on the model (see er9x/ersky9x documentation).
+
+##Protocols
+
+###TX ID
+The multiprotocol TX module is using a 32bits ID generated randomly at first power up. This global ID is used by nearly all protocols.
+There are little chances to get a duplicated ID.
+
+For DSM2/X and Devo the CYRF6936 unique manufacturer ID is used.
+
+It's possible to generate a new ID using bind button on the Hubsan protocol during power up.
+
+###Bind
+To bind a model in PPM Mode press the physical bind button, apply power and then release.
+
+In Serial Mode you have 2 options:
+- use the GUI, access the model protocol page and long press on Bind. This operation can be done at anytime.
+- press the physical bind button, apply power and then release. It will request a bind of the first loaded model protocol.
+
+Notes:
+- the physical bind button is only effective at power up. Pressing the button later has no effects.
+- a bind in progress is indicated by the LED fast blinking. Make sure to bind during this period.
+
+###Protocol selection
+
+####Using the dial for PPM input
+PPM is only allowing access to a subset of existing protocols.
+The protocols, subprotocols and all other settings can be personalized by modifying the **_Config.h** file.
+
+The default association dial position / protocol in every release is listed below.
+
+Dial|Protocol|Sub_protocol|RX Num|Power|Auto Bind|Option|RF Module
+----|--------|------------|------|-----|---------|------|---------
+0|Select serial||||||
+1|FLYSKY|Flysky|0|High|No|0|A7105
+2|HUBSAN|-|0|High|No|0|A7105
+3|FRSKYD|-|0|High|No|-41|CC2500
+4|HISKY|Hisky|0|High|No|0|NRF24L01
+5|V2X2|-|0|High|No|0|NRF24L01
+6|DSM|DSM2|0|High|No|6|CYRF6936
+7|DEVO|-|0|High|No|0|CYRF6936
+8|YD717|YD717|0|High|No|0|NRF24L01
+9|KN|WLTOYS|0|High|No|0|NRF24L01
+10|SYMAX|SYMAX|0|High|No|0|NRF24L01
+11|SLT|-|0|High|No|0|NRF24L01
+12|CX10|BLUE|0|High|No|0|NRF24L01
+13|CG023|CG023|0|High|No|0|NRF24L01
+14|BAYANG|-|0|High|No|0|NRF24L01
+15|SYMAX|SYMAX5C|0|High|No|0|NRF24L01
+
+Note:
+- The dial selection must be done before the power is applied.
+
+####Using serial input with er9x/ersky9x
+Serial is allowing access to all existing protocols & sub_protocols listed below.
+
+#####A7105 RF module
+Protocol|Sub_protocol
+--------|------------
+Flysky|
+ |Flysky
+ |V9x9
+ |V6x6
+ |V912
+Hubsan|
+
+#####CC2500 RF module
+Protocol|Sub_protocol
+--------|------------
+FrSkyV|
+FrSkyD|
+FrSkyX|
+ |CH_16
+ |CH_8
+SFHSS|
+
+#####CYRF6936 RF module
+Protocol|Sub_protocol
+--------|------------
+DSM|
+ |DSM2
+ |DSMX
+Devo|
+J6Pro|
+
+#####NRF24L01 RF module
+Protocol|Sub_protocol
+--------|------------
+Hisky|
+ |Hisky
+ |HK310
+V2x2|
+YD717|
+ |YD717
+ |SKYWLKR
+ |SYMAX4
+ |XINXUN
+ |NIHUI
+KN|
+ |WLTOYS
+ |FEILUN
+SymaX|
+ |SYMAX
+ |SYMAX5C
+SLT|
+CX10|
+ |GREEN
+ |BLUE
+ |DM007
+ |Q282
+ |JC3015_1
+ |JC3015_2
+ |MK33041
+ |Q242
+CG023|
+ |CG023
+ |YD829
+ |H8_3D
+Bayang|
+ESky|
+MT99XX|
+ |MT
+ |H7
+ |YZ
+ |LS
+MJXQ|
+ |WLH08
+ |X600
+ |X800
+ |H26D
+ |E010
+Shenqi|
+FY326|
+FQ777|
+ASSAN|
+HONTAI|
+ |HONTAI
+ |JJRCX1
+ |X5C1
+
+Note:
+- The dial should be set to 0 for serial. Which means all protocol selection pins should be left unconnected.
+
+###Protocols details
+**Check the [Protocols_Details.md](./Protocols_Details.md) file for a detailed description of every protocols with channels assignements.**
+
+##Hardware
+
+###RF modules
+Up to 4 RF modules can be installed:
+- [A7105](http://www.banggood.com/XL7105-D03-A7105-Modification-Module-Support-Deviation-Galee-Flysky-p-922603.html) for Flysky, Hubsan
+- [CC2500](http://www.banggood.com/CC2500-PA-LNA-Romote-Wireless-Module-CC2500-SI4432-NRF24L01-p-922595.html) for FrSkyV, FrSkyD, FrSkyX and SFHSS
+- [CYRF6936](http://www.ehirobo.com/walkera-wk-devo-s-mod-devo-8-or-12-to-devo-8s-or-12s-upgrade-module.html) for DSM, DEVO, J6Pro
+- [NRF24L01](http://www.banggood.com/2_4G-NRF24L01-PA-LNA-Wireless-Module-1632mm-Without-Antenna-p-922601.html) for Hisky, V2x2, CX-10, SYMAX and plenty other protocols
+
+RF modules can be installed for protocols need only. Example: if you only need the Hubsan protocol then install only a A7105 on your board.
+
+You also need some [antennas](http://www.banggood.com/2_4GHz-3dBi-RP-SMA-Connector-Booster-Wireless-Antenna-Modem-Router-p-979407.html) and [cables](http://www.banggood.com/10cm-PCI-UFL-IPX-to-RPSMA-Female-Jack-Pigtail-Cable-p-924933.html).
+
+###Board
+The main program is running on an ATMEGA328p running @16MHz and 3.3V.
+An [Arduino pro mini 16Mhz/5V](http://www.banggood.com/Wholesale-New-Ver-Pro-Mini-ATMEGA328-328p-5V-16MHz-Arduino-Compatible-Nano-Size-p-68534.html) powered at 3.3V (yes it works) can be used to build your own Multimodule. An Arduino Mini based on Atmega328p can also be used.
+
+####Using stripboard:
+
+
+
+
+####Using a [home made PCB](http://www.rcgroups.com/forums/showpost.php?p=32645328&postcount=1621):
+
+
+
+
+####Build your own board using [SMD components](http://www.rcgroups.com/forums/showpost.php?p=31064232&postcount=1020) and an [associated PCB v2.3c](https://oshpark.com/shared_projects/MaGYDg0y):
+
+
+
+ 
+
+If you build this PCB v2.3c and want to enable serial mode for er9x/ersky9x, you have to do [this mod](http://static.rcgroups.net/forums/attachments/4/0/8/5/8/3/a8667856-242-multi.jpg).
+
+**[New PCB v2.3d!](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/tree/master/PCB%20v2.3d) available**
+
+Repository includes Kicad files of schematic and pcb. This is a variant of the Multipro V2.3c circuit design. It is basicly the same as the 2.3c board as far as component placement goes. What's changed is the added resistors for the serial protocol and also
+the addition of solder jumpers on the bottom of the board for the various options to connect the TX, RX, and PPM
+lines through them.
+
+
+
+
+[OSH Park link](https://oshpark.com/shared_projects/Ztus1ah8) if you want to order.
+
+####Buy a ready to use and complete Multi module
+
+
+This module can be purchased [here](http://www.banggood.com/2_4G-CC2500-A7105-Flysky-Frsky-Devo-DSM2-Multiprotocol-TX-Module-With-Antenna-p-1048377.html). All the 4 RF modules are already implemented A7105, NRF24L01, CC2500 and CYRF6936. The board is also equiped with an antenna switcher which means only one antenna for all.
+
+**It is highly recommended to update the firmware** of this board as it is distributed with a really old and bugged one. For this you have to solder a 6 pin header (top left) and use an USBASP like explained [below](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#upload-the-code-using-isp-in-system-programming).
+
+If you want to enable serial mode for er9x/ersky9x/Taranis/... and depending on your board revision, you have to do one of these modifications:
+- 1st revision, add 2 resistors as shown here: 
+- 2nd revision, solder pads together as shown:
+
+
+
+Note: if you have the 1st board revision (check pictures above), sometime bind occures at power up even without pressing the bind button or not having an autobind protocol. To solve this issue, replacing the BIND led resistor (on the board back) of 1.2K by a 4.7K.
+
+###Schematic
+
+
+Notes:
+- Attention: All modules are 3.3V only, never power them with 5V.
+- For serial, the dial switch is not needed and the bind button optionnal
+
+###Radio integration
+If you build your own version of the board you can 3D print this case (details [here](http://www.rcgroups.com/forums/showpost.php?p=33294140&postcount=2034)):
+
+
+
+
+If you have the Banggood ready to use board you can 3D print this case (details [here](http://www.rcgroups.com/forums/showpost.php?p=35349049&postcount=3)):
+
+
+
+
+
+##Compilation and programmation
+
+###Toolchain
+Multiprotocol source can be compiled using the Arduino IDE.
+
+The currently supported Arduino version is [1.6.10](https://www.arduino.cc/download_handler.php?f=/arduino-1.6.10-windows.exe).
+
+Download the [zip file](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/archive/master.zip) of this repository, unzip it in a folder, navigate to the Multiprotocol directory and then click on Multiprotocol.ino. The Arduino environment will appear and the Multiprotocol project will be loaded.
+
+**[_Config.h file](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/blob/master/Multiprotocol/_Config.h) must be modified** to select which protocols will be available, change protocols/sub_protocols/settings associated with dial for PPM input, different TX channel orders and timing, Telemetry or not, ...
+This is mandatory since all available protocols will not fit in the ATmega328. You need to pick and choose what you want.
+
+Notes:
+- Make sure to select "Arduino Pro or Pro Mini, ATmega328 (5V,16MHz)" before compiling.
+- Compilation of the code posted here works. So if it doesn't for you this is a problem with your setup, please double check everything before asking.
+- If you want to reduce the code size even further, you can modify the file platform.txt located in "C:\Program Files (x86)\Arduino\hardware\arduino\avr". Set the line "compiler.c.elf.extra_flags=" to "compiler.c.elf.extra_flags=-Wl,--relax".
+
+###Upload the code using ISP (In System Programming)
+It is recommended to use an external programmer like [USBASP](http://www.banggood.com/USBASP-USBISP-3_3-5V-AVR-Downloader-Programmer-With-ATMEGA8-ATMEGA128-p-934425.html) to upload the code in the Atmega328. The programmer should be set to 3.3V or nothing to not supply any over voltage to the multimodule and avoid any damages.
+
+The dial must be set to 0 before flashing!
+
+From the Arduino environment, you can use this shortcut to compile and upload to the module: Skecth->Upload Using Programmer (Ctrl+Maj+U)
+
+To flash the latest provided hex file under [Release](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases), you can use a tool like [AVR Burn-O-Mat](http://avr8-burn-o-mat.aaabbb.de/), set the microcontroller to m328p and flash it.
+
+###Upload the code using FTDI (USB serial to TTL)
+Use this method only for Arduino Pro Mini boards with bootloader.
+
+Use an external FTDI adapter like [this one](http://www.banggood.com/FT232RL-FTDI-USB-To-TTL-Serial-Converter-Adapter-Module-For-Arduino-p-917226.html).
+
+The programmer should be set to 3.3V or nothing to not supply any over voltage to the multimodule and avoid any damages.
+
+From the Arduino environment, you can use Upload button which will compile and upload to the module: Skecth->Upload (Ctrl+U)
+
+To upload the latest provided hex file under [Release](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/releases), you can use a tool like [XLoader](http://russemotto.com/xloader/), set the microcontroller to Atmega328 and upload it.
+
+###Set fuses
+Use a tool like [AVR Burn-O-Mat](http://avr8-burn-o-mat.aaabbb.de/) to set the fuses of the Atmega328 to:
+- Extended Fuse 0x05 (or 0xFD which is the same)
+- High Fuse 0xD2
+- Low Fuse 0xFF
+
+This will make sure your ATMEGA328 is well configured and the global TX ID is not erased at each updates.
+
+##Troubleshooting
+
+###LED status
+- off: program not running or a protocol selected with the associated module not installed.
+- flash(on=0.1s,off=1s): invalid protocol selected (excluded from compilation or invalid protocol number)
+- slow blink(on=0.5s,off=0.5s): serial has been selected but no valid signal has been seen on the RX pin.
+- fast blink(on=0.1s,off=0.1s): bind in progress.
+- on: normal operation.
+
+###Protocol selection
+####Input Mode - PPM
+- The protocol/mode selection must be done before the power is applied.
+- Connect 1 to 4 of the selection protocol pins to GND.
+
+####Input Mode - Serial
+- Make sure you have done the mods to the v2.3c PCB by adding the 2.2k and 470 ohm resistors as indicated in the [Board section] (https://github.com/pascallanger/DIY-Multiprotocol-TX-Module#board).
+- Leave all 4 selection pins unconnected.
+
+###Bind
+Make sure to follow this procedure: press the bind button, apply power and then release it after 1sec. The LED should be blinking fast indicating a bind status and then fixed on when the bind period is over. It's normal that the LED turns off when you press the bind button, this behavior is not controlled by the Atmega328.
+For serial, the preffered method is to bind via the GUI protocol page.
+
+If your module is always/sometime binding at power up without pressing the button:
+ - Arduino Pro Mini with an external status LED: to work around this issue connect a 10K resistor between D13 and 3.3V.
+ - 4in1 module V1 (check 4in1 pictures): to solve this issue, replacing the BIND led resistor (on the board back) of 1.2K by a 4.7K.
+
+###Report issues
+You can report your problem using the [GitHub issue](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/issues) system or go to the [Main thread on RCGROUPS](http://www.rcgroups.com/forums/showthread.php?t=2165676) to ask your question.
+Please provide the following information:
+- Multiprotocol code version
+- TX type
+- Using PPM or Serial, if using er9x or ersky9x the version in use
+- Different led status (multimodule and model)
+- Explanation of the behavior and reproduction steps
diff --git a/docs/Transmitters.md b/docs/Transmitters.md
new file mode 100644
index 0000000..8cffe80
--- /dev/null
+++ b/docs/Transmitters.md
@@ -0,0 +1,76 @@
+# Compatible Transmitters
+
+Any Tx that provides a PPM output (like a trainer port, or a RF module bay) is compatible with the DIY Multiprotocol module. In practice, most of the documentation on this site is focused on building modules that slip into your transmitter’s module bay.
+{insert picures of different modules}
+
+There are two different options for the interface between the Mulitprotocol Module and the transmitter: PPM and Serial. The considerations are different for each.
+- **PPM** is more generic, easy to implement and will work with most transmitters.
+- **Serial** requires custom firmware on the transmitter but brings added functionality including telemetry and protocol selection through the Tx interface
+
+##PPM
+The DIY Mulitprotocol module supports industry standard PPM interface that works with all transmitters with either a module bay, and/or a trainer port. Even the older 72MHz FM radios support this standard.
+
+When using the standard PPM Tx output, the protocol selection is achieved through a 16 position rotary switch on the module. This enables 15 protocol/sub-protocol/options combinations to be selected. Binding is achieved by pressing a bind button on the back of the module (see picture below)
+
+
+
+Since the module supports literally hundreds of protocol/sub-protocol/options combinations, you must select which of these will map to the 15 positions on the switch. Refer to the [Compiling and Programming](Compiling.md) page for information on how to do his.
+
+Telemetry is available as a serial output on the TX pin of the Atmega328p using the FrSky hub format for Hubsan, FrSkyD, FrSkyX and DSM format for DSM2/X. The serial paramets depends on the protocol:
+
+Protocol|Serial Parameters
+--------|-----------------
+Hubsan|9600bps 8n1
+FrSkyD|9600bps 8n1
+FrSkyX|57,600bps 8n1
+DSM2/X|125,000bps 8n1
+
+
+You can connect it to your TX if it is telemetry enabled or use a bluetooth adapter to send it to a tablet/phone. See [Advanced Topics - Bluetooth Telemetry](Advanced_Bluetooth_Telemetry.md)
+
+For transmitter setup using the PPM protocol go to the [PPM Setup page](PPM_Setup.md)
+
+##Serial
+Transmitters that run er9X, erSky9X or OpenTx firmwares - like the FrSky Taranis and FlySky TH9X/Turnigy 9X/R family of transmitters - have the option of using a fast, two-way serial, communication protocol between the Tx and the DIY Multiprotocol module. Using this serial communication protocol has some significant advantages:
+
+1. selecting the specific radio protocol (e.g. DSM) and the sub protocol (e.g. DSMX) directly in the menu system of the Tx (see the picture below)
+1. binding through the menu on the Tx
+1. range checking through the menu on the Tx
+1. enabling two-way telemetry for telemetry capable receivers and protocols.
+
+
+
+
+This serial protocol does not require any hardware modifications, but **will** require updating the firmware on your radio.
+
+To enable serial telemetry **may** require modifications to your Tx. See the table below.
+
+Transmitters and firmware combinations that support the Serial protocol are:
+
+
+
+Transmitter|Firmware Options|Telemetry Enabled
+:----------|:---------------|:----------------
+[FrSky Taranis/Plus/9XE](Tx-Taranis.md)| [erSky9x](http://www.er9x.com), [OpenTx 2.1.8 Multi](http://plaisthos.de/opentx/)|Yes - native
+[Turnigy 9X/9xR](Tx-FlyskyTH9X.md)|[er9x](http://www.er9x.com)|[Mod required](http://blog.oscarliang.net/turnigy-9x-advance-mod/), No DSM telem
+[Turnigy 9XR-Pro](Tx-Taranis.md)|[erSky9x](http://www.er9x.com)|Yes - native
+[FrSky TH9x](Tx-FlyskyTH9X.md)|[er9x](http://www.er9x.com) |[Mod required](http://blog.oscarliang.net/turnigy-9x-advance-mod/), No DSM telem
+SKY board|[erSky9x](http://www.er9x.com)|Yes - native
+AR9X board|[erSky9x](http://www.er9x.com)|Yes - native
+9Xtreme board|[erSky9x](http://www.er9x.com)|Yes - native
+AR9X UNI board|[erSky9x](http://www.er9x.com)|Yes - native
+
+Click on your transmitter above to view specific setup instructions.
+
+Other Notes:
+- er9X and erSky9X firmware already supports Multiprotocol Module as a standard feature. At time of writing it looks like that the next major release of OpenTx - OpenTx 2.2 - will have DIY Mulitprotocol support as a standard feature.
+
+- Owners of Walkera Devo transmitters should look at the [Deviation-Tx](http://www.deviationtx.com) project for how to achieve the same end goal with your transmitters.
+
+- To enable telemetry on a Turnigy 9X or 9XR you need to modify your TX following one of the Frsky mod like this [one](http://blog.oscarliang.net/turnigy-9x-advance-mod/).
+
+- DSM telemetry is not available on er9x due to a lack of flash space.
+
+- Enabling telemetry on a 9XR PRO and may be other TXs does not require any hardware modifications. The additional required serial pin is already available on the TX back module pins.
+
+- Once the TX is telemetry enabled, it just needs to be configured on the model (see er9x/ersky9x documentation).
diff --git a/docs/Troubleshooting.md b/docs/Troubleshooting.md
new file mode 100644
index 0000000..85e3508
--- /dev/null
+++ b/docs/Troubleshooting.md
@@ -0,0 +1,40 @@
+# Troubleshooting
+
+##LED status
+###Green LED
+- Off: no power to the module
+- On: module is powered up
+
+###Red LED (bind LED)
+- Off: program not running or a protocol selected with the associated module not installed
+- Flash(on=0.1s,off=1s): invalid protocol selected (excluded from compilation or invalid protocol number)
+- Fast blink(on=0.1s,off=0.1s): bind in progress
+- Slow blink(on=0.5s,off=0.5s): serial has been selected but no valid signal has been seen on the RX pin.
+- On: Module is in normal operation mode (transmitting control signals).
+
+##Protocol selection
+###Input Mode - PPM
+- The protocol/mode selection must be done before the power is applied
+- Check the Green LED to see when power is applied. Often power is not applied to the module until the transmitter has performed safety checks (like switch and throttle position settings)
+- Check that at least one of the protocal selection to GND.
+
+###Input Mode - Serial
+- Make sure you have done the mods to the v2.3c PCB by adding the 2.2k and 470 ohm resistors as indicated in the [hardware page for your board] (Hardware.md).
+- Protocol selection dial must be in the 0 position or leave all 4 selection pins unconnected.
+
+##Bind
+Make sure to follow this procedure: press the bind button, apply power and then release after the red LED starts flashing. The LED should be blinking fast indicating a bind status and then fixed on when the bind period is over. It's normal that the LED turns off when you press the bind button, this behavior is not controlled by the Atmega328.
+For serial, the preffered method is to bind via the GUI protocol page.
+
+If your module is always/sometime binding at power up without pressing the button:
+ - Arduino Pro Mini with an external status LED: to work around this issue connect a 10K resistor between D13 and 3.3V.
+ - 4in1 module V1 (check 4in1 pictures): to solve this issue, replacing the BIND led resistor (on the board back) of 1.2K by a 4.7K.
+
+##Report issues
+You can report your problem using the [GitHub issue](https://github.com/pascallanger/DIY-Multiprotocol-TX-Module/issues) system or go to the [Main thread on RCGROUPS](http://www.rcgroups.com/forums/showthread.php?t=2165676) to ask your question.
+Please provide the following information:
+- Multiprotocol code version
+- TX type
+- Using PPM or Serial, if using er9x or ersky9x the version in use
+- Different led status (multimodule and model)
+- Explanation of the behavior and reproduction steps
diff --git a/docs/Tx-FlyskyTH9X.md b/docs/Tx-FlyskyTH9X.md
new file mode 100644
index 0000000..caa64e3
--- /dev/null
+++ b/docs/Tx-FlyskyTH9X.md
@@ -0,0 +1,38 @@
+#Flysky TH9X family of transmitters
+This page is relevant to the following transmitters:
+* FlySky TH9X
+* Turnigy 9X, Turnigy 9XR
+* EURGLE
+
+
+## Features
+The Multiprotocol module can be used in the Flysky family of transmitters in either PPM mode or in Serial mode. To operate in Serial mode, a version of er9X supporting the Multiprotocol Module must be installed on the Tx.
+
+## PPM Mode
+Please refer to the [PPM Setup](PPM_Setup.md) page.
+
+
+## Serial Mode
+Serial mode is only supported by the er9X firmware. Loading this firmware is beyond the scope of this document but it is well covered in tutorial and video tutorials online. {mikeb - any favourite tutorials or video tuts that I an add here}
+###Enabling Serial Mode
+1. Confirm that the Multiprotocol Module has the required physical connections between the pins on the back of the Tx and the ATMega328 microprocessor. This may require some soldering and depends on which version of the DIY Multiprotocol module you have. Check out your module’s hardware page under the section [Enabling your module for Serial{gvzb19 to insert}](### insert link) for details.
+1. Plug in your DIY Multiprotocol module into the transmitter module bay. If you have a rotary protocol selection switch, turn the switch to position 0 to put the unit into Serial mode.
+1. Ensure throttle is down and all switches are in the start position and power up the Tx. The red LED on the DIY Multiprotocol module should be flashing with a period of about 1 second indicating that it has not established a valid serial link with the Tx. This is expected as we have not set up the Tx yet.
+1. Create a new model
+1. In the Model Settings menu scroll down to change the RF settings to MULTI {mikeb - can you write this line }
+1. The red LED on the Multiprotocol module should briefly flash and then go off. This confirms that the DIY Multiprotocol module has established serial communication with the Tx. If the red LED on the module continues to flash at a period of about 1 seconds then it signals that serial communication has not been established. Check your settings under the model menu as described above and check that the protocol selection switch on the module is at 0 (enable Serial mode). If there is still no communication, power down and power up the Tx. Finally check that you have correctly enabled your module for serial as described on the hardware page for your module under the heading [Enabling your module for Serial{gvzb19 to insert}](### insert link)
+
+###Protocol Selection in Serial mode
+To select the protocol:
+ 1. In the Model Setting menu, scroll through the available options under the MULTI option {mikeb to confirm}.
+ 1. Depending on which protocol you have selected you may be required to select a sup-protocol and options. For example, the FrSky protocol has three sub-protocols FrSky_V, FrSky_D and FrSky_X. In some cases the sub-protocols have options that could specify the number of channels, packet frame rate or fine frequency tuning. Check out the [Protocol Details](Protocol_Details.md) page for detailed information and suggestions regarding the sub-protocols and options. The picture below shows the settings in the erSky Model Setup menu for FrSkyX subprotocol with {mike to insert} options:
+ {mikeb to send simple picture}
+
+###Binding in Serial mode
+1. Switch on the model or put the receiver into bind mode
+1. On the transmitter go to the Model Settings menu and scroll down to the [Bind] menu option and press Enter.
+1. Press Enter again to exit Bind mode
+
+For many consumer models consider checking the Autobind option. This will initiate the bind sequence as soon as the module is powered up by the transmitter.
+
+If you are struggling to get a bind please see the [Getting the bind timing right page](Bind_Timing.md)
diff --git a/docs/Tx-NewTrasmitter.md b/docs/Tx-NewTrasmitter.md
new file mode 100644
index 0000000..10d7fa8
--- /dev/null
+++ b/docs/Tx-NewTrasmitter.md
@@ -0,0 +1,43 @@
+# Transmitter Setup
+Describe the transmitters this applies to.
+
+Describe the firmware required for the transmitters. The transmitters covered here are:
+1. [tx1](###)
+1. [tx2](###)
+
+Does it work in PPM and/or Serial mode?
+
+## PPM Mode
+Please refer to the [PPM Setup](PPM_Setup.md) page.
+
+
+##Serial mode
+###Enabling Serial Mode
+To operate in serial mode, you need one of these firmwares:
+1. OpenTx supporting the DIY Multiprotocol mdule (2.18 Multi or 2.2)
+1. erSky9x
+
+Check and upload a supported firmware. The latest available version at time of writing are:
+- OpenTx 2.1.8 Multi and the hex files are available [here](http://plaisthos.de/opentx/)
+- erSky9x Revision 218 and the hex files are available [here](http://www.er9x.com).
+
+Tutorials for uploading new firmware using the SD Card are available [here](http://www.dronetrest.com/t/how-to-upgrade-firmware-for-frsky-taranis-x9d/959) or the CompanionTx software (recommended) are available [here](http://open-txu.org/home/undergraduate-courses/fund-of-opentx/part-2-flashing-opentx/).
+
+**Note: in the tutorials substitute the shown firmwares with the fimware donwloaded from the links above.**
+
+First confirm that the DIY Multiprotocol module has the required physical connections between the pins on the back of the Tx and the ATMega328 microprocessor. This may require some soldering and depends on which version of the DIY Multiprotocol module you have. Check out this [Enabling Your Module for Serial] page for details.
+
+Plug in your DIY Multiprotocol module into the Taranis module bay. If you have a rotary protocol selection switch, turn the switch to position 0 to put the unit into Serial mode. Ensure throttle is down and all switches are in the start position and power up the Taranis. The red LED on the DIY Multiprotocol module should be flashing with a period of about 1s indicating that it has not established a valid serial link with the Tx. This is expected as we have not set up the Tx yet.
+
+Create a new model (make sure channel order is AETR) and on the first Model Settings page scroll down to disable the internal RF and enable the external RF by selecting MULTI as the external RF. Your Taranis settings should look like this: {insert picture of Taranis screen showing external RF settings}
+
+The Red LED on the DIY Multiprotocol module should briefly flash and then go off. This confirms that the DIY Multiprotocol module has established serial communication with the Tx. If the red LED on the module continues to flash at a period of about 1s then it signals that serial communication has not been established. Check your settings under the model menu as described above and check that the protocol selection switch on the module is at 0 (zero). If there is still no communication, power down and power up the Tx. Finally check that you have correctly enabled your module for serial as described here [Enabling Your Module for Serial]
+###Protocol Selection in Serial mode
+To select the protocol, scroll through the available options under the Model Settings menu. Depending on which protocol you have selected you may be required to select a sup-protocol and options. For example, the DSM protocol has two sub-protocols DSM2 and DSMX. Each of these sub-protocols have options that specify the number of channels and the packet frame rate.
+
+The following picture shows DSM – DSMX – Option 6 (6 channels and 11ms frame rate). Check out the [Available Protocols] page for detailed information and suggestions regarding the sub-protocols and options.
+###Binding in Serial mode
+1. Switch on the model or put the receiver into bind mode
+1. On the transmitter go to the Model Settings menu and scroll down to the [Bind] menu option.
+
+
diff --git a/docs/Tx-Taranis.md b/docs/Tx-Taranis.md
new file mode 100644
index 0000000..4562576
--- /dev/null
+++ b/docs/Tx-Taranis.md
@@ -0,0 +1,49 @@
+# FrSky Taranis Setup
+This page contains setup instructions for the FrSky Taranis family of transmitters. These include the Trananis X9D, Taranis X9D Plus and Taranis X9E. It may also be relevant to the following transmitters: Turnigy 9XR Pro, Sky board-based, AR9X board-based, 9Xtreme board-based and AR9X Uni board-based.
+
+
+
+
+The instructions below are relevant to the following firmwares:
+ 1. Taranis with erSky9X available [here](http://www.er9x.com)
+ 1. Taranis with OpenTx available [here](http://plaisthos.de/opentx/)
+
+
+The DIY Multiprotocol module can be used with all transmitters and firmwares in PPM mode. Taranis transmitters running erSky9X or OpenTX (Version 2.1.8 Multi or Version 2.2) fully support Serial mode.
+## PPM Mode
+Please refer to the [PPM Setup](PPM_Setup.md) page.
+
+##Serial mode
+###Enabling Serial Mode
+To operate in serial mode, you need one of these firmwares:
+ 1. erSky9x
+ 1. OpenTx supporting the DIY Multiprotocol Module (Version 2.18 Multi or Version 2.2)
+
+Check and upload a supported firmware. The latest available version at time of writing are:
+ - erSky9x Revision 218 and the hex files are available [here](http://www.er9x.com).
+ - OpenTx 2.1.8 Multi and the hex files are available [here](http://plaisthos.de/opentx/)
+
+Tutorials for uploading new firmware using the SD Card are available [here](http://www.dronetrest.com/t/how-to-upgrade-firmware-for-frsky-taranis-x9d/959) or the CompanionTx or eepe software (recommended) are available [here](http://open-txu.org/home/undergraduate-courses/fund-of-opentx/part-2-flashing-opentx/).
+
+**Note: In these tutorials, substitute the firmwares from the links to the supported firmwares above.**
+
+First, confirm that the DIY Multiprotocol module has the required physical connections between the pins on the back of the Tx and the ATMega328 microprocessor. This may require some soldering and depends on which version of the DIY Multiprotocol module you have. Check out the specific pages for your module hardware (under the section "Enabling Serial") linked [here](Hardware.md) for details.
+
+ 1. Plug in your DIY Multiprotocol module into the Taranis module bay.
+ 2. If you have a rotary protocol selection switch, turn the switch to position 0 to put the unit into Serial mode.
+ 2. Ensure throttle is down and all switches are in the start position and power up the Taranis. The red LED on the DIY Multiprotocol module should be flashing with a period of about 1s indicating that it has not established a valid serial link with the Tx. This is expected as we have not set up the Tx yet.
+ 3. Create a new model (make sure channel order is AETR) and on the first Model Settings page scroll down to disable the internal RF and enable the external RF by selecting MULTI as the external RF. Your Taranis settings should look like this: {insert picture of Taranis screen showing external RF settings} The Red LED on the DIY Multiprotocol module should briefly flash and then go off. This confirms that the DIY Multiprotocol module has established serial communication with the Tx.
+ 4. If the red LED on the module continues to flash at a period of about 1s then it signals that serial communication has not been established. Check your settings under the model menu as described above and check that the protocol selection switch on the module is at 0 (zero). If there is still no communication, power down and power up the Tx. Finally check that you have correctly enabled your module for serial as described in specific pages for your module hardware (under the section "Enabling Serial") linked [here](Hardware.md)
+
+###Protocol Selection in Serial mode
+To select the protocol, scroll through the available options under the Model Settings menu. Depending on which protocol you have selected you may be required to select a sup-protocol and options. For example, the DSM protocol has two sub-protocols DSM2 and DSMX. Each of these sub-protocols have options that specify the number of channels and the packet frame rate.
+
+The following picture shows DSM – DSMX – Option 6 (6 channels and 11ms frame rate). Check out the [Protocol Details](Protocol_Details.md) page for detailed information and suggestions regarding the sub-protocols and options.
+###Binding in Serial mode
+1. Switch on the model or put the receiver into bind mode
+1. On the transmitter go to the Model Settings menu and scroll down to the [Bind] menu option and press Enter.
+1. Press Enter again to exit Bind mode
+
+For many consumer models consider checking the Autobind option. This will initiate the bind sequence as soon as the module is powered up by the transmitter.
+
+If you are struggling to get a bind please see the [Getting the bind timing right page](Bind_Timing.md)
diff --git a/docs/images/4-in-1_Module_BG.jpeg b/docs/images/4-in-1_Module_BG.jpeg
new file mode 100644
index 0000000..7e05cdb
Binary files /dev/null and b/docs/images/4-in-1_Module_BG.jpeg differ
diff --git a/docs/images/4-in-1_Module_BG.png b/docs/images/4-in-1_Module_BG.png
new file mode 100644
index 0000000..690bd2b
Binary files /dev/null and b/docs/images/4-in-1_Module_BG.png differ
diff --git a/docs/images/4-in-1_Module_BG_SerialJumpers.jpeg b/docs/images/4-in-1_Module_BG_SerialJumpers.jpeg
new file mode 100644
index 0000000..9bfd581
Binary files /dev/null and b/docs/images/4-in-1_Module_BG_SerialJumpers.jpeg differ
diff --git a/docs/images/4-in-1_Module_PPM_Controls.jpg b/docs/images/4-in-1_Module_PPM_Controls.jpg
new file mode 100644
index 0000000..3369333
Binary files /dev/null and b/docs/images/4-in-1_Module_PPM_Controls.jpg differ
diff --git a/docs/images/Arduino.png b/docs/images/Arduino.png
new file mode 100644
index 0000000..0ae803f
Binary files /dev/null and b/docs/images/Arduino.png differ
diff --git a/docs/images/Board_PCB_STM32.jpeg b/docs/images/Board_PCB_STM32.jpeg
new file mode 100644
index 0000000..039fd7f
Binary files /dev/null and b/docs/images/Board_PCB_STM32.jpeg differ
diff --git a/docs/images/DIY_Mulitprotocol_Module_Schematic.jpeg b/docs/images/DIY_Mulitprotocol_Module_Schematic.jpeg
new file mode 100644
index 0000000..151492a
Binary files /dev/null and b/docs/images/DIY_Mulitprotocol_Module_Schematic.jpeg differ
diff --git a/docs/images/DIY_Multiprotocol_Module_Overview.png b/docs/images/DIY_Multiprotocol_Module_Overview.png
new file mode 100644
index 0000000..83b0ab0
Binary files /dev/null and b/docs/images/DIY_Multiprotocol_Module_Overview.png differ
diff --git a/docs/images/FTDI_Adapter.jpeg b/docs/images/FTDI_Adapter.jpeg
new file mode 100644
index 0000000..d29d25f
Binary files /dev/null and b/docs/images/FTDI_Adapter.jpeg differ
diff --git a/docs/images/FTDI_Cable.jpeg b/docs/images/FTDI_Cable.jpeg
new file mode 100644
index 0000000..6becf40
Binary files /dev/null and b/docs/images/FTDI_Cable.jpeg differ
diff --git a/docs/images/MPTM_PCB_3.2d.png b/docs/images/MPTM_PCB_3.2d.png
new file mode 100644
index 0000000..7e89de0
Binary files /dev/null and b/docs/images/MPTM_PCB_3.2d.png differ
diff --git a/docs/images/MPTM_with_RF_modules.jpeg b/docs/images/MPTM_with_RF_modules.jpeg
new file mode 100644
index 0000000..25da30c
Binary files /dev/null and b/docs/images/MPTM_with_RF_modules.jpeg differ
diff --git a/docs/images/Module_perfboard1.jpeg b/docs/images/Module_perfboard1.jpeg
new file mode 100644
index 0000000..3c54b11
Binary files /dev/null and b/docs/images/Module_perfboard1.jpeg differ
diff --git a/docs/images/Module_perfboard2.jpeg b/docs/images/Module_perfboard2.jpeg
new file mode 100644
index 0000000..e9510ed
Binary files /dev/null and b/docs/images/Module_perfboard2.jpeg differ
diff --git a/docs/images/Multi_4-in-1_RF_module.jpg b/docs/images/Multi_4-in-1_RF_module.jpg
new file mode 100644
index 0000000..bf61c81
Binary files /dev/null and b/docs/images/Multi_4-in-1_RF_module.jpg differ
diff --git a/docs/images/Multiprotocol_3.2.jpeg b/docs/images/Multiprotocol_3.2.jpeg
new file mode 100644
index 0000000..a1e4171
Binary files /dev/null and b/docs/images/Multiprotocol_3.2.jpeg differ
diff --git a/docs/images/OpenTx_Multi_Menu.jpg b/docs/images/OpenTx_Multi_Menu.jpg
new file mode 100644
index 0000000..895a765
Binary files /dev/null and b/docs/images/OpenTx_Multi_Menu.jpg differ
diff --git a/docs/images/OrangeRx_Module.jpg b/docs/images/OrangeRx_Module.jpg
new file mode 100644
index 0000000..4935ad1
Binary files /dev/null and b/docs/images/OrangeRx_Module.jpg differ
diff --git a/docs/images/USBasp_Programmer.jpeg b/docs/images/USBasp_Programmer.jpeg
new file mode 100644
index 0000000..58c53d0
Binary files /dev/null and b/docs/images/USBasp_Programmer.jpeg differ
diff --git a/docs/images/V1_Serial_Enable.jpeg b/docs/images/V1_Serial_Enable.jpeg
new file mode 100644
index 0000000..ecd5a15
Binary files /dev/null and b/docs/images/V1_Serial_Enable.jpeg differ
diff --git a/docs/images/V2_Serial_Enable.jpeg b/docs/images/V2_Serial_Enable.jpeg
new file mode 100644
index 0000000..64ce3fc
Binary files /dev/null and b/docs/images/V2_Serial_Enable.jpeg differ
diff --git a/docs/images/er9X_Multi_Menu.jpg b/docs/images/er9X_Multi_Menu.jpg
new file mode 100644
index 0000000..1d48fba
Binary files /dev/null and b/docs/images/er9X_Multi_Menu.jpg differ
diff --git a/docs/images/test b/docs/images/test
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/docs/images/test
@@ -0,0 +1 @@
+