bdshot per channel, use PWM_TIM param for BDSHOT instead of single parameter to allow per timer bdshot, clean up logic and fix minor bugs, re-init dshot in mixerChanged

This commit is contained in:
Jacob Dahl
2026-01-27 15:39:49 -09:00
parent 4b3cd1e9a2
commit 22587b09e5
6 changed files with 60 additions and 50 deletions
@@ -424,8 +424,9 @@ void up_dshot_trigger()
io_timer_update_dma_req(timer_index, false);
// Trigger DMA (DShot Outputs). Only capture compare after the system has had time to boot.
if (timer->bidirectional && (hrt_absolute_time() > 3000000)) {
static const uint64_t ESC_BOOT_DELAY_US = 3000000;
if (timer->bidirectional && (hrt_absolute_time() > ESC_BOOT_DELAY_US)) {
perf_begin(capture_cycle_perf);
stm32_dmastart(timer->dma_handle, dma_burst_finished_callback, &timer->timer_index, false);