car using PID from centre line

Dependencies:   FRDM-TFC mbed CBuffer XBEE mbed_angular_speed motor2 MMA8451Q

Fork of KL25Z_Camera_Test by GDP 4

Revision:
24:15264aee54d1
Parent:
20:ed954836d028
diff -r ed954836d028 -r 15264aee54d1 main.cpp
--- a/main.cpp	Fri Dec 09 11:10:14 2016 +0000
+++ b/main.cpp	Tue Dec 13 10:07:30 2016 +0000
@@ -204,7 +204,9 @@
                 //sendString("stop turning turned=%d",turning);
                 keepTurning = 0;
                 turning = 0;    
-                TFC_SetMotorPWM(speed,speed);
+                // effectively turns of the electronic differential.
+                right_motor_pid.desired_value=speed;
+                left_motor_pid.desired_value=speed;
             }
                
         }