Rename protocol

This commit is contained in:
Goebish 2019-10-12 00:37:28 +02:00
parent 2f64f1f84a
commit 91e8653737
3 changed files with 13 additions and 11 deletions

View File

@ -17,8 +17,8 @@
#include "iface_cc2500.h" #include "iface_cc2500.h"
#define FRSKYX_FCC_LENGTH (30+2) #define FRSKY_RX_D16FCC_LENGTH (30+2)
#define FRSKYX_LBT_LENGTH (33+2) #define FRSKY_RX_D16LBT_LENGTH (33+2)
enum { enum {
FRSKY_RX_TUNE_START, FRSKY_RX_TUNE_START,
@ -70,7 +70,7 @@ static void __attribute__((unused)) frsky_rx_initialise() {
CC2500_WriteReg(CC2500_09_ADDR, 0x00); CC2500_WriteReg(CC2500_09_ADDR, 0x00);
switch (sub_protocol) { switch (sub_protocol) {
case FRSKYX_FCC: case FRSKY_RX_D16FCC:
CC2500_WriteReg(CC2500_17_MCSM1, 0x0C); CC2500_WriteReg(CC2500_17_MCSM1, 0x0C);
CC2500_WriteReg(CC2500_0E_FREQ1, 0x76); CC2500_WriteReg(CC2500_0E_FREQ1, 0x76);
CC2500_WriteReg(CC2500_0F_FREQ0, 0x27); CC2500_WriteReg(CC2500_0F_FREQ0, 0x27);
@ -82,7 +82,7 @@ static void __attribute__((unused)) frsky_rx_initialise() {
CC2500_WriteReg(CC2500_12_MDMCFG2, 0x13); CC2500_WriteReg(CC2500_12_MDMCFG2, 0x13);
CC2500_WriteReg(CC2500_15_DEVIATN, 0x51); CC2500_WriteReg(CC2500_15_DEVIATN, 0x51);
break; break;
case FRSKYX_LBT: case FRSKY_RX_D16LBT:
CC2500_WriteReg(CC2500_17_MCSM1, 0x0E); CC2500_WriteReg(CC2500_17_MCSM1, 0x0E);
CC2500_WriteReg(CC2500_0E_FREQ1, 0x80); CC2500_WriteReg(CC2500_0E_FREQ1, 0x80);
CC2500_WriteReg(CC2500_0F_FREQ0, 0x00); CC2500_WriteReg(CC2500_0F_FREQ0, 0x00);
@ -207,7 +207,7 @@ uint16_t initFrSky_Rx()
frsky_rx_set_channel(hopping_frequency_no); frsky_rx_set_channel(hopping_frequency_no);
phase = FRSKY_RX_DATA; phase = FRSKY_RX_DATA;
} }
packet_length = (sub_protocol == FRSKYX_LBT) ? FRSKYX_LBT_LENGTH : FRSKYX_FCC_LENGTH; packet_length = (sub_protocol == FRSKY_RX_D16LBT) ? FRSKY_RX_D16LBT_LENGTH : FRSKY_RX_D16FCC_LENGTH;
return 1000; return 1000;
} }

View File

@ -52,6 +52,6 @@
52,ZSX,280 52,ZSX,280
53,Flyzone,FZ-410 53,Flyzone,FZ-410
54,Scanner 54,Scanner
55,FrskyX_RX,FCC,EU_LBT 55,Frsky_RX,D16FCC,D16LBT,D8
56,AFHDS2A_RX 56,AFHDS2A_RX
63,XN_DUMP,250K,1M,2M 63,XN_DUMP,250K,1M,2M

View File

@ -292,8 +292,9 @@ enum TRAXXAS
}; };
enum FRSKY_RX enum FRSKY_RX
{ {
FRSKYX_FCC = 0, FRSKY_RX_D16FCC= 0,
FRSKYX_LBT FRSKY_RX_D16LBT,
FRSKY_RX_D8
}; };
#define NONE 0 #define NONE 0
@ -670,7 +671,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
ZSX 52 ZSX 52
FLYZONE 53 FLYZONE 53
SCANNER 54 SCANNER 54
FRSKYX_RX 55 FRSKY_RX 55
BindBit=> 0x80 1=Bind/0=No BindBit=> 0x80 1=Bind/0=No
AutoBindBit=> 0x40 1=Yes /0=No AutoBindBit=> 0x40 1=Yes /0=No
RangeCheck=> 0x20 1=Yes /0=No RangeCheck=> 0x20 1=Yes /0=No
@ -813,8 +814,9 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
sub_protocol==TRAXXAS sub_protocol==TRAXXAS
RX6519 0 RX6519 0
sub_protocol==FRSKY_RX sub_protocol==FRSKY_RX
FCC 0 D16FCC 0
LBT 1 D16LBT 1
D8 2
Power value => 0x80 0=High/1=Low Power value => 0x80 0=High/1=Low
Stream[3] = option_protocol; Stream[3] = option_protocol;