mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-27 08:55:51 +08:00
Bidirectionnal DShot for H7 (#3253)
This commit is contained in:
@@ -30,7 +30,9 @@
|
||||
|
||||
<module name="telemetry" type="xbee_api"/>
|
||||
|
||||
<module name="actuators" type="dshot"/>
|
||||
<module name="actuators" type="dshot">
|
||||
<configure name="DSHOT_BIDIR" value="TRUE"/>
|
||||
</module>
|
||||
<module name="actuators" type="pwm"/>
|
||||
<module name="switch" type="servo"/>
|
||||
<define name="SWITCH_SERVO_ON_VALUE" value="SERVO_SWITCH_MAX"/>
|
||||
|
||||
@@ -99,3 +99,6 @@ SBUS2_PORT ?= UART6
|
||||
#
|
||||
ACTUATORS ?= actuators_pwm
|
||||
|
||||
|
||||
# Bidirectionnal DSHOT timer for input capture timeout
|
||||
DSHOT1_GPT_TIM ?= 7
|
||||
|
||||
@@ -8,8 +8,15 @@
|
||||
Beware that servo output from the same timer cannot mix PWM and DSHOT.
|
||||
It might be required to disable by hand some PWM output to avoid conflicts when they are activated by default on a board.
|
||||
Currently only implemented over ChibiOS.
|
||||
|
||||
Configure DSHOT_BIDIR to TRUE to enable bidirectionnal DSHOT.
|
||||
It overrides the rpm values from the UART dshot telemetry.
|
||||
UART dshot telemetry is still usefull for current and voltage telemetry.
|
||||
|
||||
</description>
|
||||
<configure name="DSHOT_BIDIR" value="FALSE" description="Bidirectionnal DSHOT for fast rpm feedback"/>
|
||||
<define name="DSHOT_SPEED" value="600" description="DSHOT speed (150,300,600,1200)"/>
|
||||
<configure name="DSHOT1_GPT_TIM" value="7" description="GPT driver used for telemetry timeout"/>
|
||||
</doc>
|
||||
<dep>
|
||||
<depends>actuators,@commands</depends>
|
||||
@@ -19,10 +26,21 @@
|
||||
<file name="actuators_dshot.h"/>
|
||||
</header>
|
||||
<makefile>
|
||||
<configure name="DSHOT_BIDIR" default="FALSE"/>
|
||||
<file_arch name="actuators_dshot_arch.c"/>
|
||||
<file_arch name="esc_dshot.c" cond="ifeq ($(RTOS),chibios)"/>
|
||||
<file_arch name="hal_stm32_dma.c" dir="mcu_periph" cond="ifeq ($(RTOS),chibios)"/>
|
||||
<test/>
|
||||
</makefile>
|
||||
<makefile cond="ifeq ($(DSHOT_BIDIR),TRUE)">
|
||||
<define name="DSHOT_BIDIR" value="$(DSHOT_BIDIR)"/>
|
||||
<define name="USE_GPT$(DSHOT1_GPT_TIM)" value="TRUE"/>
|
||||
<define name="DSHOT1_BIDIR_GPT" value="GPTD$(DSHOT1_GPT_TIM)"/>
|
||||
<file_arch name="dshot_rpmCapture.c"/>
|
||||
<file_arch name="dshot_erps.c"/>
|
||||
<file_arch name="input_capture_arch.c" dir="mcu_periph"/>
|
||||
<file_arch name="timerDmaCache.c" dir="mcu_periph"/>
|
||||
<test/>
|
||||
</makefile>
|
||||
</module>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user