-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] POW() #306
Comments
Thank you for reporting this! We’ll try to fix it for next release, since using pow() seems quite gratuitous for raising to powers of 2 |
Please let me know if a PR helps |
Very interesting! |
I also checked, the svpwm without atan2 I mentioned in the community also reduces flash by 0.5%. You guys seem very busy, please let me know how I can make your life easier with this. Do you prefer an issue on github for any improvement to better track. I can even create a PR. |
Thanks so much @Candas1 ! I'm sorry we're so busy, but don't think all your work has gone unnoticed! We're really very grateful for your support and careful testing. I will work in the pow() changes right now. For the SVPWM a PR would be greatly appreciated, and also it would credit you for the change on github, which seems more than fair!! Note that we take PRs against the dev branch only. |
Don't get me wrong, it's not a complain. For the SVPWM change I have some questions but we can discuss it separately. |
pow stuff is part of PR #304 |
Thanks. |
Hi,
A user came across something weird when testing on a gd32 board.
A change in one of my last commit is making the main loop much slower, impacting motor control.
It seems the reason for the performance drop is the usage of pow() in the init of the voltage sense, although it's not even running in the main loop.... I still need to figure out why this happens, the gd32 is using a 4 years old gcc.
On stm32, I haven't noticed the performance drop, but I see another impact, which is the flash usage.
This is without the voltage sense:
This is with volage sense:
Now, as we are using the pow function only for powers of 2 and integers, I use this macro
#define pwrtwo(x) (1 << (x))
:So 1.5% less on a big chip (256Kb).
It seems pow() is used for the same purpose in MagneticSensorI2C and in MagneticSensorSPI
The text was updated successfully, but these errors were encountered: