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.
Diff: globalFlags.h
- Revision:
- 20:0394e15412c3
- Parent:
- 19:4b0fe9a5ec38
- Child:
- 21:78302ecdb661
--- a/globalFlags.h Wed Dec 05 00:12:38 2018 +0000 +++ b/globalFlags.h Wed Dec 05 01:43:55 2018 +0000 @@ -45,16 +45,6 @@ }bf; }typCalFlag; -//チェックフラグ -typedef union{ - UINT16 flg; - struct{ - bool mot : 1;// - bool sw : 1;// - bool accel: 1;// - }bf; -}typChkFlag; - // typedef union{ UINT16 dt; @@ -67,24 +57,30 @@ //ステート定義 enum enmHbState {NONE //何もなし - ,WAKEUP // - ,CHECK_MOT // - ,IDLE // - ,TAKE_OFF // - ,GROUND // + ,WAKEUP //起動処理 + ,STANDBY //スタンバイ(エンジンかかるの待ち) + ,IDLE //アイドル(エンジン) + ,TAKE_OFF //離陸 + ,HOVER //ホバリング + ,GROUND //着陸 + ,CHK_ENT //チェックエンター + ,CHK_MOT //モーターチェック + ,CHK_AXL //アクセルサーボチェック + ,CHK_ATT //姿勢制御チェック + ,CHK_EXIT //チェックステート脱出 }; ///////////////////////////////////////////////// class GlobalFlags{ private: - enmHbState state;//現在のステート enmHbState stateQueue[STATE_QUE_SIZ];//ステート予約用のキューバッファ int wp; //ライトポインタ int rp; //リードポインタ bool full; //フルフラグ bool empty; //エンプティフラグ public: - GlobalFlags(); + enmHbState state;//現在のステート + GlobalFlags();//コンストラクタ bool push(enmHbState iState); bool pull(); }; @@ -103,7 +99,7 @@ extern typPrintFlag gf_Print; //デバッグプリントフラグ(1回表示) extern typPrintFlag gf_Mon; //デバッグモニタフラグ(繰り返し表示) extern typCalFlag gf_Cal; // -extern typChkFlag gf_Chk; //チェックフラグ +//extern typChkFlag gf_Chk; //チェックフラグ extern typAccel gf_AxReq[2]; //アクセル更新 extern typAccel gf_MtReq[4]; //モーター更新 extern bool gf_AttCntEna; //姿勢制御イネーブル