simplefoc / Arduino-FOC

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

Prevent double constants #359

Closed Candas1 closed 9 months ago

Candas1 commented 9 months ago

For constants as float instead of double. Slightly reduces flash usage and loopfoc duration.

Before: RAM: [= ] 9.0% (used 4400 bytes from 49152 bytes) Flash: [=== ] 26.7% (used 69992 bytes from 262144 bytes) loopfoc=260us

After: RAM: [= ] 9.0% (used 4400 bytes from 49152 bytes) Flash: [=== ] 26.6% (used 69856 bytes from 262144 bytes) loopfoc=256us

runger1101001 commented 9 months ago

Merged it. Thank you!!