Merge pull request #10408 from mikeller/cleanup_debug_code
Cleaned up debug code in Dshot.
This commit is contained in:
commit
b5477cd500
|
@ -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 <string.h>
|
||||
#endif
|
||||
|
||||
#include "pwm_output_dshot_shared.h"
|
||||
|
||||
#ifdef USE_DSHOT_TELEMETRY
|
||||
|
||||
void dshotEnableChannels(uint8_t motorCount)
|
||||
|
|
|
@ -19,9 +19,10 @@
|
|||
*/
|
||||
|
||||
|
||||
#include <math.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
#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
|
||||
|
|
|
@ -20,11 +20,6 @@
|
|||
|
||||
#ifdef USE_DSHOT
|
||||
|
||||
// TODO remove once debugging no longer needed
|
||||
#ifdef USE_DSHOT_TELEMETRY
|
||||
#include <string.h>
|
||||
#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 {
|
||||
|
|
Loading…
Reference in New Issue