1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 05:15:25 +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

@ -673,8 +673,11 @@ FAST_CODE uint16_t prepareDshotPacket(motorDmaOutput_t *const motor)
csum ^= csum_data; // xor data by nibbles
csum_data >>= 4;
}
csum &= 0xf;
// append checksum
if (useDshotTelemetry) {
csum = ~csum;
}
csum &= 0xf;
packet = (packet << 4) | csum;
return packet;