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:
- 63:aee44afe6363
- Parent:
- 59:6b4dcd964d0f
- Child:
- 73:0720e5550476
--- a/globalFlags.cpp Fri Mar 08 11:43:00 2019 +0000 +++ b/globalFlags.cpp Mon Mar 11 02:25:41 2019 +0000 @@ -44,6 +44,7 @@ typAxlRpm gf_MtReqOfs[4]; //!< モーターオフセット値更新 typAxlRpm gf_MtReqU[4]; //!< モーターユーザー値更新 typAxlRpm gf_MtBrk; //!< モーターブレーキ時のRPM値更新 +typAxlRpm gf_MtDefaultOffset; //!< モーターのTAKE_OFFステート時に使用するデフォルトオフセット値更新 typAxlRpm gf_MtReqDct[8]; //!< ダイレクト(FPGA関数直接呼び出し)モーター値更新フラグ typAxlRpm gf_AngBrk; //!< ブレーキ時の1秒間の目標角度変化値[deg]更新 @@ -82,7 +83,7 @@ gf_AxStepReq[i].bf.req = false; gf_AxStepReq[i].bf.val = 30; gf_AxAdjStepReq[i].bf.req = false; - gf_AxAdjStepReq[i].bf.val = 20; + gf_AxAdjStepReq[i].bf.val = 50; } for(int i=0; i<4;++i){ @@ -100,6 +101,9 @@ gf_AngBrk.req = false; gf_AngBrk.val = DEF_BRK_ANG; + gf_MtDefaultOffset.req = false; + gf_MtDefaultOffset.val = DEF_MOT_OFFSET; + for(int i = 0; i < 8; ++i){ gf_MtReqDct[i].req = false; gf_MtReqDct[i].val = 0; @@ -110,11 +114,11 @@ gf_State = SLEEP; gf_StateEnt = false; g_PidPara.PP = 2; - g_PidPara.P = 0; - g_PidPara.I = 0; - g_PidPara.D = 0; - g_PidPara.IMax = 2000; - g_PidPara.IMin = -2000; + g_PidPara.P = 700000; + g_PidPara.I = 200000; + g_PidPara.D = 700000; + g_PidPara.IMax = 1000000; + g_PidPara.IMin = -1000000; g_PidPara.mode = PID_0_OFF; // for(int i = 0; i < 4; ++i){