Main Program
Dependencies: mbed AQM1602 HMC6352 PID
def.h
- Committer:
- lilac0112_1
- Date:
- 2015-09-15
- Revision:
- 2:97a4070c34d7
- Parent:
- 1:f2633c150301
- Child:
- 3:f7c906e52339
File content as of revision 2:97a4070c34d7:
#ifndef _DEF_H_ #define _DEF_H_ /*PID処理*/ #define RATE 0.052//52 #define PID_BIAS 0.2 #define REFERENCE 180.0 #define MINIMUM 0.0 #define MAXIMUM 359.0 #define P_GAIN 1.4//1.4 //0.78 #define I_GAIN 0.0 //0.0 #define D_GAIN 0.05 //0.009 #define OUT_LIMIT 40.0 #define MAX_POW 100 #define MIN_POW -100 #define PID_CYCLE 0.05 //s /*Serial Mbed間*/ #define ADDRESS 0xAA //BT(BlueTooth) #define DATA_NUM 8+2//2byte→KEYCODE(拝啓)とCHECKCODE(敬具) 8byte→やりとりするデータ #define TX_KEYCODE 0xAA//あちらのKEYCODE #define RX_KEYCODE 0xAA//こちらのKEYCODE #define KEY 0//KEYCODEは配列の最初 #define CHECK DATA_NUM-1//CHECKCODEは配列の最後 //ロータリースイッチ 入力値 typedef enum{ NONE = 0x0, START, DEBUG0, DEBUG1, DEBUG2, TEST0, TEST1, TEST2, CALIBRATION0, CALIBRATION1, CALIBRATION2, SAVE, STORE, DEFENCE0, ATTACK0, STOP } SwState; //スイッチ 入力値 #define FRONT 0x1 #define BACK 0x2 #define EXIT 0x3 //Lcd出力文字サイズ #define BUFSIZE 7 typedef struct { uint8_t ping[4]; uint8_t ir[12]; uint8_t irLong[6]; uint8_t line[3]; uint8_t mouse[2]; uint16_t compass; uint8_t color[3]; } Record; #endif