diff --git a/Lua_scripts/MultiChan.txt b/Lua_scripts/MultiChan.txt index f0e0ee0b0..cc638babd 100644 --- a/Lua_scripts/MultiChan.txt +++ b/Lua_scripts/MultiChan.txt @@ -90,6 +90,7 @@ 58,0,FX,816,1 58,1,FX,620,1 58,2,FX,9630,1,Rate,Gyro,TrimR,TrimA,TrimE +58,3,FX,Q560,1,FLIP,Gyro,LEDs 20,0,FY326,FY326,1,Flip,RTH,HLess,Expert,Calib 20,1,FY326,FY319,1,Flip,RTH,HLess,Expert,Calib 23,0,FY326,FY326,1,Flip,RTH,HLess,Expert diff --git a/Multiprotocol/FX_nrf24l01.ino b/Multiprotocol/FX_nrf24l01.ino index 1a657335e..da9a74bd9 100644 --- a/Multiprotocol/FX_nrf24l01.ino +++ b/Multiprotocol/FX_nrf24l01.ino @@ -33,7 +33,7 @@ Multiprotocol is distributed in the hope that it will be useful, #define FX620_PAYLOAD_SIZE 7 #define FX620_CH_OFFSET 1 -#define FX9630_PACKET_PERIOD 8124 +#define FX9630_PACKET_PERIOD 8124 //8156 on QIDI-560 #define FX9630_BIND_PACKET_PERIOD 8124 #define FX9630_BIND_CHANNEL 51 #define FX9630_PAYLOAD_SIZE 8 @@ -51,14 +51,19 @@ static void __attribute__((unused)) FX_send_packet() if(IS_BIND_DONE) { XN297_Hopping(hopping_frequency_no++); - if(sub_protocol == FX9630) - { + if(sub_protocol >= FX9630) + { // FX9630 & FX_Q560 XN297_SetTXAddr(rx_tx_addr, 4); if (hopping_frequency_no >= FX9630_NUM_CHANNELS) { hopping_frequency_no = 0; - trim_ch++; - if(trim_ch > 3) trim_ch = 0; + if(sub_protocol == FX9630) + { + trim_ch++; + if(trim_ch > 3) trim_ch = 0; + } + else // FX_Q560 + trim_ch = 0; } } else // FX816 and FX620 @@ -71,8 +76,8 @@ static void __attribute__((unused)) FX_send_packet() //Channels uint8_t val; - if (sub_protocol == FX9630) - { + if (sub_protocol >= FX9630) + { // FX9630 & FX_Q560 packet[0] = convert_channel_8b(THROTTLE); packet[1] = convert_channel_8b(AILERON); packet[2] = 0xFF - convert_channel_8b(ELEVATOR); @@ -83,7 +88,9 @@ static void __attribute__((unused)) FX_send_packet() | GET_FLAG(CH5_SW, 0x01) // DR toggle swich: 0 small throw, 1 large throw // FX9630 =>0:6G small throw, 1:6G large throw, 2:3D // QIDI-550=>0:3D, 1:6G, 2:Torque - | ((Channel_data[CH6] < CHANNEL_MIN_COMMAND ? 0x00 : (Channel_data[CH6] > CHANNEL_MAX_COMMAND ? 0x02 : 0x01)) << 1); + | (Channel_data[CH6] < CHANNEL_MIN_COMMAND ? 0x00 : (Channel_data[CH6] > CHANNEL_MAX_COMMAND ? 0x04 : 0x02)); + if(sub_protocol == FX_Q560) + packet[5] |= GET_FLAG(CH7_SW, 0x10); } else // FX816 and FX620 { @@ -123,7 +130,7 @@ static void __attribute__((unused)) FX_send_packet() packet[5] = 0xAB; // Is it based on ID?? } } - else // FX9630 + else // FX9630 & FX_Q560 { if(IS_BIND_IN_PROGRESS) { @@ -175,7 +182,7 @@ static void __attribute__((unused)) FX_RF_init() packet_period = FX620_BIND_PACKET_PERIOD; packet_length = FX620_PAYLOAD_SIZE; } - else // FX9630 + else // FX9630 & FX_Q560 { XN297_SetTXAddr((uint8_t *)"\x56\x78\x90\x12", 4); XN297_RFChannel(FX9630_BIND_CHANNEL); @@ -207,7 +214,7 @@ static void __attribute__((unused)) FX_initialize_txid() for(uint8_t i=1;i08=0x08,37=0x25,51=0x33 + + //QIDI-560 #1 + //memcpy(rx_tx_addr,(uint8_t*)"\x38\xC7\x6D\x8D", 4); + //memcpy(hopping_frequency,"\x0D\x20\x3A", FX9630_NUM_CHANNELS); #endif //??? Need to find out how the first RF channel is calculated ??? } diff --git a/Multiprotocol/Multi.txt b/Multiprotocol/Multi.txt index a8dc922e8..5c8ccd34d 100644 --- a/Multiprotocol/Multi.txt +++ b/Multiprotocol/Multi.txt @@ -55,7 +55,7 @@ 55,Frsky_RX,Multi,CloneTX,EraseTX,CPPM 56,AFHDS2A_RX,Multi,CPPM 57,HoTT,Sync,No_Sync -58,FX,816,620,9630 +58,FX,816,620,9630,Q560 59,Bayang_RX,Multi,CPPM 60,Pelikan,Pro,Lite,SCX24 61,EazyRC diff --git a/Multiprotocol/Multi_Protos.ino b/Multiprotocol/Multi_Protos.ino index daf501ff1..27367dfdf 100644 --- a/Multiprotocol/Multi_Protos.ino +++ b/Multiprotocol/Multi_Protos.ino @@ -178,7 +178,7 @@ const char STR_SUBTYPE_JJRC345[] = "\x08""JJRC345\0""SkyTmblr"; const char STR_SUBTYPE_MOULDKG[] = "\x06""Analog""Digit\0"; const char STR_SUBTYPE_KF606[] = "\x06""KF606\0""MIG320""ZCZ50\0"; const char STR_SUBTYPE_E129[] = "\x04""E129""C186"; -const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630"; +const char STR_SUBTYPE_FX[] = "\x04""816\0""620\0""9630""Q560"; #define NO_SUBTYPE nullptr #ifdef SEND_CPPM @@ -333,7 +333,7 @@ const mm_protocol_definition multi_protocols[] = { {PROTO_FUTABA, STR_FUTABA, STR_SUBTYPE_FUTABA, 1, OPTION_RFTUNE, 1, 1, SW_CC2500, SFHSS_init, SFHSS_callback }, #endif #if defined(FX_NRF24L01_INO) - {PROTO_FX, STR_FX, STR_SUBTYPE_FX, 3, OPTION_NONE, 0, 0, SW_NRF, FX_init, FX_callback }, + {PROTO_FX, STR_FX, STR_SUBTYPE_FX, 4, OPTION_NONE, 0, 0, SW_NRF, FX_init, FX_callback }, #endif #if defined(FY326_NRF24L01_INO) {PROTO_FY326, STR_FY326, STR_SUBTYPE_FY326, 2, OPTION_NONE, 0, 0, SW_NRF, FY326_init, FY326_callback }, diff --git a/Multiprotocol/Multiprotocol.h b/Multiprotocol/Multiprotocol.h index 4bc4ec946..dc302b7f4 100644 --- a/Multiprotocol/Multiprotocol.h +++ b/Multiprotocol/Multiprotocol.h @@ -19,7 +19,7 @@ #define VERSION_MAJOR 1 #define VERSION_MINOR 3 #define VERSION_REVISION 4 -#define VERSION_PATCH_LEVEL 8 +#define VERSION_PATCH_LEVEL 9 #define MODE_SERIAL 0 @@ -479,6 +479,7 @@ enum FX FX816 = 0, FX620 = 1, FX9630 = 2, + FX_Q560 = 3, }; #define NONE 0 diff --git a/Multiprotocol/_Config.h b/Multiprotocol/_Config.h index 5aa11fc81..44ee70c09 100644 --- a/Multiprotocol/_Config.h +++ b/Multiprotocol/_Config.h @@ -689,6 +689,7 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= { FX816 FX620 FX9630 + Q560 PROTO_FY326 FY326 FY319 diff --git a/Protocols_Details.md b/Protocols_Details.md index 5908a9301..862fab7ce 100644 --- a/Protocols_Details.md +++ b/Protocols_Details.md @@ -1735,7 +1735,7 @@ Only 8 TX IDs available Model: FX620 SU35 ### Sub_protocol 9630 - *2* -Model: FX9630, FX9603, QIDI-550 and QIDI-560 +Model: FX9630, FX9603, QIDI-550 CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9 ---|---|---|---|---|---|---|---|--- @@ -1745,6 +1745,15 @@ FX9630 and FX9603 Gyro: -100%=6G small throw, 0%=6G large throw, +100%=3D QIDI-550 Gyro: -100%=3D, 0%=6G, +100%=Torque +### Sub_protocol Q560 - *2* +Model: QIDI-560 + +CH1|CH2|CH3|CH4|CH5|CH6|CH7 +---|---|---|---|---|---|--- +A|E|T|R|FLIP|GYRO|LEDs + +FLIP and LEDs are toggle channels meaning that -100% to +100% is a command and +100% to -100% is also a command + ## FY326 - *20* ### Sub_protocol FY326 - *0*