diff --git a/Multiprotocol/A7105_SPI.ino b/Multiprotocol/A7105_SPI.ino index 1a25160..53c0f1c 100644 --- a/Multiprotocol/A7105_SPI.ino +++ b/Multiprotocol/A7105_SPI.ino @@ -197,6 +197,11 @@ void A7105_AdjustLOBaseFreq(uint8_t cmd) offset=(int16_t)FORCE_FLYZONE_TUNING; #endif break; + case PROTO_PELIKAN: + #ifdef FORCE_PELIKAN_TUNING + offset=(int16_t)FORCE_PELIKAN_TUNING; + #endif + break; case PROTO_AFHDS2A: case PROTO_AFHDS2A_RX: #ifdef FORCE_AFHDS2A_TUNING @@ -219,12 +224,22 @@ void A7105_AdjustLOBaseFreq(uint8_t cmd) offset<<=1; if(offset < 0) { - bip = 0x4a; // 2368 MHz + #ifdef PROTO_PELIKAN + if(protocol==PROTO_PELIKAN) + bip = 0x63; + else + #endif + bip = 0x4a; // 2368 MHz bfp = 0xffff + offset; } else { - bip = 0x4b; // 2400 MHz (default) + #ifdef PROTO_PELIKAN + if(protocol==PROTO_PELIKAN) + bip = 0x64; // default + else + #endif + bip = 0x4b; // 2400 MHz (default) bfp = offset; } A7105_WriteReg( A7105_11_PLL_III, bip); @@ -297,7 +312,7 @@ const uint8_t PROGMEM HUBSAN_A7105_regs[] = { const uint8_t PROGMEM PELIKAN_A7105_regs[] = { 0xff, 0x42, 0x00, 0x0F, 0x00, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x01, 0x21, 0xb7, 0x01, 0x50, // 00 - 0f 0x96, 0x64, 0x00, 0x02, 0x16, 0x2f, 0x12, 0x00, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x32, 0xc3, 0x07, // 10 - 1f - 0x16, 0x00, 0x00, 0xff, 0x00, 0x00, 0x3b, 0x00, 0x1b, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f + 0x16, 0x00, 0x00, 0xff, 0x00, 0x00, 0x3b, 0x00, 0x1f, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f 0x01, 0x0f // 30 - 31 }; #endif @@ -416,11 +431,12 @@ void A7105_Init(void) } A7105_WriteReg(A7105_25_VCO_SBCAL_I,vco_calibration1); //Reset VCO Band calibration } - A7105_SetTxRxMode(TX_EN); A7105_SetPower(); - A7105_AdjustLOBaseFreq(0); + #ifdef USE_A7105_CH15_TUNING + A7105_AdjustLOBaseFreq(0); + #endif A7105_Strobe(A7105_STANDBY); } diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index b2deb3b..30afc70 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 0 -#define VERSION_PATCH_LEVEL 51 +#define VERSION_PATCH_LEVEL 52 //****************** // Protocols diff --git a/Multiprotocol/Multiprotocol.ino b/Multiprotocol/Multiprotocol.ino index 583d4a7..b09b472 100644 --- a/Multiprotocol/Multiprotocol.ino +++ b/Multiprotocol/Multiprotocol.ino @@ -179,7 +179,7 @@ volatile uint8_t rx_idx=0, rx_len=0; // Telemetry -#define TELEMETRY_BUFFER_SIZE 30 +#define TELEMETRY_BUFFER_SIZE 32 uint8_t packet_in[TELEMETRY_BUFFER_SIZE];//telemetry receiving packets #if defined(TELEMETRY) #ifdef MULTI_SYNC diff --git a/Multiprotocol/Validate.h b/Multiprotocol/Validate.h index 492423d..4473be1 100644 --- a/Multiprotocol/Validate.h +++ b/Multiprotocol/Validate.h @@ -130,6 +130,11 @@ #error "The Flyzone forced frequency tuning value is outside of the range -300..300." #endif #endif +#ifdef FORCE_PELIKAN_TUNING + #if ( FORCE_PELIKAN_TUNING < -300 ) || ( FORCE_PELIKAN_TUNING > 300 ) + #error "The Pelikan forced frequency tuning value is outside of the range -300..300." + #endif +#endif #ifdef FORCE_HUBSAN_TUNING #if ( FORCE_HUBSAN_TUNING < -300 ) || ( FORCE_HUBSAN_TUNING > 300 ) #error "The Hubsan forced frequency tuning value is outside of the range -300..300." @@ -146,6 +151,9 @@ #ifndef FORCE_FLYZONE_TUNING #define FORCE_FLYZONE_TUNING 0 #endif + #ifndef FORCE_PELIKAN_TUNING + #define FORCE_PELIKAN_TUNING 0 + #endif #ifndef FORCE_HUBSAN_TUNING #define FORCE_HUBSAN_TUNING 0 #endif diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index af67ea9..6c5f011 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -113,6 +113,7 @@ //#define FORCE_BUGS_TUNING 0 //#define FORCE_FLYSKY_TUNING 0 //#define FORCE_FLYZONE_TUNING 0 +//#define FORCE_PELIKAN_TUNING 0 //#define FORCE_HUBSAN_TUNING 0 /** CYRF6936 Fine Frequency Tuning **/