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:
- 50:76413e8e073d
- Parent:
- 48:71aec693a7dc
- Child:
- 53:b09c062cc31c
--- a/globalFlags.cpp Mon Feb 25 12:51:35 2019 +0000 +++ b/globalFlags.cpp Tue Feb 26 08:44:06 2019 +0000 @@ -4,7 +4,6 @@ * @author Shirota, Nomura * @date 2018/10/01 ? */ - #include "typedef.h" #include "globalFlags.h" @@ -39,6 +38,7 @@ typAccel gf_AxReqH[2]; //!< 浮上時エンジンアクセル値更新フラグ typAccel gf_AxStepReq[2]; //!< エンジンアクセル用サーボ動作ステップ値更新フラグ typAxlRpm gf_MtReq[4]; //!< モーター姿勢制御値更新 +typAxlRpm gf_MtAttOfs[4]; //!< モーター姿勢制御オフセット値更新 typAxlRpm gf_MtReqOfs[4]; //!< モーターオフセット値更新 typAxlRpm gf_MtReqU[4]; //!< モーターユーザー値更新 typAxlRpm gf_MtReqDct[8]; //!< ダイレクト(FPGA関数直接呼び出し)モーター値更新フラグ @@ -46,7 +46,6 @@ typSWCmd gf_SwCmd; //!< スイッチが押されたことを模擬するフラグ enmHbState gf_State = SLEEP; //!< 現在のステートを格納する変数 - bool gf_StateEnt; //!< 状態遷移後、最初であることを示す bool gf_PidParaUpdate; //!< PID Pp,P,I,Dの係数アップデートフラグ @@ -76,7 +75,7 @@ gf_AxReq[i].dt = 0; gf_AxReqH[i].dt = 0; gf_AxStepReq[i].bf.req = false; - gf_AxStepReq[i].bf.val = 100; + gf_AxStepReq[i].bf.val = 30; } for(int i=0; i<4;++i){ @@ -86,7 +85,10 @@ gf_MtReqOfs[i].val = 0; gf_MtReqU[i].req = false; gf_MtReqU[i].val = 0; + gf_MtAttOfs[i].req = false; + gf_MtAttOfs[i].val = 0; } + for(int i = 0; i < 8; ++i){ gf_MtReqDct[i].req = false; gf_MtReqDct[i].val = 0; @@ -102,6 +104,8 @@ g_PidPara.D = 0; g_PidPara.IMax = 2000; g_PidPara.IMin = -2000; + g_PidPara.mode = PID_0_OFF; + // for(int i = 0; i < 4; ++i){ // gf_MotParaUpdate[i] = false; // g_MotPara[i].limit_hi = LIM_MOT_INP_MAX;