Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: HbMotor.cpp
- Revision:
- 60:8ed7b7f0c371
- Parent:
- 48:71aec693a7dc
--- a/HbMotor.cpp Fri Mar 08 02:30:49 2019 +0000 +++ b/HbMotor.cpp Fri Mar 08 03:11:38 2019 +0000 @@ -173,7 +173,7 @@ void HbMotCtrl::setRpmValue(){ INT16 iVal = 0; - iVal = ofs + attval + val; + iVal = static_cast<int>(sqrt((double)(ofs * ofs + attval * attval + val * val))); UCHAR uPos = pos * 2 + typ; if(gf_Print.d2.bf.mrpm){