TB6612FNG用のモータコントロールライブラリ
Dependents: TB6612FNG_test line_trace_sample line_trace_sample_saitou line_trace_sample_tamada ... more
Diff: TB6612.cpp
- Revision:
- 6:760a81881b3a
- Parent:
- 5:80ac3e662fe4
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;