Skip to content

Commit 432e2e0

Browse files
committed
FX small changes
1 parent 77efe46 commit 432e2e0

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

Multiprotocol/FX_nrf24l01.ino

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ static void __attribute__((unused)) FX_send_packet()
5252
{
5353
XN297_Hopping(hopping_frequency_no++);
5454
if(sub_protocol >= FX9630)
55-
{ // FX9630 & FX_Q560
55+
{ // FX9630 & FX_Q560 & FX_QF012
5656
XN297_SetTXAddr(rx_tx_addr, 4);
5757
if (hopping_frequency_no >= FX9630_NUM_CHANNELS)
5858
{
5959
hopping_frequency_no = 0;
6060
if(sub_protocol == FX9630)
6161
{
6262
trim_ch++;
63-
if(trim_ch > 3) trim_ch = 0;
63+
trim_ch &= 3;
6464
}
65-
else // FX_Q560, QF012
65+
else // FX_Q560 & FX_QF012
6666
trim_ch = 0;
6767
}
6868
}
69-
else // FX816 and FX620
69+
else // FX816 & FX620
7070
{
7171
hopping_frequency_no &= 0x03;
7272
}
@@ -220,13 +220,14 @@ static void __attribute__((unused)) FX_initialize_txid()
220220
}
221221
else // FX9630 & FX_Q560
222222
{
223+
//??? Need to find out how the first RF channel is calculated ???
224+
hopping_frequency[0] = 0x13;
225+
//Other 2 RF channels are sent during the bind phase so they can be whatever
226+
hopping_frequency[1] = RX_num & 0x0F + 0x1A;
227+
hopping_frequency[2] = rx_tx_addr[3] & 0x0F + 0x38;
223228
#ifdef FORCE_FX9630_ID
224229
memcpy(rx_tx_addr,(uint8_t*)"\xCE\x31\x9B\x73", 4);
225230
memcpy(hopping_frequency,"\x13\x1A\x38", FX9630_NUM_CHANNELS); //Original dump=>19=0x13,26=0x1A,56=0x38
226-
#else
227-
hopping_frequency[0] = 0x13; // constant???
228-
hopping_frequency[1] = RX_num & 0x0F + 0x1A;
229-
hopping_frequency[2] = rx_tx_addr[3] & 0x0F + 0x38;
230231
#endif
231232
#ifdef FORCE_QIDI_ID
232233
memcpy(rx_tx_addr,(uint8_t*)"\x23\xDC\x76\xA2", 4);
@@ -236,7 +237,6 @@ static void __attribute__((unused)) FX_initialize_txid()
236237
//memcpy(rx_tx_addr,(uint8_t*)"\x38\xC7\x6D\x8D", 4);
237238
//memcpy(hopping_frequency,"\x0D\x20\x3A", FX9630_NUM_CHANNELS);
238239
#endif
239-
//??? Need to find out how the first RF channel is calculated ???
240240
}
241241
}
242242

Multiprotocol/Multiprotocol.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ enum FX
492492
FX620 = 1,
493493
FX9630 = 2,
494494
FX_Q560 = 3,
495-
FX_QF012 = 4,
495+
FX_QF012 = 4,
496496
};
497497
enum SGF22
498498
{

0 commit comments

Comments
 (0)