cleanup: reduce scope of variables

Various things caught by cppcheck that are non-critical.

Change-Id: I495453c84bc15788b85036a163ee36b0ac601fa1
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/pid/ec/pid.cpp b/pid/ec/pid.cpp
index ef0df14..c2236c2 100644
--- a/pid/ec/pid.cpp
+++ b/pid/ec/pid.cpp
@@ -44,7 +44,7 @@
 {
     float error;
 
-    float p_term = 0.0f;
+    float p_term;
     float i_term = 0.0f;
     float ff_term = 0.0f;