diff --git a/src/main/drivers/dshot_command.c b/src/main/drivers/dshot_command.c index 0b7dec3a20..caadd4049b 100644 --- a/src/main/drivers/dshot_command.c +++ b/src/main/drivers/dshot_command.c @@ -160,18 +160,14 @@ bool dshotStreamingCommandsAreEnabled(void) static bool dshotCommandsAreEnabled(dshotCommandType_e commandType) { bool ret = false; - switch (commandType) { case DSHOT_CMD_TYPE_BLOCKING: ret = !motorIsEnabled(); - break; case DSHOT_CMD_TYPE_INLINE: ret = dshotStreamingCommandsAreEnabled(); - break; default: - break; } diff --git a/src/main/drivers/motor.c b/src/main/drivers/motor.c index 882dca8333..14cfc63c21 100644 --- a/src/main/drivers/motor.c +++ b/src/main/drivers/motor.c @@ -111,7 +111,6 @@ bool checkMotorProtocolEnabled(const motorDevConfig_t *motorDevConfig, bool *isP case PWM_TYPE_MULTISHOT: case PWM_TYPE_BRUSHED: enabled = true; - break; #ifdef USE_DSHOT @@ -121,11 +120,9 @@ bool checkMotorProtocolEnabled(const motorDevConfig_t *motorDevConfig, bool *isP case PWM_TYPE_PROSHOT1000: enabled = true; isDshot = true; - break; #endif default: - break; } diff --git a/src/main/drivers/pwm_output_dshot_hal_hal.c b/src/main/drivers/pwm_output_dshot_hal_hal.c index f738b4f462..1e8fccb35d 100644 --- a/src/main/drivers/pwm_output_dshot_hal_hal.c +++ b/src/main/drivers/pwm_output_dshot_hal_hal.c @@ -81,18 +81,15 @@ void pwmChannelDMAStart(TIM_HandleTypeDef *htim, uint32_t Channel, uint32_t *pDa case TIM_CHANNEL_1: HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC1], (uint32_t)pData, (uint32_t)&htim->Instance->CCR1, Length); __HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC1); - break; - + break; case TIM_CHANNEL_2: HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC2], (uint32_t)pData, (uint32_t)&htim->Instance->CCR2, Length); __HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC2); break; - case TIM_CHANNEL_3: HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC3], (uint32_t)pData, (uint32_t)&htim->Instance->CCR3,Length); __HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC3); break; - case TIM_CHANNEL_4: HAL_DMA_Start_IT(htim->hdma[TIM_DMA_ID_CC4], (uint32_t)pData, (uint32_t)&htim->Instance->CCR4, Length); __HAL_TIM_ENABLE_DMA(htim, TIM_DMA_CC4); @@ -110,15 +107,12 @@ void pwmChannelDMAStop(TIM_HandleTypeDef *htim, uint32_t Channel) case TIM_CHANNEL_1: __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC1); break; - case TIM_CHANNEL_2: __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC2); break; - case TIM_CHANNEL_3: __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC3); break; - case TIM_CHANNEL_4: __HAL_TIM_DISABLE_DMA(htim, TIM_DMA_CC4); break; diff --git a/src/main/drivers/rx/rx_sx1280.c b/src/main/drivers/rx/rx_sx1280.c index e552106a4c..950858891d 100644 --- a/src/main/drivers/rx/rx_sx1280.c +++ b/src/main/drivers/rx/rx_sx1280.c @@ -423,8 +423,7 @@ void sx1280SetMode(const sx1280OperatingModes_e opMode) buf[2] = 0xFF; // TODO dynamic timeout based on expected onairtime sx1280WriteCommandBurst(SX1280_RADIO_SET_TX, buf, 3); break; - case SX1280_MODE_CAD: - break; + case SX1280_MODE_CAD: // not implemented yet default: break; } diff --git a/src/main/fc/rc.c b/src/main/fc/rc.c index 7ddd563cd0..65fc39bdb0 100644 --- a/src/main/fc/rc.c +++ b/src/main/fc/rc.c @@ -705,23 +705,18 @@ void initRcProcessing(void) case RATES_TYPE_BETAFLIGHT: default: applyRates = applyBetaflightRates; - break; case RATES_TYPE_RACEFLIGHT: applyRates = applyRaceFlightRates; - break; case RATES_TYPE_KISS: applyRates = applyKissRates; - break; case RATES_TYPE_ACTUAL: applyRates = applyActualRates; - break; case RATES_TYPE_QUICK: applyRates = applyQuickRates; - break; } diff --git a/src/main/flight/mixer_init.c b/src/main/flight/mixer_init.c index 6a93f7bb32..41cc172d87 100644 --- a/src/main/flight/mixer_init.c +++ b/src/main/flight/mixer_init.c @@ -445,11 +445,9 @@ bool mixerModeIsFixedWing(mixerMode_e mixerMode) case MIXER_AIRPLANE: case MIXER_CUSTOM_AIRPLANE: return true; - break; default: return false; - break; } } diff --git a/src/main/flight/servos.c b/src/main/flight/servos.c index 4609763c27..d1e50d5814 100644 --- a/src/main/flight/servos.c +++ b/src/main/flight/servos.c @@ -249,7 +249,6 @@ static void servoConfigureOutput(void) case MIXER_CUSTOM_AIRPLANE: case MIXER_CUSTOM_TRI: loadCustomServoMixer(); - break; default: break;