Robotics Term Project / Mbed 2 deprecated Robottics_Motion

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
smilestone520
Date:
Thu May 26 11:40:02 2016 +0000
Parent:
30:2ce51e8719ff
Child:
32:fb8f40fde82c
Commit message:
hahaha;

Changed in this revision

AI_Friday.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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;