1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 16:25:31 +03:00

invert dshot

This commit is contained in:
Thorsten Laux 2019-04-22 11:44:39 +02:00
parent bcac7f2e0b
commit 4a7be33c25
3 changed files with 10 additions and 9 deletions

View file

@ -150,7 +150,7 @@ static uint16_t decodeDshotPacket(uint32_t buffer[])
csum = csum ^ (csum >> 8); // xor bytes
csum = csum ^ (csum >> 4); // xor nibbles
if (csum & 0xf) {
if ((csum & 0xf) != 0) {
return 0xffff;
}
return value >> 4;
@ -176,7 +176,7 @@ static uint16_t decodeProshotPacket(uint32_t buffer[])
csum = csum ^ (csum >> 8); // xor bytes
csum = csum ^ (csum >> 4); // xor nibbles
if (csum & 0xf) {
if ((csum & 0xf) != 0) {
return 0xffff;
}
return value >> 4;