Main Program

Dependencies:   mbed AQM1602 HMC6352 PID

Revision:
22:a95f7c63af3c
Parent:
21:d69a8f3c76e1
Child:
23:d95d8d3e89f3
diff -r d69a8f3c76e1 -r a95f7c63af3c setting/def.h
--- a/setting/def.h	Sat Jan 30 09:02:03 2016 +0000
+++ b/setting/def.h	Sat Jan 30 09:27:51 2016 +0000
@@ -47,7 +47,7 @@
 #define PID_CYCLE   0.05   //s
 
 //思考パターン
-#define STRATEGY_NUM 1
+#define STRATEGY_NUM 12
 
 //計算
 #define ROUND(x) ((x > 0) ? (x + 0.5) : (x - 0.5))//x...整数
@@ -57,14 +57,18 @@
 
 //データ
 typedef struct {//ir,line,gyro,mouse,ping
+    //ping
     uint8_t ping[2];
-    uint8_t irPosition;
-    uint8_t irState;
-    uint8_t rawLn;
-    uint8_t heldLn;
+    //ir
+    uint8_t irKey;
+    uint8_t irNotice;
+    uint8_t irSpot[2];
+    //line
+    uint8_t lnFlag[3];
     uint8_t ball;
     uint8_t AvailableKick;
     int32_t mouse[2];//0...x,1...y//1cm nearlyeq 1000count
+    //cmps&pid
     double cmps, CmpsInitialValue, FrontDeg;//0<x<360
     double InputPID;//<<gyrosensor
     uint16_t OutputPID;//>>motor