1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Add conditional for useDshotTelemetry

This commit is contained in:
jflyper 2019-05-04 23:57:15 +09:00
parent de1c1d5377
commit 896b915838

View file

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