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:
- 32:7f4145cc3551
- Parent:
- 30:13ada1a24c59
- Child:
- 33:eb260dbfc22a
--- a/globalFlags.h Wed Dec 19 12:22:22 2018 +0000 +++ b/globalFlags.h Thu Dec 20 11:38:09 2018 +0000 @@ -28,6 +28,7 @@ bool p : 1;//P制御ゲイン bool i : 1;//I制御ゲイン bool d : 1;//D制御ゲイン + bool v : 1;//PID2(torgue)角速度feedback制御用ゲイン bool stat : 1;//ステート表示 }bf; }typPrintFlag; @@ -60,14 +61,20 @@ }bf; }typAccel; -typedef union{ - UINT16 dt; - struct{ - UINT16 val : 14;//アクセル設定値 - bool req : 1;//アクセル更新要求 - }bf; +//typedef union{ +// UINT16 dt; +// struct{ +// INT16 val : 15;//アクセル設定値 +// bool req : 1;//アクセル更新要求 +// }bf; +//}typAxlRpm; + +typedef struct{ + INT16 val;//アクセル設定値 + bool req;//アクセル更新要求 }typAxlRpm; + typedef union{ UINT16 flg; struct{ @@ -129,7 +136,11 @@ IN = 0, OUT, }; - +enum eMotInType{ + OFS = 0, + ATT, + USER, +}; ///////////////////////////////////////////////// void init1PushStruct(typ1Push& item); @@ -186,12 +197,11 @@ extern typAccel gf_AxReq[2]; //アクセル更新 //extern typAccel gf_MtReq[4]; //モーター更新 //extern typAccel gf_MtReqOfs[4]; //モーターオフセット更新 -//extern typAccel gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ -extern typAxlRpm gf_MtReq[4]; //モーター更新 +extern typAxlRpm gf_MtReq[4]; //モーター姿勢制御更新 extern typAxlRpm gf_MtReqOfs[4]; //モーターオフセット更新 +extern typAxlRpm gf_MtReqU[4]; //モーターユーザー更新 extern typAxlRpm gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ -//extern typOnePushFlg gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン -extern typ1Push gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン +//extern typ1Push gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン extern enmHbState gf_State; //現在のステート