teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

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){