Robotics Term Project / Mbed 2 deprecated Robottics_Motion

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
smilestone520
Date:
Wed May 25 16:59:05 2016 +0000
Parent:
20:5b892e37a958
Child:
22:d7b98234291c
Commit message:
; I will type the border part tomorrow

Changed in this revision

AI_Friday.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/AI_Friday.cpp	Wed May 25 16:43:21 2016 +0000
+++ b/AI_Friday.cpp	Wed May 25 16:59:05 2016 +0000
@@ -73,7 +73,9 @@
 int xGate = 800, yGate = 300;
 double angleGate, distanceGate;
 int aI_State = 0;
+int bor_state = 1;
 double pi = 3.1415926;
+double borAngle=0;
 
 float longC; // car's length
 float longB;// long of the court
@@ -232,7 +234,25 @@
       
         case 1:   ///   border condition
             // check if car fit border conditions
-            funcBorder();
+            switch(bor_state){
+                case 1:
+                    funcBorder();
+                    break;
+                case 2: // 前進、後退 再判別
+                    break;
+                case 3: // 順時轉到特定角 結束
+                    
+                    break;
+                case 4: // 逆時轉到特定角 結束
+                    
+                    break;
+                case 5:  //結束
+                    borAngle = 0;
+                    aI_State = 2;
+                    break;
+                
+                }
+            
            //****to case2
             break;
         case 2://move to get ball