Robotics Term Project / Mbed 2 deprecated Robottics_Motion

Dependencies:   mbed

Revision:
28:d576b1190610
Parent:
27:1696ef46b538
Child:
29:47519f2b14ad
--- a/AI_Friday.cpp	Thu May 26 10:35:46 2016 +0000
+++ b/AI_Friday.cpp	Thu May 26 10:36:46 2016 +0000
@@ -264,9 +264,11 @@
                     break;
                 case 4: // 順時轉到特定角 結束  v1-- v2 --
                     
+                    if((borAngle-angleC)> 5 || (borAngle-angleC)<-5)//誤差容忍正負五度
+                    {
                         v1_ref = -100;
                         v2_ref = -100;    
-                    
+                    }
                     else
                     {
                         borAngle = 0;