Robotics Term Project / Mbed 2 deprecated Robottics_Motion

Dependencies:   mbed

Revision:
31:6a894ff3ed18
Parent:
30:2ce51e8719ff
Child:
32:fb8f40fde82c
diff -r 2ce51e8719ff -r 6a894ff3ed18 AI_Friday.cpp
--- a/AI_Friday.cpp	Thu May 26 11:29:00 2016 +0000
+++ b/AI_Friday.cpp	Thu May 26 11:40:02 2016 +0000
@@ -65,8 +65,7 @@
 float angleC;// car's angle 
 double xP,yP,distance; //position that car need to reach
 float angleR; //  angleR =  car-nextSpot direction  --->  car direction
-
-int xGate = 800, yGate = 300;
+int xGate = 136, yGate = 328; //左們136 328, 右們874,316   
 double angleGate, distanceGate;
 int aI_State = 0;
 int bor_state = 1;
@@ -133,7 +132,9 @@
     else Distance_Target = Distance_Target;
             
     //y_position_car_1
-    Y_Position_1 = (Receive_Data[13]-0x30)*100 + (Receive_Data[14]-0x30)*10 + (Receive_Data[15]-0x30);
+    Y_Position_1 = (Receive_Data[13]-0x30)*100 + (Receive_Data[14]-0x30)*10 + (
+    
+    _Data[15]-0x30);
             
     if(Receive_Data[12] == '-')Distance_Target = -1* Distance_Target;
     else Distance_Target = Distance_Target;