diff --git a/Multiprotocol/A7105_SPI.ino b/Multiprotocol/A7105_SPI.ino index 9703d50..f45ef41 100644 --- a/Multiprotocol/A7105_SPI.ino +++ b/Multiprotocol/A7105_SPI.ino @@ -318,6 +318,12 @@ const uint8_t PROGMEM KYOSHO_A7105_regs[] = { 0x1e, 0x00, 0x00, 0xff, 0x00, 0x00, 0x23, 0x70, 0x1F, 0x47, 0x80, 0x57, 0x01, 0x45, 0x19, 0x00, // 20 - 2f 0x01, 0x0f // 30 - 31 }; +const uint8_t PROGMEM KYOSHO_HYPE_A7105_regs[] = { + 0xff, 0x42, 0x00, 0x05, 0xC0, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x01, 0x09, 0x05, 0x01, 0x04, // 00 - 0f + 0x9e, 0x4b, 0x00, 0x02, 0x16, 0x2b, 0x12, 0x00, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x96, 0xc2, 0x1f, // 10 - 1f + 0x12, 0x00, 0x00, 0xff, 0x00, 0x00, 0x3a, 0x00, 0x17, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f + 0x01, 0x0f // 30 - 31 +}; #endif #define ID_NORMAL 0x55201041 @@ -367,8 +373,10 @@ void A7105_Init(void) A7105_Regs=(uint8_t*)AFHDS2A_A7105_regs; #endif #ifdef KYOSHO_A7105_INO - if(protocol==PROTO_KYOSHO) + if(protocol==PROTO_KYOSHO && sub_protocol==KYOSHO_FHSS) A7105_Regs=(uint8_t*)KYOSHO_A7105_regs; + else + A7105_Regs=(uint8_t*)KYOSHO_HYPE_A7105_regs; #endif } @@ -392,7 +400,7 @@ void A7105_Init(void) } A7105_Strobe(A7105_STANDBY); - if(protocol==PROTO_KYOSHO) + if(protocol==PROTO_KYOSHO && sub_protocol==KYOSHO_FHSS) {//strange calibration... //IF Filter Bank Calibration A7105_WriteReg(A7105_02_CALC,0x0F); @@ -445,6 +453,7 @@ void A7105_Init(void) vco_calibration1=0x02; break; case PROTO_PELIKAN: + case PROTO_KYOSHO: //sub_protocol Hype vco_calibration1=0x0C; break; default: diff --git a/Multiprotocol/Kyosho_a7105.ino b/Multiprotocol/Kyosho_a7105.ino index 343c0be..a483560 100644 --- a/Multiprotocol/Kyosho_a7105.ino +++ b/Multiprotocol/Kyosho_a7105.ino @@ -17,7 +17,8 @@ #include "iface_a7105.h" -//#define KYOSHO_FORCE_ID +//#define KYOSHO_FORCE_ID_FHSS +//#define KYOSHO_FORCE_ID_HYPE //Kyosho constants & variables #define KYOSHO_BIND_COUNT 2500 @@ -67,13 +68,50 @@ static void __attribute__((unused)) kyosho_send_packet() packet[36] |= (hopping_frequency_no&0xF0); // last byte is ending with F on the dumps so let's see hopping_frequency_no &= 0x1F; } - // debug("ch=%02X P=",rf_ch_num); - // for(uint8_t i=0; i<37; i++) - // debug("%02X ", packet[i]); - // debugln(""); + #if 0 + debug("ch=%02X P=",rf_ch_num); + for(uint8_t i=0; i<37; i++) + debug("%02X ", packet[i]); + debugln(""); + #endif A7105_WriteData(37, rf_ch_num); } +static void __attribute__((unused)) kyosho_hype_send_packet() +{ + if(IS_BIND_IN_PROGRESS) + { + packet[0] = rx_tx_addr[1]; + packet[1] = rx_tx_addr[3]; + //RF table + for(uint8_t i=0; i<15;i++) + packet[i+2]=hopping_frequency[i]; + rf_ch_num=0x01; + packet_length=17; + packet_period=1423; + } + else + { + //original TX is only refreshing the packet every 20ms and only do retransmit in between + //6 channels: AETR + for(uint8_t i=0; i<6;i++) + packet[i] = convert_channel_8b(i); + rf_ch_num=hopping_frequency[hopping_frequency_no]; + hopping_frequency_no++; + if(hopping_frequency_no>14) + hopping_frequency_no = 0; + packet_length=6; + packet_period=909; //packet period fluctuates a lot... + } + #if 0 + debug("ch=%02X P=",rf_ch_num); + for(uint8_t i=0; i -100%=Sport mode 1,0%=Sport mode 2,+100%=Acro ## Kyosho - *73* + +### Sub_protocol FHSS - *0* Surface protocol called FHSS introduced in 2017. Transmitters: KT-531P, KT-431PT, Flysky Noble NB4 (fw>2.0.67)... CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14 ---|---|---|---|---|---|---|---|---|----|----|----|----|---- STEERING|THROTTLE|CH3|CH4|CH5|CH6|CH7|CH8|CH9|CH10|CH11|CH12|CH13|CH14 +### Sub_protocol Hype - *1* +Transmitter: ST6DF + +CH1|CH2|CH3|CH4|CH5|CH6 +---|---|---|---|---|--- +A|E|T|R|CH5|CH6 + ## Pelikan - *60* Extended limits supported