RMD-X Motor Library - Last Update V0.5 - On going...... Current available Function - read velocity - read all data - send velocity - send position

Revision:
2:d1f33fc9383b
Parent:
1:5c31dcbaa375
Child:
4:083894adb121
--- a/RMD.cpp	Wed Nov 04 09:36:31 2020 +0000
+++ b/RMD.cpp	Wed Nov 04 09:43:41 2020 +0000
@@ -13,7 +13,7 @@
 void RMD::status_velocity(){
     if (read(msg)){
 
-        int fv = ((uint16_t)msg.data[5] << 8 + (uint16_t)msg.data[4])/(uint16_t)6;
+        int fv = (((uint16_t)msg.data[5] << 8) + ((uint16_t)msg.data[4])) / ((uint16_t)6);
         
         printf(" Speed : %d\n", fv);
         printf(" Speed high byte: %x\n", msg.data[5]);