ジャパンオープン用のメインプログラム

Dependencies:   mbed AQM1602 HMC6352 PID

Revision:
30:5998ba42237e
Parent:
29:e8bafe48aa90
Child:
32:367b16d69a32
--- a/setting/def.h	Tue Mar 22 07:01:10 2016 +0000
+++ b/setting/def.h	Wed Mar 23 11:25:22 2016 +0000
@@ -2,8 +2,8 @@
 #define _DEF_H_
 
 //red or green
-#define RED_CAT
-//#define GREEN_CAT
+//#define RED_CAT//jj
+#define GREEN_CAT//lily
 
 //BT(BlueTooth)
 #define DATA_NUM 8+2//2byte→KEYCODE(拝啓)とCHECKCODE(敬具) 8byte→やりとりするデータ
@@ -168,6 +168,8 @@
 #define LINE_DELAY_2 0.125//0.5//.25
 #define LINE_DELAY_3 0.125//.25
 
+#define LINE_REPEAT 1
+
 #define L_LINE 1
 #define R_LINE 0
 #define F_LINE 2
@@ -217,7 +219,7 @@
 typedef struct {
     //cmps&pid
     double cmps, CmpsInitialValue, CmpsDiff;//0<x<360
-    int16_t FrontDeg, AtkDeg, HoldDeg;
+    int16_t FrontDeg, AtkDeg, HoldDeg, GoalDeg;
     //正...右回転
     //負...左回転
     double InputPID;//<<gyrosensor
@@ -245,6 +247,7 @@
     uint8_t lnStop[2];
     //uint8_t lnStay[2];
     uint8_t lnStay[2];
+    uint8_t lnStayNow[2];
     uint8_t lnCorner[4];
     uint8_t lnRepeat;
     uint8_t FieldSpot;//0...inside,1...outside
@@ -265,6 +268,7 @@
     uint8_t irNotice;
     uint8_t irLastNotice;
     uint8_t irStayNotice;
+    uint8_t irLastPosition;
     //ball
     uint8_t ball;
 } SensorVal;