Skip to content

Commit

Permalink
Rename the Flyzone protocol by Height which is the original manufacturer
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal Langer committed Aug 1, 2020
1 parent e35879a commit 3d98abb
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 60 deletions.
4 changes: 2 additions & 2 deletions Lua_scripts/MultiChan.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
28,4,Flysky_AFHDS2A,PWM_IB16,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
28,5,Flysky_AFHDS2A,PPM_IB16,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
56,0,Flysky2A_RX,RX,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14
53,0,Flyzone,5ch,0,Gear
53,1,Flyzone,8ch,0,Gear,Gyro,Flap,Light
53,0,Height,5ch,0,Gear
53,1,Height,8ch,0,Gear,Gyro,Flap,Light
25,0,FrSkyV,V8,0,CH5,CH6,CH7,CH8
3,0,FrSkyD,D8,0,CH5,CH6,CH7,CH8
3,0,FrSkyD,D8Cloned,0,CH5,CH6,CH7,CH8
Expand Down
22 changes: 11 additions & 11 deletions Multiprotocol/A7105_SPI.ino
Original file line number Diff line number Diff line change
Expand Up @@ -192,9 +192,9 @@ void A7105_AdjustLOBaseFreq(uint8_t cmd)
offset=(int16_t)FORCE_FLYSKY_TUNING;
#endif
break;
case PROTO_FLYZONE:
#ifdef FORCE_FLYZONE_TUNING
offset=(int16_t)FORCE_FLYZONE_TUNING;
case PROTO_HEIGHT:
#ifdef FORCE_HEIGHT_TUNING
offset=(int16_t)FORCE_HEIGHT_TUNING;
#endif
break;
case PROTO_PELIKAN:
Expand Down Expand Up @@ -287,8 +287,8 @@ const uint8_t PROGMEM FLYSKY_A7105_regs[] = {
0x01, 0x0f // 30 - 31
};
#endif
#ifdef FLYZONE_A7105_INO
const uint8_t PROGMEM FLYZONE_A7105_regs[] = {
#ifdef HEIGHT_A7105_INO
const uint8_t PROGMEM HEIGHT_A7105_regs[] = {
0xff, 0x42, 0x00, 0x07, 0x00, 0xff, 0xff ,0x00, 0x00, 0x00, 0x00, 0x01, 0x21, 0x05, 0x01, 0x50, // 00 - 0f
0x9e, 0x4b, 0x00, 0x02, 0x16, 0x2b, 0x12, 0x00, 0x62, 0x80, 0x80, 0x00, 0x0a, 0x32, 0xc3, 0x1f, // 10 - 1f
0x12, 0x00, 0x00, 0xff, 0x00, 0x00, 0x3a, 0x00, 0x3f, 0x47, 0x80, 0x03, 0x01, 0x45, 0x18, 0x00, // 20 - 2f
Expand Down Expand Up @@ -327,10 +327,10 @@ void A7105_Init(void)
uint8_t *A7105_Regs=0;
uint8_t vco_calibration0, vco_calibration1;

#ifdef FLYZONE_A7105_INO
if(protocol==PROTO_FLYZONE)
#ifdef HEIGHT_A7105_INO
if(protocol==PROTO_HEIGHT)
{
A7105_Regs=(uint8_t*)FLYZONE_A7105_regs;
A7105_Regs=(uint8_t*)HEIGHT_A7105_regs;
A7105_WriteID(0x25A53C45);
}
else
Expand Down Expand Up @@ -383,8 +383,8 @@ void A7105_Init(void)
if(i==0x20) val=0x1E;
}
#endif
#ifdef FLYZONE_A7105_INO
if(protocol==PROTO_FLYZONE && sub_protocol==FLYZONE_8CH)
#ifdef HEIGHT_A7105_INO
if(protocol==PROTO_HEIGHT && sub_protocol==HEIGHT_8CH)
if(i==0x03) val=0x0A;
#endif
if( val != 0xFF)
Expand Down Expand Up @@ -441,7 +441,7 @@ void A7105_Init(void)
case PROTO_FLYSKY:
vco_calibration1=0x08;
break;
case PROTO_FLYZONE:
case PROTO_HEIGHT:
vco_calibration1=0x02;
break;
case PROTO_PELIKAN:
Expand Down
26 changes: 13 additions & 13 deletions Multiprotocol/Flyzone_a7105.ino → Multiprotocol/Height_a7105.ino
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
*/
// Compatible with FZ-410 TX

#if defined(FLYZONE_A7105_INO)
#if defined(HEIGHT_A7105_INO)

#include "iface_a7105.h"

//#define FLYZONE_FORCEID
//#define HEIGHT_FORCEID

#define FLYZONE_BIND_COUNT 220 // 5 sec
#define FLYZONE_BIND_CH 0x18 // TX, RX for bind end is 0x17
#define HEIGHT_BIND_COUNT 220 // 5 sec
#define HEIGHT_BIND_CH 0x18 // TX, RX for bind end is 0x17

static void __attribute__((unused)) flyzone_build_packet()
static void __attribute__((unused)) HEIGHT_build_packet()
{
packet[0] = 0xA5;
packet[1] = rx_tx_addr[2];
Expand All @@ -33,25 +33,25 @@ static void __attribute__((unused)) flyzone_build_packet()
packet[5] = convert_channel_8b(THROTTLE); //00..FF
packet[6] = convert_channel_8b(RUDDER); //00..80..FF
packet[7] = convert_channel_8b(CH5); //00..80..FF
if(sub_protocol == FLYZONE_8CH)
if(sub_protocol == HEIGHT_8CH)
{
packet[8] = convert_channel_8b(CH6); //00..80..FF
packet[9] = convert_channel_8b(CH7); //00..80..FF
packet[10] = convert_channel_8b(CH8); //00..80..FF
}
}

uint16_t ReadFlyzone()
uint16_t ReadHeight()
{
#ifndef FORCE_FLYZONE_TUNING
#ifndef FORCE_HEIGHT_TUNING
A7105_AdjustLOBaseFreq(1);
#endif
if(IS_BIND_IN_PROGRESS)
{
packet[0] = 0x1B;
packet[1] = rx_tx_addr[2];
packet[2] = rx_tx_addr[3];
A7105_WriteData(3, FLYZONE_BIND_CH);
A7105_WriteData(3, HEIGHT_BIND_CH);
if (bind_counter--==0)
BIND_DONE;
return 22700;
Expand All @@ -64,7 +64,7 @@ uint16_t ReadFlyzone()
#ifdef MULTI_SYNC
telemetry_set_input_sync(20*1500);
#endif
flyzone_build_packet();
HEIGHT_build_packet();
A7105_WriteData(sub_protocol?11:8, hopping_frequency[0]);
A7105_SetPower();
}
Expand All @@ -78,22 +78,22 @@ uint16_t ReadFlyzone()
return 1500;
}

uint16_t initFlyzone()
uint16_t initHeight()
{
A7105_Init();

hopping_frequency[0]=((random(0xfefefefe) & 0x0F)+2)<<2;
hopping_frequency[1]=hopping_frequency[0]+0x50;

#ifdef FLYZONE_FORCEID
#ifdef HEIGHT_FORCEID
rx_tx_addr[2]=0x35;
rx_tx_addr[3]=0xD0;
hopping_frequency[0]=0x18;
hopping_frequency[1]=0x68;
#endif

phase=255;
bind_counter = FLYZONE_BIND_COUNT;
bind_counter = HEIGHT_BIND_COUNT;
return 2400;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion Multiprotocol/Multi.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
50,Redpine,Fast,Slow
51,Potensic,A20
52,ZSX,280
53,Flyzone,5ch,8ch
53,Height,5ch,8ch
54,Scanner
55,Frsky_RX,RX,CloneTX
56,AFHDS2A_RX
Expand Down
8 changes: 4 additions & 4 deletions Multiprotocol/Multi_Names.ino
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ const char STR_KF606[] ="KF606";
const char STR_REDPINE[] ="Redpine";
const char STR_POTENSIC[] ="Potensi";
const char STR_ZSX[] ="ZSX";
const char STR_FLYZONE[] ="FlyZone";
const char STR_HEIGHT[] ="Height";
const char STR_SCANNER[] ="Scanner";
const char STR_FRSKY_RX[] ="FrSkyRX";
const char STR_AFHDS2A_RX[] ="FS2A_RX";
Expand Down Expand Up @@ -125,7 +125,7 @@ const char STR_SUBTYPE_GD00X[] = "\x05""GD_V1""GD_V2";
const char STR_SUBTYPE_REDPINE[] = "\x04""Fast""Slow";
const char STR_SUBTYPE_POTENSIC[] = "\x03""A20";
const char STR_SUBTYPE_ZSX[] = "\x07""280JJRC";
const char STR_SUBTYPE_FLYZONE[] = "\x03""5ch""8ch";
const char STR_SUBTYPE_HEIGHT[] = "\x03""5ch""8ch";
const char STR_SUBTYPE_FX816[] = "\x03""P38";
const char STR_SUBTYPE_XN297DUMP[] = "\x07""250Kbps""1Mbps\0 ""2Mbps\0 ""Auto\0 ""NRF\0 ";
const char STR_SUBTYPE_ESKY150[] = "\x03""4ch""7ch";
Expand Down Expand Up @@ -224,8 +224,8 @@ const mm_protocol_definition multi_protocols[] = {
#if defined(AFHDS2A_RX_A7105_INO)
{PROTO_AFHDS2A_RX, STR_AFHDS2A_RX,0, NO_SUBTYPE, OPTION_NONE },
#endif
#if defined(FLYZONE_A7105_INO)
{PROTO_FLYZONE, STR_FLYZONE, 2, STR_SUBTYPE_FLYZONE, OPTION_NONE },
#if defined(HEIGHT_A7105_INO)
{PROTO_HEIGHT, STR_HEIGHT, 2, STR_SUBTYPE_HEIGHT, OPTION_NONE },
#endif
#if defined(FQ777_NRF24L01_INO)
{PROTO_FQ777, STR_FQ777, 0, NO_SUBTYPE, OPTION_NONE },
Expand Down
20 changes: 10 additions & 10 deletions Multiprotocol/Multiprotocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_REVISION 1
#define VERSION_PATCH_LEVEL 50
#define VERSION_PATCH_LEVEL 49

//******************
// Protocols
Expand Down Expand Up @@ -79,7 +79,7 @@ enum PROTOCOLS
PROTO_REDPINE = 50, // =>CC2500
PROTO_POTENSIC = 51, // =>NRF24L01
PROTO_ZSX = 52, // =>NRF24L01
PROTO_FLYZONE = 53, // =>A7105
PROTO_HEIGHT = 53, // =>A7105
PROTO_SCANNER = 54, // =>CC2500
PROTO_FRSKY_RX = 55, // =>CC2500
PROTO_AFHDS2A_RX= 56, // =>A7105
Expand Down Expand Up @@ -114,7 +114,7 @@ enum Flysky
V912 = 3,
CX20 = 4,
};
enum Flyzone
enum Height
{
FZ410 = 0,
};
Expand Down Expand Up @@ -390,10 +390,10 @@ enum V761
V761_4CH = 1,
};

enum FLYZONE
enum HEIGHT
{
FLYZONE_5CH = 0,
FLYZONE_8CH = 1,
HEIGHT_5CH = 0,
HEIGHT_8CH = 1,
};

#define NONE 0
Expand Down Expand Up @@ -787,7 +787,7 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
REDPINE 50
POTENSIC 51
ZSX 52
FLYZONE 53
HEIGHT 53
SCANNER 54
FRSKY_RX 55
AFHDS2A_RX 56
Expand Down Expand Up @@ -999,9 +999,9 @@ Serial: 100000 Baud 8e2 _ xxxx xxxx p --
sub_protocol==V761
V761_3CH 0
V761_4CH 1
sub_protocol==FLYZONE
FLYZONE_5CH 0
FLYZONE_8CH 1
sub_protocol==HEIGHT
HEIGHT_5CH 0
HEIGHT_8CH 1
Power value => 0x80 0=High/1=Low
Stream[3] = option_protocol;
Expand Down
8 changes: 4 additions & 4 deletions Multiprotocol/Multiprotocol.ino
Original file line number Diff line number Diff line change
Expand Up @@ -1120,11 +1120,11 @@ static void protocol_init()
remote_callback = ReadBUGS;
break;
#endif
#if defined(FLYZONE_A7105_INO)
case PROTO_FLYZONE:
#if defined(HEIGHT_A7105_INO)
case PROTO_HEIGHT:
PE1_off; //antenna RF1
next_callback = initFlyzone();
remote_callback = ReadFlyzone;
next_callback = initHeight();
remote_callback = ReadHeight;
break;
#endif
#if defined(AFHDS2A_RX_A7105_INO)
Expand Down
12 changes: 6 additions & 6 deletions Multiprotocol/Validate.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@
#error "The Flysky forced frequency tuning value is outside of the range -300..300."
#endif
#endif
#ifdef FORCE_FLYZONE_TUNING
#if ( FORCE_FLYZONE_TUNING < -300 ) || ( FORCE_FLYZONE_TUNING > 300 )
#error "The Flyzone forced frequency tuning value is outside of the range -300..300."
#ifdef FORCE_HEIGHT_TUNING
#if ( FORCE_HEIGHT_TUNING < -300 ) || ( FORCE_HEIGHT_TUNING > 300 )
#error "The Height forced frequency tuning value is outside of the range -300..300."
#endif
#endif
#ifdef FORCE_PELIKAN_TUNING
Expand All @@ -168,8 +168,8 @@
#ifndef FORCE_FLYSKY_TUNING
#define FORCE_FLYSKY_TUNING 0
#endif
#ifndef FORCE_FLYZONE_TUNING
#define FORCE_FLYZONE_TUNING 0
#ifndef FORCE_HEIGHT_TUNING
#define FORCE_HEIGHT_TUNING 0
#endif
#ifndef FORCE_PELIKAN_TUNING
#define FORCE_PELIKAN_TUNING 0
Expand Down Expand Up @@ -223,7 +223,7 @@
#undef AFHDS2A_RX_A7105_INO
#undef BUGS_A7105_INO
#undef FLYSKY_A7105_INO
#undef FLYZONE_A7105_INO
#undef HEIGHT_A7105_INO
#undef HUBSAN_A7105_INO
#undef KYOSHO_A7105_INO
#undef PELIKAN_A7105_INO
Expand Down
10 changes: 5 additions & 5 deletions Multiprotocol/_Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
//#define FORCE_AFHDS2A_TUNING 0
//#define FORCE_BUGS_TUNING 0
//#define FORCE_FLYSKY_TUNING 0
//#define FORCE_FLYZONE_TUNING 0
//#define FORCE_HEIGHT_TUNING 0
//#define FORCE_HUBSAN_TUNING 0
//#define FORCE_KYOSHO_TUNING 0
//#define FORCE_PELIKAN_TUNING 0
Expand Down Expand Up @@ -170,7 +170,7 @@
#define AFHDS2A_RX_A7105_INO
#define BUGS_A7105_INO
#define FLYSKY_A7105_INO
#define FLYZONE_A7105_INO
#define HEIGHT_A7105_INO
#define HUBSAN_A7105_INO
#define KYOSHO_A7105_INO
#define PELIKAN_A7105_INO
Expand Down Expand Up @@ -580,9 +580,6 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
V6X6
V912
CX20
PROTO_FLYZONE
FLYZONE_5CH
FLYZONE_8CH
PROTO_FQ777
NONE
PROTO_FRSKY_RX
Expand Down Expand Up @@ -636,6 +633,9 @@ const PPM_Parameters PPM_prot[14*NBR_BANKS]= {
H20H
H20MINI
H30MINI
PROTO_HEIGHT
HEIGHT_5CH
HEIGHT_8CH
PROTO_HISKY
Hisky
HK310
Expand Down
8 changes: 4 additions & 4 deletions Protocols_Details.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ CFlie|38|CFlie||||||||NRF24L01|
[Flysky](Protocols_Details.md#FLYSKY---1)|1|Flysky|V9x9|V6x6|V912|CX20||||A7105|
[Flysky AFHDS2A](Protocols_Details.md#FLYSKY-AFHDS2A---28)|28|PWM_IBUS|PPM_IBUS|PWM_SBUS|PPM_SBUS|PWM_IBUS16|PPM_IBUS16|||A7105|
[Flysky AFHDS2A RX](Protocols_Details.md#FLYSKY-AFHDS2A-RX---56)|56|RX||||||||A7105|
[Flyzone](Protocols_Details.md#FLYZONE---53)|53|FZ410||||||||A7105|
[FQ777](Protocols_Details.md#FQ777---23)|23|FQ777||||||||NRF24L01|SSV7241
[FrskyD](Protocols_Details.md#FRSKYD---3)|3|D8|Cloned|||||||CC2500|
[FrskyL](Protocols_Details.md#FRSKYL---67)|67|LR12|LR12 6CH|||||||CC2500|
Expand All @@ -97,6 +96,7 @@ CFlie|38|CFlie||||||||NRF24L01|
[GD00X](Protocols_Details.md#GD00X---47)|47|GD_V1*|GD_V2*|||||||NRF24L01|
[GW008](Protocols_Details.md#GW008---32)|32|GW008||||||||NRF24L01|XN297
[H8_3D](Protocols_Details.md#H8_3D---36)|36|H8_3D|H20H|H20Mini|H30Mini|||||NRF24L01|XN297
[Height](Protocols_Details.md#HEIGHT---53)|53|5ch|8ch|||||||A7105|
[Hisky](Protocols_Details.md#HISKY---4)|4|Hisky|HK310|||||||NRF24L01|
[Hitec](Protocols_Details.md#HITEC---39)|39|OPT_FW|OPT_HUB|MINIMA||||||CC2500|
[Hontai](Protocols_Details.md#HONTAI---26)|26|HONTAI|JJRCX1|X5C1|FQ777_951|||||NRF24L01|XN297
Expand Down Expand Up @@ -239,17 +239,17 @@ Extended limits supported

Low power: enable/disable the LNA stage on the RF component to use depending on the distance with the TX.

## FLYZONE - *53*
## HEIGHT - *53*

### Sub_protocol 5CH - *0*
Models using the Flyzone FZ-410 TX: Fokker D.VII Micro EP RTF. Models using the old ARES TX (prior to Hitec RED) Tiger Moth, eRC Micro Stick and Rage R/C.
Models from Height, Flyzone, Rage R/C, eRC and the old ARES (prior to Hitec RED).

CH1|CH2|CH3|CH4|CH5
---|---|---|---|---
A|E|T|R|Gear

### Sub_protocol 8CH - *1*
Models using the new 8 channels radio Flyzone, eRC and Rage R/C.
Models from Height and Rage R/C.

CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8
---|---|---|---|---|---|---|---
Expand Down

0 comments on commit 3d98abb

Please sign in to comment.