Skip to content

Commit

Permalink
Fix dshot telemetry with new actuator feedback module (#3139)
Browse files Browse the repository at this point in the history
Co-authored-by: Florian Sansou <florian.sansou@enac.fr>
  • Loading branch information
FlorianSan and Florian Sansou committed Oct 10, 2023
1 parent 15120ea commit 94319ed
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ void actuators_dshot_arch_init(void)
CONCAT_GPIO(DSHOT_TIM1_TELEMETRY_NUM, PORT_RX),
CONCAT_GPIO(DSHOT_TIM1_TELEMETRY_NUM, RX),
CONCAT_GPIO(DSHOT_TIM1_TELEMETRY_NUM, AF), FALSE);
PRINT_CONFIG_VAR(DSHOT_TIM1_TELEMETRY_NUM);
#endif
#ifdef DSHOT_TIM2_TELEMETRY_NUM
gpio_setup_pin_af(
Expand All @@ -163,6 +164,7 @@ void actuators_dshot_arch_init(void)
CONCAT_GPIO(DSHOT_TIM4_TELEMETRY_NUM, PORT_RX),
CONCAT_GPIO(DSHOT_TIM4_TELEMETRY_NUM, RX),
CONCAT_GPIO(DSHOT_TIM4_TELEMETRY_NUM, AF), FALSE);
PRINT_CONFIG_VAR(DSHOT_TIM4_TELEMETRY_NUM);
#endif
#ifdef DSHOT_TIM5_TELEMETRY_NUM
gpio_setup_pin_af(
Expand Down Expand Up @@ -328,7 +330,7 @@ void actuators_dshot_arch_commit(void)
#endif


struct rpm_act_t feedback[ACTUATORS_DSHOT_NB] = { 0 };
struct act_feedback_t feedback[ACTUATORS_DSHOT_NB] = { 0 };
for (uint8_t i = 0; i < ACTUATORS_DSHOT_NB; i++) {
feedback[i].idx = ACTUATORS_DSHOT_OFFSET + i;
if (actuators_dshot_values[i].activated) {
Expand Down

0 comments on commit 94319ed

Please sign in to comment.