teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
takeru0x1103
Date:
Fri Nov 30 05:24:27 2018 +0000
Revision:
17:f9610f3cfa1b
Parent:
16:05b9e44889f1
Child:
18:5aa48aec9cae
1130

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 8:1ca49cb18290 1 #ifndef __GLOBALFLAGS_H__
takeru0x1103 8:1ca49cb18290 2 #define __GLOBALFLAGS_H__
takeru0x1103 8:1ca49cb18290 3
takeru0x1103 16:05b9e44889f1 4 #include "mbed.h"
takeru0x1103 17:f9610f3cfa1b 5 #include "typedef.h"
takeru0x1103 17:f9610f3cfa1b 6
takeru0x1103 17:f9610f3cfa1b 7 typedef union{
takeru0x1103 17:f9610f3cfa1b 8 UINT16 flg;
takeru0x1103 17:f9610f3cfa1b 9 struct{
takeru0x1103 17:f9610f3cfa1b 10 bool e1 : 1;//前エンジン回転数
takeru0x1103 17:f9610f3cfa1b 11 bool e2 : 1;//後ろエンジン回転数
takeru0x1103 17:f9610f3cfa1b 12 bool m1 : 1;//サブモーター回転数
takeru0x1103 17:f9610f3cfa1b 13 bool m2 : 1;//サブモーター回転数
takeru0x1103 17:f9610f3cfa1b 14 bool m3 : 1;//サブモーター回転数
takeru0x1103 17:f9610f3cfa1b 15 bool m4 : 1;//サブモーター回転数
takeru0x1103 17:f9610f3cfa1b 16 bool gy : 1;//ジャイロ
takeru0x1103 17:f9610f3cfa1b 17 bool yaw : 1;//ヨー角
takeru0x1103 17:f9610f3cfa1b 18 bool pp : 1;//P制御
takeru0x1103 17:f9610f3cfa1b 19 bool p : 1;//
takeru0x1103 17:f9610f3cfa1b 20 bool i : 1;//
takeru0x1103 17:f9610f3cfa1b 21 bool d : 1;//
takeru0x1103 17:f9610f3cfa1b 22
takeru0x1103 17:f9610f3cfa1b 23 }bf;
takeru0x1103 17:f9610f3cfa1b 24 }typPrintFlag;
takeru0x1103 17:f9610f3cfa1b 25
takeru0x1103 17:f9610f3cfa1b 26 typedef union{
takeru0x1103 17:f9610f3cfa1b 27 UINT16 flg;
takeru0x1103 17:f9610f3cfa1b 28 struct{
takeru0x1103 17:f9610f3cfa1b 29 bool e1 : 1;//
takeru0x1103 17:f9610f3cfa1b 30 bool e2 : 1;//
takeru0x1103 17:f9610f3cfa1b 31 bool m1 : 1;//
takeru0x1103 17:f9610f3cfa1b 32 bool m2 : 1;//
takeru0x1103 17:f9610f3cfa1b 33 bool m3 : 1;//
takeru0x1103 17:f9610f3cfa1b 34 bool m4 : 1;//
takeru0x1103 17:f9610f3cfa1b 35 bool gy : 1;//
takeru0x1103 17:f9610f3cfa1b 36 bool yaw : 1;//
takeru0x1103 17:f9610f3cfa1b 37 }bf;
takeru0x1103 17:f9610f3cfa1b 38 }typCalFlag;
takeru0x1103 17:f9610f3cfa1b 39
takeru0x1103 17:f9610f3cfa1b 40 typedef union{
takeru0x1103 17:f9610f3cfa1b 41 UINT16 dt;
takeru0x1103 17:f9610f3cfa1b 42 struct{
takeru0x1103 17:f9610f3cfa1b 43 UINT16 val : 12;//アクセル設定値
takeru0x1103 17:f9610f3cfa1b 44 bool req : 1;//アクセル更新要求
takeru0x1103 17:f9610f3cfa1b 45 }bf;
takeru0x1103 17:f9610f3cfa1b 46 }typAccel;
takeru0x1103 17:f9610f3cfa1b 47
takeru0x1103 17:f9610f3cfa1b 48 /////////////////////////////////////////////////
takeru0x1103 8:1ca49cb18290 49
takeru0x1103 16:05b9e44889f1 50
takeru0x1103 17:f9610f3cfa1b 51 //モニタ用LED
takeru0x1103 16:05b9e44889f1 52 extern DigitalOut led1;
takeru0x1103 16:05b9e44889f1 53 extern DigitalOut led2;
takeru0x1103 16:05b9e44889f1 54 extern DigitalOut led3;
takeru0x1103 16:05b9e44889f1 55 extern DigitalOut led4;
takeru0x1103 8:1ca49cb18290 56
takeru0x1103 17:f9610f3cfa1b 57 extern typPrintFlag gf_Print;
takeru0x1103 17:f9610f3cfa1b 58 extern typCalFlag gf_Cal;
takeru0x1103 17:f9610f3cfa1b 59 extern bool gf_CmdPrs; //コマンドパーサー実行要求フラグ
takeru0x1103 17:f9610f3cfa1b 60 extern typAccel gf_AxReq[2]; //アクセル更新
takeru0x1103 17:f9610f3cfa1b 61 extern typAccel gf_MtReq[4]; //モーター更新
takeru0x1103 17:f9610f3cfa1b 62 extern bool gf_AttCntEna; //姿勢制御イネーブル
takeru0x1103 8:1ca49cb18290 63
takeru0x1103 8:1ca49cb18290 64 #endif /* GYRO_H */