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

fix ifdefs

This commit is contained in:
Thorsten Laux 2019-03-03 12:59:24 +01:00
parent 13c009da64
commit 01e8d99937

View file

@ -44,8 +44,6 @@
#include "pwm_output.h"
#ifdef USE_DSHOT
#include "pwm_output_dshot_shared.h"
FAST_RAM_ZERO_INIT uint8_t dmaMotorTimerCount = 0;
@ -184,16 +182,14 @@ static uint16_t decodeProshotPacket(uint32_t buffer[])
return value >> 4;
}
#endif
#ifdef USE_DSHOT_TELEMETRY
uint16_t getDshotTelemetry(uint8_t index)
{
return dmaMotors[index].dshotTelemetryValue;
}
#endif
FAST_CODE void pwmDshotSetDirectionOutput(
motorDmaOutput_t * const motor, bool output
#ifndef USE_DSHOT_TELEMETRY
@ -205,6 +201,8 @@ FAST_CODE void pwmDshotSetDirectionOutput(
#endif
);
#ifdef USE_DSHOT_TELEMETRY
void pwmStartDshotMotorUpdate(uint8_t motorCount)
{
if (useDshotTelemetry) {
@ -250,4 +248,3 @@ void pwmStartDshotMotorUpdate(uint8_t motorCount)
#endif
#endif
#endif