vedderb / bldc-tool

A Qt program to control and debug my BLDC-controller
247 stars 220 forks source link

Fix rounding in motor configuration values #5

Closed cottsay closed 9 years ago

cottsay commented 9 years ago

For instance, saving the value 0.0001 for s_pid_kp results in sending the value 99 over the serial line instead of 100.

If you wish to take a dependency on C++11, round() is implemented natively.

Feedback appreciated, as always. Let me know if you want to take a different approach and I'd be happy to change it.

--scott