Skip to content

Commit e5689d2

Browse files
author
Pascal Langer
committed
Fix FQ777
1 parent b51dedc commit e5689d2

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Lua_scripts/MultiChan.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,5 +179,5 @@
179179
78,0,M-Link,Std,0,CH5,CH6,CH7,CH8,CH9,CH10,CH11,CH12,CH13,CH14,CH15,CH16
180180
79,0,WFLY2,RF20x,0,CH5,CH6,CH7,CH8,CH9,CH10
181181
80,0,E016Hv2,E016Hv2,1,TakLan,EmStop,Flip,Calib,HLess,RTH
182-
81,0,E010r5,E010r5,1,Flip,HLess,RTH
182+
81,0,E010r5,E010r5,1,Flip,LED,CALIB,HLess,RTH,UNK
183183
82,0,LOLI,0,CH5,CH6,CH7,CH8

Multiprotocol/FQ777_nrf24l01.ino

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,20 @@ static void __attribute__((unused)) ssv_pack_dpl(uint8_t addr[], uint8_t pid, ui
5656
{
5757
uint8_t bytes[2];
5858
uint16_t val;
59-
} crc;
59+
} crca;
6060

6161
crc=0x3c18;
6262
for (i = 0; i < 7; ++i)
6363
crc16_update(header[i],8);
6464
for (i = 0; i < *len; ++i)
6565
crc16_update(payload[i],8);
66-
crc.val=crc;
6766

6867
// encode payload and crc
6968
// xor with this:
7069
for (i = 0; i < *len; ++i)
7170
payload[i] ^= ssv_xor[i];
72-
crc.bytes[1] ^= ssv_xor[i++];
73-
crc.bytes[0] ^= ssv_xor[i++];
71+
crc ^= ssv_xor[i++]<<8;
72+
crc ^= ssv_xor[i++];
7473

7574
// pack the pcf, payload, and crc into packed_payload
7675
packed_payload[0] = pcf >> 1;
@@ -79,11 +78,11 @@ static void __attribute__((unused)) ssv_pack_dpl(uint8_t addr[], uint8_t pid, ui
7978
for (i = 0; i < *len - 1; ++i)
8079
packed_payload[i+2] = (payload[i] << 7) | (payload[i+1] >> 1);
8180

82-
packed_payload[i+2] = (payload[i] << 7) | (crc.val >> 9);
81+
packed_payload[i+2] = (payload[i] << 7) | (crc >> 9);
8382
++i;
84-
packed_payload[i+2] = (crc.val >> 1 & 0x80 ) | (crc.val >> 1 & 0x7F);
83+
packed_payload[i+2] = (crc >> 1 & 0x80 ) | (crc >> 1 & 0x7F);
8584
++i;
86-
packed_payload[i+2] = (crc.val << 7);
85+
packed_payload[i+2] = (crc << 7);
8786

8887
*len += 4;
8988
}

Multiprotocol/Multiprotocol.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
//******************
1919
#define VERSION_MAJOR 1
2020
#define VERSION_MINOR 3
21-
#define VERSION_REVISION 1
22-
#define VERSION_PATCH_LEVEL 99
21+
#define VERSION_REVISION 2
22+
#define VERSION_PATCH_LEVEL 00
2323

2424
//******************
2525
// Protocols

0 commit comments

Comments
 (0)