aa

Dependencies:   mbed MCP23017

Revision:
4:15547d07f8e5
Parent:
2:32d2cd7d744b
diff -r 8790e69f8c59 -r 15547d07f8e5 Motor/Motor.cpp
--- a/Motor/Motor.cpp	Fri Jan 24 11:26:29 2020 +0000
+++ b/Motor/Motor.cpp	Sat Jan 25 00:40:35 2020 +0000
@@ -67,18 +67,18 @@
     }
 
     float percentage_to_ratio(float percentage) {
-        return percentage / 100.0;
+        return percentage / 100.0f;
     }
 
     int Motor::SetStatus(float pwm) {
-        if(pwm > 0.0)       return FOR;
-        else if(pwm < 0.0)  return BACK;
+        if(pwm > 0.0f)       return FOR;
+        else if(pwm < 0.0f)  return BACK;
         else                return BRAKE;
     }
     
     float Motor::SetPWM(float pwm) {
-        if(pwm > 0.0)       return pwm;
-        else if(pwm < 0.0)  return -pwm;
+        if(pwm > 0.0f)       return pwm;
+        else if(pwm < 0.0f)  return -pwm;
         else                return 80;
     }