Skip to content

Commit

Permalink
QIDI-550 model
Browse files Browse the repository at this point in the history
Using FX/9630
Added trims
!! Need to find out the first RF channel calculation !!
  • Loading branch information
pascallanger committed Sep 1, 2023
1 parent ce5f4ec commit abfebb3
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
1 change: 1 addition & 0 deletions Lua_scripts/MultiChan.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@
55,3,FrSkyRX,CPPM,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
58,0,FX,816,1
58,1,FX,620,1
58,2,FX,9630,1,Rate,Gyro,TrimR,TrimA,TrimE
20,0,FY326,FY326,1,Flip,RTH,HLess,Expert,Calib
20,1,FY326,FY319,1,Flip,RTH,HLess,Expert,Calib
23,0,FY326,FY326,1,Flip,RTH,HLess,Expert
Expand Down
2 changes: 1 addition & 1 deletion Lua_scripts/MultiChannelsUpdater.lua
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ local function Multi_Init()
stick_names[4] = "Aux3"
elseif ( protocol == 48 and sub_protocol == 0 ) then -- V761 3CH
stick_names[4] = "n-a"
elseif protocol == 47 or protocol == 49 or protocol == 58 then -- GD00x, KF606, FX816
elseif protocol == 47 or protocol == 49 or ( protocol == 58 and sub_protocol < 2 ) then -- GD00x, KF606, FX816
stick_names[1] = "n-a"
stick_names[2] = "n-a"
end
Expand Down
28 changes: 22 additions & 6 deletions Multiprotocol/FX_nrf24l01.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,25 @@ Multiprotocol is distributed in the hope that it will be useful,

//#define FORCE_FX620_ID
//#define FORCE_FX9630_ID
//#define FORCE_QIDI_ID

static void __attribute__((unused)) FX_send_packet()
{
static uint8_t trim_ch = 0;

//Hopp
if(IS_BIND_DONE)
{
XN297_Hopping(hopping_frequency_no++);
if(sub_protocol == FX9630)
{
XN297_SetTXAddr(rx_tx_addr, 4);
if (hopping_frequency_no > FX9630_NUM_CHANNELS)
if (hopping_frequency_no >= FX9630_NUM_CHANNELS)
{
hopping_frequency_no = 0;
trim_ch++;
if(trim_ch > 3) trim_ch = 0;
}
}
else // FX816 and FX620
{
Expand All @@ -70,9 +77,13 @@ static void __attribute__((unused)) FX_send_packet()
packet[1] = convert_channel_8b(AILERON);
packet[2] = 0xFF - convert_channel_8b(ELEVATOR);
packet[3] = convert_channel_8b(RUDDER);
packet[4] = 0x20;
packet[5] = GET_FLAG(CH5_SW, 0x01); // DR toggle swich: 0 small throw, 1 large throw
packet[5] |= (Channel_data[CH6] < CHANNEL_MIN_COMMAND ? 0x00 : (Channel_data[CH6] > CHANNEL_MAX_COMMAND ? 0x02 : 0x01)) << 1; // Mode A(0) : 6D small throw, B(1) : 6D large throw, C(2) : 3D
val = trim_ch==0 ? 0x20 : (convert_channel_8b(trim_ch + CH6) >> 2); // no trim on Throttle
packet[4] = val; // Trim for channel x 0C..20..34
packet[5] = (trim_ch << 4) // channel x << 4
| GET_FLAG(CH5_SW, 0x01) // DR toggle swich: 0 small throw, 1 large throw
// FX9630 =>0:6G small throw, 1:6G large throw, 2:3D
// QIDI-550=>0:3D, 1:6G, 2:Torque
| ((Channel_data[CH6] < CHANNEL_MIN_COMMAND ? 0x00 : (Channel_data[CH6] > CHANNEL_MAX_COMMAND ? 0x02 : 0x01)) << 1);
}
else // FX816 and FX620
{
Expand Down Expand Up @@ -200,12 +211,17 @@ static void __attribute__((unused)) FX_initialize_txid()
{
#ifdef FORCE_FX9630_ID
memcpy(rx_tx_addr,(uint8_t*)"\xCE\x31\x9B\x73", 4);
memcpy(hopping_frequency,"\x13\x1A\x38", FX9630_NUM_CHANNELS); //Original dump=19=0x13,26=0x1A,56=0x38
memcpy(hopping_frequency,"\x13\x1A\x38", FX9630_NUM_CHANNELS); //Original dump=>19=0x13,26=0x1A,56=0x38
#else
hopping_frequency[0] = 0x13; // constant
hopping_frequency[0] = 0x13; // constant???
hopping_frequency[1] = RX_num & 0x0F + 0x1A;
hopping_frequency[2] = rx_tx_addr[3] & 0x0F + 0x38;
#endif
#ifdef FORCE_QIDI_ID
memcpy(rx_tx_addr,(uint8_t*)"\x23\xDC\x76\xA2", 4);
memcpy(hopping_frequency,"\x08\x25\x33", FX9630_NUM_CHANNELS); //Original dump=>08=0x08,37=0x25,51=0x33
#endif
//??? Need to find out how the first RF channel is calculated ???
}
}

Expand Down
2 changes: 1 addition & 1 deletion 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 3
#define VERSION_PATCH_LEVEL 30
#define VERSION_PATCH_LEVEL 31

#define MODE_SERIAL 0

Expand Down
13 changes: 12 additions & 1 deletion Protocols_Details.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ CFlie|38|CFlie||||||||NRF24L01|
[FrskyX2](Protocols_Details.md#FRSKYX2---64)|64|CH_16|CH_8|EU_16|EU_8|Cloned|Cloned_8|||CC2500|
[Frsky_RX](Protocols_Details.md#FRSKY_RX---55)|55|Multi|CloneTX|EraseTX|CPPM|||||CC2500|
[Futaba/SFHSS](Protocols_Details.md#Futaba---21)|21|SFHSS||||||||CC2500|
[FX](Protocols_Details.md#FX---58)|28|816|620|||||||NRF24L01|
[FX](Protocols_Details.md#FX---58)|28|816|620|9630||||||NRF24L01|
[FY326](Protocols_Details.md#FY326---20)|20|FY326|FY319|||||||NRF24L01|
[GD00X](Protocols_Details.md#GD00X---47)|47|GD_V1*|GD_V2*|||||||NRF24L01|XN297L
[GW008](Protocols_Details.md#GW008---32)|32|||||||||NRF24L01|XN297
Expand Down Expand Up @@ -1646,6 +1646,17 @@ Only 8 TX IDs available
### Sub_protocol 620 - *1*
Model: FX620 SU35

### Sub_protocol 9630 - *2*
Model: FX9630 and QIDI-550

CH1|CH2|CH3|CH4|CH5|CH6|CH7|CH8|CH9
---|---|---|---|---|---|---|---|---
A|E|T|R|RATE|GYRO|TrimR|TrimA|TrimE

FX9630 Gyro: -100%=6G small throw, 0%=6G large throw, +100%=3D

QIDI-550 Gyro: -100%=3D, 0%=6G, +100%=Torque

## FY326 - *20*

### Sub_protocol FY326 - *0*
Expand Down

0 comments on commit abfebb3

Please sign in to comment.