1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-15 12:25:20 +03:00

Merge pull request #8168 from jflyper/bfdev-fix-unprotected-useDshotTelemetry

Add missing conditional for useDshotTelemetry
This commit is contained in:
jflyper 2019-05-06 10:49:19 +09:00 committed by GitHub
commit c82c90159e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -674,9 +674,11 @@ FAST_CODE uint16_t prepareDshotPacket(motorDmaOutput_t *const motor)
csum_data >>= 4;
}
// append checksum
#ifdef USE_DSHOT_TELEMETRY
if (useDshotTelemetry) {
csum = ~csum;
}
#endif
csum &= 0xf;
packet = (packet << 4) | csum;