Problems with motor #2

Dependents:   quadCommand2

Fork of PID by Derek McLean

Files at this revision

API Documentation at this revision

Comitter:
gabdo
Date:
Wed Jul 03 02:40:06 2013 +0000
Parent:
2:b214010a0c1b
Commit message:
Motor #2 issue

Changed in this revision

PID.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r b214010a0c1b -r 8172f254dff4 PID.cpp
--- a/PID.cpp	Tue Jul 02 21:03:30 2013 +0000
+++ b/PID.cpp	Wed Jul 03 02:40:06 2013 +0000
@@ -27,7 +27,7 @@
                    const float targetPosition,
                    const float dt)
 {
-    float currentError;
+    float currentError = 0;
     float proportionalControl, integralControl, derivativeControl;
 
     // How far away we are from the target