mirror of
https://github.com/pascallanger/DIY-Multiprotocol-TX-Module.git
synced 2025-02-04 19:38:13 +00:00
Kyosho: new sub_protocol Hype
Initial release
This commit is contained in:
parent
a4cac50261
commit
e7eb07a5a4
@ -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:
|
||||
|
@ -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<packet_length; i++)
|
||||
debug("%02X ", packet[i]);
|
||||
debugln("");
|
||||
#endif
|
||||
A7105_WriteData(packet_length, rf_ch_num);
|
||||
}
|
||||
|
||||
uint16_t ReadKyosho()
|
||||
{
|
||||
#ifndef FORCE_KYOSHO_TUNING
|
||||
@ -83,34 +121,61 @@ uint16_t ReadKyosho()
|
||||
{
|
||||
bind_counter--;
|
||||
if (bind_counter==0)
|
||||
{
|
||||
BIND_DONE;
|
||||
if(sub_protocol==KYOSHO_HYPE)
|
||||
A7105_WriteID(MProtocol_id);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
A7105_SetPower();
|
||||
if(hopping_frequency_no==0)
|
||||
A7105_SetPower();
|
||||
#ifdef MULTI_SYNC
|
||||
telemetry_set_input_sync(3852);
|
||||
telemetry_set_input_sync(packet_period);
|
||||
#endif
|
||||
}
|
||||
kyosho_send_packet();
|
||||
return 3852;
|
||||
if(sub_protocol==KYOSHO_FHSS)
|
||||
kyosho_send_packet();
|
||||
else//HYPE
|
||||
kyosho_hype_send_packet();
|
||||
return packet_period;
|
||||
}
|
||||
|
||||
uint16_t initKyosho()
|
||||
{
|
||||
A7105_Init();
|
||||
|
||||
// compute 32 channels from ID
|
||||
calc_fh_channels(32);
|
||||
|
||||
// compute channels from ID
|
||||
calc_fh_channels(sub_protocol==KYOSHO_FHSS?32:15);
|
||||
hopping_frequency_no=0;
|
||||
|
||||
#ifdef KYOSHO_FORCE_ID
|
||||
memcpy(rx_tx_addr,"\x3A\x39\x37\x00",4);
|
||||
memcpy(hopping_frequency,"\x29\x4C\x67\x92\x31\x1C\x77\x18\x23\x6E\x81\x5C\x8F\x5A\x51\x94\x7A\x12\x45\x6C\x7F\x1E\x0D\x88\x63\x8C\x4F\x37\x26\x61\x2C\x8A",32);
|
||||
#ifdef KYOSHO_FORCE_ID_FHSS
|
||||
if(sub_protocol==KYOSHO_FHSS)
|
||||
{
|
||||
memcpy(rx_tx_addr,"\x3A\x39\x37\x00",4);
|
||||
memcpy(hopping_frequency,"\x29\x4C\x67\x92\x31\x1C\x77\x18\x23\x6E\x81\x5C\x8F\x5A\x51\x94\x7A\x12\x45\x6C\x7F\x1E\x0D\x88\x63\x8C\x4F\x37\x26\x61\x2C\x8A",32);
|
||||
}
|
||||
#endif
|
||||
if(sub_protocol==KYOSHO_HYPE)
|
||||
{
|
||||
#ifdef KYOSHO_FORCE_ID_HYPE
|
||||
MProtocol_id=0xAF90738C;
|
||||
set_rx_tx_addr(MProtocol_id);
|
||||
memcpy(hopping_frequency,"\x27\x1B\x63\x75\x03\x39\x57\x69\x87\x0F\x7B\x3F\x33\x51\x6F",15);
|
||||
#endif
|
||||
MProtocol_id &= 0x00FF00FF;
|
||||
MProtocol_id |= 0xAF007300;
|
||||
if(IS_BIND_IN_PROGRESS)
|
||||
A7105_WriteID(0xAF00FF00);
|
||||
else
|
||||
A7105_WriteID(MProtocol_id);
|
||||
}
|
||||
|
||||
if(IS_BIND_IN_PROGRESS)
|
||||
bind_counter = KYOSHO_BIND_COUNT;
|
||||
|
||||
packet_period=3852; //FHSS
|
||||
return 2000;
|
||||
}
|
||||
#endif
|
||||
|
@ -70,7 +70,7 @@
|
||||
70,DSM_RX
|
||||
71,JJRC345
|
||||
72,Q90C
|
||||
73,Kyosho
|
||||
73,Kyosho,FHSS,Hype
|
||||
74,RadioLink,Surface,Air
|
||||
75,---
|
||||
76,Realacc,R11
|
||||
|
@ -145,6 +145,7 @@ const char STR_SUBTYPE_PELIKAN[] = "\x04""Pro\0""Lite";
|
||||
const char STR_SUBTYPE_V761[] = "\x03""3ch""4ch";
|
||||
const char STR_SUBTYPE_RLINK[] = "\x07""Surface""Air\0 ";
|
||||
const char STR_SUBTYPE_REALACC[] = "\x03""R11";
|
||||
const char STR_SUBTYPE_KYOSHO[] = "\x04""FHSS""Hype";
|
||||
|
||||
enum
|
||||
{
|
||||
@ -297,7 +298,7 @@ const mm_protocol_definition multi_protocols[] = {
|
||||
{PROTO_KN, STR_KN, 2, STR_SUBTYPE_KN, OPTION_NONE },
|
||||
#endif
|
||||
#if defined(KYOSHO_A7105_INO)
|
||||
{PROTO_KYOSHO, STR_KYOSHO, 0, NO_SUBTYPE, OPTION_NONE },
|
||||
{PROTO_KYOSHO, STR_KYOSHO, 2, STR_SUBTYPE_KYOSHO, OPTION_NONE },
|
||||
#endif
|
||||
#if defined(MJXQ_NRF24L01_INO)
|
||||
{PROTO_MJXQ, STR_MJXQ, 7, STR_SUBTYPE_MJXQ, OPTION_RFTUNE },
|
||||
|
@ -19,7 +19,7 @@
|
||||
#define VERSION_MAJOR 1
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_REVISION 1
|
||||
#define VERSION_PATCH_LEVEL 69
|
||||
#define VERSION_PATCH_LEVEL 70
|
||||
|
||||
//******************
|
||||
// Protocols
|
||||
@ -398,6 +398,12 @@ enum HEIGHT
|
||||
HEIGHT_8CH = 1,
|
||||
};
|
||||
|
||||
enum KYOSHO
|
||||
{
|
||||
KYOSHO_FHSS = 0,
|
||||
KYOSHO_HYPE = 1,
|
||||
};
|
||||
|
||||
#define NONE 0
|
||||
#define P_HIGH 1
|
||||
#define P_LOW 0
|
||||
|
@ -671,7 +671,8 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
|
||||
WLTOYS
|
||||
FEILUN
|
||||
PROTO_KYOSHO
|
||||
NONE
|
||||
KYOSHO_FHSS
|
||||
KYOSHO_HYPE
|
||||
PROTO_MJXQ
|
||||
WLH08
|
||||
X600
|
||||
|
@ -106,7 +106,7 @@ CFlie|38|CFlie||||||||NRF24L01|
|
||||
[JJRC345](Protocols_Details.md#JJRC345---71)|71|JJRC345||||||||NRF24L01|XN297
|
||||
[KF606](Protocols_Details.md#KF606---49)|49|KF606*||||||||NRF24L01|XN297
|
||||
[KN](Protocols_Details.md#KN---9)|9|WLTOYS|FEILUN|||||||NRF24L01|
|
||||
[Kyosho](Protocols_Details.md#Kyosho---73)|73|||||||||A7105|
|
||||
[Kyosho](Protocols_Details.md#Kyosho---73)|73|FHSS|Hype|||||||A7105|
|
||||
[MJXq](Protocols_Details.md#MJXQ---18)|18|WLH08|X600|X800|H26D|E010*|H26WH|PHOENIX*||NRF24L01|XN297
|
||||
[MT99xx](Protocols_Details.md#MT99XX---17)|17|MT|H7|YZ|LS|FY805||||NRF24L01|XN297
|
||||
[NCC1701](Protocols_Details.md#NCC1701---44)|44|NCC1701||||||||NRF24L01|
|
||||
@ -291,12 +291,21 @@ H122D: FLIP
|
||||
H123D: FMODES -> -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user