MOtor control Pololu

Dependencies:   Encoder HIDScope mbed-dsp mbed

Files at this revision

API Documentation at this revision

Comitter:
vsluiter
Date:
Mon Oct 20 14:02:05 2014 +0000
Parent:
14:91403dd3dcf5
Commit message:
Used fabs instead of abs

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 91403dd3dcf5 -r 743fc8794a1f main.cpp
--- a/main.cpp	Mon Oct 20 11:38:18 2014 +0000
+++ b/main.cpp	Mon Oct 20 14:02:05 2014 +0000
@@ -59,7 +59,7 @@
             motordir = 0;
         else
             motordir = 1;
-        pwm_motor.write(abs(new_pwm));
+        pwm_motor.write(fabs(new_pwm));
     }
 }