Motor
Dependents: ASEE-2014 frdm_Wall
Fork of Motor by
Revision 4:de727286a2a8, committed 2014-03-06
- Comitter:
- cbradford
- Date:
- Thu Mar 06 02:21:13 2014 +0000
- Parent:
- 3:7f1fd2d62c72
- Commit message:
- Fixed stuff
Changed in this revision
Motor.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 7f1fd2d62c72 -r de727286a2a8 Motor.cpp --- a/Motor.cpp Thu Feb 27 01:40:41 2014 +0000 +++ b/Motor.cpp Thu Mar 06 02:21:13 2014 +0000 @@ -35,10 +35,14 @@ } void Motor::speed(float speed) { - if(speed > 0.0) + if(speed > 0.0){ _fwd = abs(speed); - else + _rev = 0; + } + else{ _rev = abs(speed); + _fwd = 0; + } }