ObjectFollower

Dependencies:   TPixy-Interface

Fork of PlayBack by ECE4333 - 2018 - Ahmed & Brandon

Revision:
16:58ec2b891a25
Parent:
15:cf67f83d5409
Child:
20:9118203f7c9c
Child:
26:e93890381e66
diff -r cf67f83d5409 -r 58ec2b891a25 Drivers/PiController.cpp
--- a/Drivers/PiController.cpp	Sat Mar 03 04:47:26 2018 +0000
+++ b/Drivers/PiController.cpp	Sun Mar 11 00:37:58 2018 +0000
@@ -80,9 +80,7 @@
     int32_t uS;
     
     setpointR_mutex.lock();
-    setpointL_mutex.lock();
     e = SaturatingSubtract(setp, dP);  // e is the velocity error
-    setpointL_mutex.unlock();
     setpointR_mutex.unlock();
 
     xTemp = SaturatingAdd(xState, e);
@@ -121,11 +119,9 @@
     int32_t uIntegral;
     int32_t uS;
     
-    setpointR_mutex.lock();
     setpointL_mutex.lock();
     e = SaturatingSubtract(setp, dP);  // e is the velocity error
     setpointL_mutex.unlock();
-    setpointR_mutex.unlock();
 
     xTemp = SaturatingAdd(xState, e);