Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
Diff: AI_Friday.cpp
- Revision:
- 21:6e8ab9487985
- Parent:
- 20:5b892e37a958
- Child:
- 22:d7b98234291c
--- 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