TB6612FNG用のモータコントロールライブラリ

Dependents:   TB6612FNG_test line_trace_sample line_trace_sample_saitou line_trace_sample_tamada ... more

Files at this revision

API Documentation at this revision

Comitter:
yusaku0125
Date:
Mon Aug 26 09:25:17 2019 +0000
Parent:
5:80ac3e662fe4
Commit message:
test

Changed in this revision

TB6612.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 80ac3e662fe4 -r 760a81881b3a TB6612.cpp
--- a/TB6612.cpp	Mon Jul 22 10:27:26 2019 +0000
+++ b/TB6612.cpp	Mon Aug 26 09:25:17 2019 +0000
@@ -43,14 +43,14 @@
 //   float speed -1.0 - 0.0 - 1.0
 float TB6612::speed(float speed) {
     
-    if( speed > 0.0 )
+    if( speed > 0.0f )
     {
         _pwm = speed;
         _fwd = 1;
         _rev = 0;
         stat = 1;
     }
-    else if( speed < 0.0 )
+    else if( speed < 0.0f )
     {
         _pwm = -speed;
         _fwd = 0;