SFHSS sub protocols

This commit is contained in:
Pascal Langer 2017-11-20 21:58:01 +01:00
parent 6535f64699
commit a95fd1e1d8
4 changed files with 27 additions and 5 deletions

View File

@ -18,7 +18,7 @@
18,MJXq,WLH08,X600,X800,H26D,E010,H26WH
19,Shenqi
20,FY326,FY326,FY319
21,SFHSS
21,SFHSS,XK,T8J,T10J,TM-FH
22,J6PRO
23,FQ777
24,ASSAN

View File

@ -196,6 +196,13 @@ enum Q303
CX10D = 2,
CX10WD = 3,
};
enum SFHSS
{
XK = 0,
T10J = 1,
T8J = 2,
TM_FH = 3,
};
#define NONE 0
#define P_HIGH 1
@ -585,6 +592,11 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
CX35 1
CX10D 2
CX10WD 3
sub_protocol==SFHSS
XK 0
T10J 1
T8J 2
TM_FH 3
Power value => 0x80 0=High/1=Low
Stream[3] = option_protocol;

View File

@ -155,17 +155,24 @@ static void __attribute__((unused)) SFHSS_build_data_packet()
// Values grow down and to the right.
static void __attribute__((unused)) SFHSS_build_data_packet()
{
const uint8_t SFHSS_ident[4][3]={
{ 0x81, 0x00, 0x00}, //XK
{ 0x81, 0x42, 0x07}, //T8J
{ 0x81, 0x0F, 0x09}, //T10J
{ 0x82, 0x9A, 0x06} //TM-FH
};
uint8_t ch_offset = phase == SFHSS_DATA1 ? 0 : 4;
uint16_t ch1 = convert_channel_16b_nolim(CH_AETR[ch_offset+0],2020,1020);
uint16_t ch2 = convert_channel_16b_nolim(CH_AETR[ch_offset+1],2020,1020);
uint16_t ch3 = convert_channel_16b_nolim(CH_AETR[ch_offset+2],2020,1020);
uint16_t ch4 = convert_channel_16b_nolim(CH_AETR[ch_offset+3],2020,1020);
packet[0] = 0x81; // can be 80 or 81 for Orange, only 81 for XK
packet[0] = SFHSS_ident[sub_protocol][0]; // can be 80 or 81 for Orange
packet[1] = rx_tx_addr[0];
packet[2] = rx_tx_addr[1];
packet[3] = 0x0f; //10J
packet[4] = 0x09; //10J
packet[3] = SFHSS_ident[sub_protocol][1];
packet[4] = SFHSS_ident[sub_protocol][2];
packet[5] = (rf_ch_num << 3) | ((ch1 >> 9) & 0x07);
packet[6] = (ch1 >> 1);
packet[7] = (ch1 << 7) | ((ch2 >> 5) & 0x7F );

View File

@ -368,7 +368,10 @@ const PPM_Parameters PPM_prot[15]= {
FY326
FY319
MODE_SFHSS
NONE
XK
T10J
T8J
TM_FH
MODE_J6PRO
NONE
MODE_FQ777