diff --git a/src/main/drivers/pwm_output_dshot_hal.c b/src/main/drivers/pwm_output_dshot_hal.c index 5788c27e0e..faabb24354 100644 --- a/src/main/drivers/pwm_output_dshot_hal.c +++ b/src/main/drivers/pwm_output_dshot_hal.c @@ -32,26 +32,19 @@ #include "drivers/dma.h" #include "drivers/dma_reqmap.h" -#include "drivers/motor.h" #include "drivers/dshot.h" #include "drivers/dshot_dpwm.h" #include "drivers/dshot_command.h" #include "drivers/io.h" #include "drivers/nvic.h" +#include "drivers/motor.h" +#include "drivers/pwm_output.h" +#include "drivers/pwm_output_dshot_shared.h" #include "drivers/rcc.h" #include "drivers/time.h" #include "drivers/timer.h" #include "drivers/system.h" -#include "pwm_output.h" - -// TODO remove once debugging no longer needed -#ifdef USE_DSHOT_TELEMETRY -#include -#endif - -#include "pwm_output_dshot_shared.h" - #ifdef USE_DSHOT_TELEMETRY void dshotEnableChannels(uint8_t motorCount) diff --git a/src/main/drivers/pwm_output_dshot_shared.c b/src/main/drivers/pwm_output_dshot_shared.c index a715f36a34..6e7e3d4f83 100644 --- a/src/main/drivers/pwm_output_dshot_shared.c +++ b/src/main/drivers/pwm_output_dshot_shared.c @@ -19,9 +19,10 @@ */ +#include #include #include -#include +#include #include "platform.h" @@ -60,8 +61,6 @@ motorDmaOutput_t dmaMotors[MAX_SUPPORTED_MOTORS]; #endif #ifdef USE_DSHOT_TELEMETRY - -// TODO remove once debugging no longer needed FAST_DATA_ZERO_INIT uint32_t inputStampUs; FAST_DATA_ZERO_INIT dshotDMAHandlerCycleCounters_t dshotDMAHandlerCycleCounters; @@ -236,7 +235,7 @@ FAST_CODE_NOINLINE bool pwmStartDshotMotorUpdate(void) } else { dshotTelemetryState.invalidPacketCount++; if (i == 0) { - memcpy(dshotTelemetryState.inputBuffer,dmaMotors[i].dmaBuffer,sizeof(dshotTelemetryState.inputBuffer)); + memcpy(dshotTelemetryState.inputBuffer, dmaMotors[i].dmaBuffer, sizeof(dshotTelemetryState.inputBuffer)); } } #ifdef USE_DSHOT_TELEMETRY_STATS diff --git a/src/main/drivers/pwm_output_dshot_shared.h b/src/main/drivers/pwm_output_dshot_shared.h index b0d23a118d..9e4ef0faf8 100644 --- a/src/main/drivers/pwm_output_dshot_shared.h +++ b/src/main/drivers/pwm_output_dshot_shared.h @@ -20,11 +20,6 @@ #ifdef USE_DSHOT -// TODO remove once debugging no longer needed -#ifdef USE_DSHOT_TELEMETRY -#include -#endif - extern FAST_DATA_ZERO_INIT uint8_t dmaMotorTimerCount; #if defined(STM32F7) || defined(STM32H7) extern FAST_DATA_ZERO_INIT motorDmaTimer_t dmaMotorTimers[MAX_DMA_TIMERS]; @@ -37,7 +32,6 @@ extern motorDmaOutput_t dmaMotors[MAX_SUPPORTED_MOTORS]; #ifdef USE_DSHOT_TELEMETRY extern uint32_t readDoneCount; -// TODO remove once debugging no longer needed FAST_DATA_ZERO_INIT extern uint32_t inputStampUs; typedef struct dshotDMAHandlerCycleCounters_s {