mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-17 05:15:25 +03:00
invert dshot
This commit is contained in:
parent
bcac7f2e0b
commit
4a7be33c25
3 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue