mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-15 12:25:20 +03:00
fix ifdefs
This commit is contained in:
parent
13c009da64
commit
01e8d99937
1 changed files with 4 additions and 7 deletions
|
@ -44,8 +44,6 @@
|
||||||
|
|
||||||
#include "pwm_output.h"
|
#include "pwm_output.h"
|
||||||
|
|
||||||
#ifdef USE_DSHOT
|
|
||||||
|
|
||||||
#include "pwm_output_dshot_shared.h"
|
#include "pwm_output_dshot_shared.h"
|
||||||
|
|
||||||
FAST_RAM_ZERO_INIT uint8_t dmaMotorTimerCount = 0;
|
FAST_RAM_ZERO_INIT uint8_t dmaMotorTimerCount = 0;
|
||||||
|
@ -184,16 +182,14 @@ static uint16_t decodeProshotPacket(uint32_t buffer[])
|
||||||
return value >> 4;
|
return value >> 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_DSHOT_TELEMETRY
|
|
||||||
|
|
||||||
uint16_t getDshotTelemetry(uint8_t index)
|
uint16_t getDshotTelemetry(uint8_t index)
|
||||||
{
|
{
|
||||||
return dmaMotors[index].dshotTelemetryValue;
|
return dmaMotors[index].dshotTelemetryValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
FAST_CODE void pwmDshotSetDirectionOutput(
|
FAST_CODE void pwmDshotSetDirectionOutput(
|
||||||
motorDmaOutput_t * const motor, bool output
|
motorDmaOutput_t * const motor, bool output
|
||||||
#ifndef USE_DSHOT_TELEMETRY
|
#ifndef USE_DSHOT_TELEMETRY
|
||||||
|
@ -205,6 +201,8 @@ FAST_CODE void pwmDshotSetDirectionOutput(
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
|
#ifdef USE_DSHOT_TELEMETRY
|
||||||
|
|
||||||
void pwmStartDshotMotorUpdate(uint8_t motorCount)
|
void pwmStartDshotMotorUpdate(uint8_t motorCount)
|
||||||
{
|
{
|
||||||
if (useDshotTelemetry) {
|
if (useDshotTelemetry) {
|
||||||
|
@ -250,4 +248,3 @@ void pwmStartDshotMotorUpdate(uint8_t motorCount)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue