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.
globalFlags.h
- Committer:
- takeru0x1103
- Date:
- 2018-12-01
- Revision:
- 18:5aa48aec9cae
- Parent:
- 17:f9610f3cfa1b
- Child:
- 19:4b0fe9a5ec38
File content as of revision 18:5aa48aec9cae:
#ifndef __GLOBALFLAGS_H__ #define __GLOBALFLAGS_H__ #include "mbed.h" #include "typedef.h" typedef union{ UINT16 flg; struct{ bool e1 : 1;//前エンジン回転数 bool e2 : 1;//後ろエンジン回転数 bool m1 : 1;//サブモーター回転数 bool m2 : 1;//サブモーター回転数 bool m3 : 1;//サブモーター回転数 bool m4 : 1;//サブモーター回転数 bool gy : 1;//ジャイロ bool yaw : 1;//ヨー角 bool fb : 1;//PID制御feedback結果 bool pp : 1;//P制御ゲイン(アウターループ) bool p : 1;//P制御ゲイン bool i : 1;//I制御ゲイン bool d : 1;//D制御ゲイン }bf; }typPrintFlag; typedef union{ UINT16 flg; struct{ bool e1 : 1;// bool e2 : 1;// bool m1 : 1;// bool m2 : 1;// bool m3 : 1;// bool m4 : 1;// bool gy : 1;// bool yaw : 1;// bool fb : 1;//PID制御feedback結果 bool pp : 1;//P制御ゲイン(アウターループ) bool p : 1;//P制御ゲイン bool i : 1;//I制御ゲイン bool d : 1;//D制御ゲイン }bf; }typCalFlag; //チェックフラグ typedef union{ UINT16 flg; struct{ bool mot : 1;// bool sw : 1;// bool accel: 1;// }bf; }typChkFlag; typedef union{ UINT16 dt; struct{ UINT16 val : 12;//アクセル設定値 bool req : 1;//アクセル更新要求 }bf; }typAccel; ///////////////////////////////////////////////// //モニタ用LED extern DigitalOut led1; extern DigitalOut led2; extern DigitalOut led3; extern DigitalOut led4; extern typPrintFlag gf_Print; extern typPrintFlag gf_Mon; extern typCalFlag gf_Cal; // extern typChkFlag gf_Chk; //チェックフラグ extern bool gf_CmdPrs; //コマンドパーサー実行要求フラグ extern typAccel gf_AxReq[2]; //アクセル更新 extern typAccel gf_MtReq[4]; //モーター更新 extern bool gf_AttCntEna; //姿勢制御イネーブル #endif