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.cpp
- Revision:
- 32:7f4145cc3551
- Parent:
- 30:13ada1a24c59
- Child:
- 33:eb260dbfc22a
--- a/globalFlags.cpp Wed Dec 19 12:22:22 2018 +0000 +++ b/globalFlags.cpp Thu Dec 20 11:38:09 2018 +0000 @@ -27,12 +27,12 @@ typAccel gf_AxReq[2] ;//アクセル更新フラグ //typAccel gf_MtReq[4] ;//モーター更新フラグ //typAccel gf_MtReqOfs[4] ;//モーターオフセット更新フラグ -//typAccel gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ -typAxlRpm gf_MtReq[4] ;//モーター更新フラグ +typAxlRpm gf_MtReq[4] ;//モーター姿勢制御更新フラグ typAxlRpm gf_MtReqOfs[4] ;//モーターオフセット更新フラグ typAxlRpm gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ -//typOnePushFlg gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン -typ1Push gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン +//typ1Push gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン +typAxlRpm gf_MtReqU[4] ;//モーターユーザー更新フラグ + enmHbState gf_State = SLEEP; bool gf_PidParaUpdate ;//PID Pp,P,I,Dの係数アップデートフラグ @@ -57,16 +57,20 @@ gf_AxReq[0].dt = 0; gf_AxReq[1].dt = 0; for(int i=0; i<4;++i){ - gf_MtReq[i].dt = 0; - gf_MtReqOfs[i].dt = 0; - init1PushStruct(gf_MtReqOP[i]); + gf_MtReq[i].req = false; + gf_MtReq[i].val = 0; + gf_MtReqOfs[i].req = false; + gf_MtReqOfs[i].val = 0; + gf_MtReqU[i].req = false; + gf_MtReqU[i].val = 0; } for(int i = 0; i < 8; ++i){ - gf_MtReqDct[i].dt = 0; + gf_MtReqDct[i].req = false; + gf_MtReqDct[i].val = 0; } gf_State = SLEEP; g_PidPara.PP = 2; - g_PidPara.P = 2; + g_PidPara.P = 0; g_PidPara.I = 0; g_PidPara.D = 0; g_PidPara.IMax = 2000;