velocity control

Dependencies:   PID QEI mbed

Fork of PID_VelocityExample by Aaron Berk

Revision:
1:ac598811dd00
Parent:
0:9bca35ae9c6b
Child:
2:646e3bca12a8
--- a/main.cpp	Tue Aug 03 09:24:06 2010 +0000
+++ b/main.cpp	Sat Nov 27 11:37:20 2010 +0000
@@ -89,7 +89,7 @@
         leftVelocity = (leftPulses - leftPrevPulses) / RATE;
         leftPrevPulses = leftPulses;
         leftController.setProcessValue(leftVelocity);
-        leftPwmDuty = leftController.getRealOutput();
+        leftPwmDuty = leftController.compute();
         leftMotor = leftPwmDuty;
         fprintf(fp, "%f,%f\n", leftVelocity, goal);
         wait(RATE);