diff --git a/Multiprotocol/MT99xx_ccnrf.ino b/Multiprotocol/MT99xx_ccnrf.ino index d0d886e41..471efa5ce 100644 --- a/Multiprotocol/MT99xx_ccnrf.ino +++ b/Multiprotocol/MT99xx_ccnrf.ino @@ -12,7 +12,7 @@ You should have received a copy of the GNU General Public License along with Multiprotocol. If not, see . */ -// compatible with MT99xx, Eachine H7, Yi Zhan i6S and LS114/124 +// compatible with MT99xx, Eachine H7, Yi Zhan i6S, LS114/124, QF009 Su35 // Last sync with Goebish mt99xx_nrf24l01.c dated 2016-01-29 #if defined(MT99XX_CCNRF_INO) @@ -96,6 +96,16 @@ enum{ FLAG_PA18_FLIP = 0x80, }; +enum{ + // flags going to packet[6] (QF009 Su35) + FLAG_SU35_6G = 0x00, + FLAG_SU35_3D = 0x40, + FLAG_SU35_HIRATE = 0x01, + FLAG_SU35_LED = 0x02, + FLAG_SU35_FLASH = 0x04, + FLAG_SU35_INVERT = 0x08, +}; + const uint8_t h7_mys_byte[] = { 0x01, 0x11, 0x02, 0x12, 0x03, 0x13, 0x04, 0x14, 0x05, 0x15, 0x06, 0x16, 0x07, 0x17, 0x00, 0x10 @@ -271,6 +281,14 @@ static void __attribute__((unused)) MT99XX_send_packet() if(hopping_frequency_no == 0) packet[7] ^= 0x40; break; + case SU35+8: + packet[6] = FLAG_SU35_6G + | GET_FLAG( CH5_SW, FLAG_SU35_3D ) + | GET_FLAG( !CH6_SW, FLAG_SU35_LED ) + | GET_FLAG( CH7_SW, FLAG_SU35_FLASH ) + | GET_FLAG( CH8_SW, FLAG_SU35_INVERT ) + | GET_FLAG( CH9_SW, FLAG_SU35_HIRATE ); + break; } uint8_t result=crc8; for(uint8_t i=0; i<8; i++) diff --git a/Multiprotocol/Multi.txt b/Multiprotocol/Multi.txt index 4db1a401e..86c85756d 100644 --- a/Multiprotocol/Multi.txt +++ b/Multiprotocol/Multi.txt @@ -88,7 +88,7 @@ 89,Losi 90,MouldKg,Analog,Digit 91,Xerall -92,MT99xx,PA18 +92,MT99xx,PA18,SU35 93,Kyosho2,KT-17 94,Scorpio 95,BlueFly diff --git a/Multiprotocol/Multi_Protos.ino b/Multiprotocol/Multi_Protos.ino index a8cc6a241..12d9dc32e 100644 --- a/Multiprotocol/Multi_Protos.ino +++ b/Multiprotocol/Multi_Protos.ino @@ -136,7 +136,7 @@ const char STR_SUBTYPE_CX10[] = "\x07""Green\0 ""Blue\0 ""DM007\0 ""-\0 const char STR_SUBTYPE_CG023[] = "\x05""Std\0 ""YD829"; const char STR_SUBTYPE_BAYANG[] = "\x07""Std\0 ""H8S3D\0 ""X16 AH\0""IRDrone""DHD D4\0""QX100\0 "; const char STR_SUBTYPE_MT99[] = "\x06""MT99\0 ""H7\0 ""YZ\0 ""LS\0 ""FY805\0""A180\0 ""Dragon""F949G\0"; -const char STR_SUBTYPE_MT992[] = "\x04""PA18"; +const char STR_SUBTYPE_MT992[] = "\x04""PA18""SU35"; const char STR_SUBTYPE_MJXQ[] = "\x07""WLH08\0 ""X600\0 ""X800\0 ""H26D\0 ""E010\0 ""H26WH\0 ""Phoenix"; const char STR_SUBTYPE_FY326[] = "\x05""Std\0 ""FY319"; const char STR_SUBTYPE_HONTAI[] = "\x07""Std\0 ""JJRC X1""X5C1\0 ""FQ_951"; @@ -413,7 +413,7 @@ const mm_protocol_definition multi_protocols[] = { {PROTO_MT99XX, STR_MT99XX, STR_SUBTYPE_MT99, 8, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback }, #endif #if defined(MT99XX_CCNRF_INO) - {PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 1, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback }, + {PROTO_MT99XX2, STR_MT99XX2, STR_SUBTYPE_MT992, 2, OPTION_NONE, 0, 0, SW_NRF, MT99XX_init, MT99XX_callback }, #endif #if defined(NCC1701_NRF24L01_INO) {PROTO_NCC1701, STR_NCC1701, NO_SUBTYPE, 0, OPTION_NONE, 0, 0, SW_NRF, NCC_init, NCC_callback }, diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 943b107ad..666ffcb10 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -254,7 +254,8 @@ enum MT99XX }; enum MT99XX2 { - PA18 = 0, + PA18 = 0, + SU35 = 1, }; enum MJXQ { diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 6486d429a..8c2d57ca4 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -777,6 +777,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= { F949G PROTO_MT99XX2 PA18 + SU35 PROTO_NCC1701 NONE PROTO_OMP