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.
Fork of T_motor by
Diff: T_motor.cpp
- Revision:
- 7:a1d54597161d
- Parent:
- 6:dc3db7df2a4b
- Child:
- 8:2759e619969a
diff -r dc3db7df2a4b -r a1d54597161d T_motor.cpp
--- a/T_motor.cpp Mon Sep 04 02:04:39 2017 +0000
+++ b/T_motor.cpp Thu Sep 21 08:14:35 2017 +0000
@@ -27,7 +27,7 @@
T_motor& T_motor::operator=(float fval)// -1 <= fval <= 1
{
- if(fabs(fval) < 0.001f)free();
+ if(fabs(fval) < 0.005f)free();
else {
if(fval < 0) run(1,char(-1*fval*255));
else if(fval > 0) run(0,char(fval*255));
@@ -37,7 +37,7 @@
void T_motor::control(float fval)//copy from operator
{
- if(fabs(fval) < 0.001f)free();
+ if(fabs(fval) < 0.005f)free();
else {
if(fval < 0) run(1,char(-1*fval*255));
else if(fval > 0) run(0,char(fval*255));
