Fork of T_motor by
Revision 6:dc3db7df2a4b, committed 2017-09-04
- Comitter:
- fujikenac
- Date:
- Mon Sep 04 02:04:39 2017 +0000
- Parent:
- 5:0e69f06b24ff
- Child:
- 7:a1d54597161d
- Commit message:
- fix operator, control
Changed in this revision
T_motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/T_motor.cpp Sat Sep 02 07:15:47 2017 +0000 +++ b/T_motor.cpp Mon Sep 04 02:04:39 2017 +0000 @@ -27,7 +27,7 @@ T_motor& T_motor::operator=(float fval)// -1 <= fval <= 1 { - if(fabs(fval) < 0.1f)free(); + if(fabs(fval) < 0.001f)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.1f)free(); + if(fabs(fval) < 0.001f)free(); else { if(fval < 0) run(1,char(-1*fval*255)); else if(fval > 0) run(0,char(fval*255));