Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TB6612FNG_test line_trace_sample line_trace_sample_saitou line_trace_sample_tamada ... more
Revision 6:760a81881b3a, committed 2019-08-26
- 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;