From f3bda6a4a15e769b00d1a8d7d0542d415e93611d Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Fri, 30 Jul 2021 22:40:55 +0200 Subject: [PATCH] Fix no motor outputs when bi-directional dshot is disabled (the default). The issue is that the DMA is never enabled, and thus the DMA IRQ handler was never called either. --- src/main/drivers/dshot_bitbang.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/drivers/dshot_bitbang.c b/src/main/drivers/dshot_bitbang.c index 24009a36d0..f8f9379f10 100644 --- a/src/main/drivers/dshot_bitbang.c +++ b/src/main/drivers/dshot_bitbang.c @@ -605,22 +605,21 @@ static void bbUpdateComplete(void) } #endif -#ifdef USE_DSHOT_TELEMETRY for (int i = 0; i < usedMotorPorts; i++) { bbPort_t *bbPort = &bbPorts[i]; +#ifdef USE_DSHOT_TELEMETRY if (useDshotTelemetry) { if (bbPort->direction == DSHOT_BITBANG_DIRECTION_INPUT) { bbPort->inputActive = false; bbSwitchToOutput(bbPort); } - - - bbDMA_Cmd(bbPort, ENABLE); } - } #endif + bbDMA_Cmd(bbPort, ENABLE); + } + lastSendUs = micros(); for (int i = 0; i < usedMotorPacers; i++) { bbPacer_t *bbPacer = &bbPacers[i];