simplefoc / Arduino-FOC

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

Fix for #415 sin/cos integer overflow on 16-bit CPUs #416

Open dekutree64 opened 3 days ago

dekutree64 commented 3 days ago

Terrible bug in the fast sin/cos added last year, resulting in rough sine waves and a spike from +1 to -1 at pi/2