simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
2.01k stars 518 forks source link

[BUG] Copy/paste error in stm32g4 current sense #420

Open dekutree64 opened 2 months ago

dekutree64 commented 2 months ago

Spotted a probable copy/paste error while reading through https://github.com/simplefoc/Arduino-FOC/tree/master/src/current_sense/hardware_specific/stm32/stm32g4/stm32g4_utils.cpp Line 208, shouldn't that be ADC_EXTERNALTRIG_T8_TRGO?

ifdef TIM8 // if defined timer 8

else if(timer->getHandle()->Instance == TIM8) return ADC_EXTERNALTRIG_T7_TRGO;

endif

Candas1 commented 2 months ago

Hi,

Yes that looks wrong. I don't have this issue in the unified current sense I am working on, but it's not ready to be published.