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:
- 35:3779201b4c73
- Parent:
- 33:eb260dbfc22a
- Child:
- 36:2cc739c7e4cb
diff -r 234b87f3e6ce -r 3779201b4c73 globalFlags.cpp
--- a/globalFlags.cpp Sat Dec 22 09:08:10 2018 +0000
+++ b/globalFlags.cpp Tue Dec 25 08:20:17 2018 +0000
@@ -1,6 +1,5 @@
#include "globalFlags.h"
-//#define STATE_BUF_SIZ 8
//モニタ用LED
DigitalOut led1(LED1);
@@ -10,7 +9,6 @@
//モーターアクセル用アナログ入力
AnalogIn AinAxl(p20);
-//GlobalFlags gf;
char g_CmdBuf[G_CMD_BUF_SIZ] ;// コマンド受け渡しバッファ
bool gf_CmdPrs;
@@ -24,15 +22,10 @@
typPrintFlag gf_Mon ;//
typCalFlag gf_Cal ;//
typDbgPrintFlg gf_DbgPrint ;//デバッグ用
-//typAccel gf_AxReq[2] ={0,} ;//アクセル更新
-//typAccel gf_MtReq[4] ={0,} ;//モーター更新
typAccel gf_AxReq[2] ;//アクセル更新フラグ
-//typAccel gf_MtReq[4] ;//モーター更新フラグ
-//typAccel gf_MtReqOfs[4] ;//モーターオフセット更新フラグ
typAxlRpm gf_MtReq[4] ;//モーター姿勢制御更新フラグ
typAxlRpm gf_MtReqOfs[4] ;//モーターオフセット更新フラグ
typAxlRpm gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ
-//typ1Push gf_MtReqOP[4] ;//モーターの回転制御動作用 一時的出力アップダウン
typAxlRpm gf_MtReqU[4] ;//モーターユーザー更新フラグ
enmHbState gf_State = SLEEP;
@@ -79,21 +72,11 @@
g_PidPara.IMin = -2000;
for(int i = 0; i < 4; ++i){
gf_MotParaUpdate[i] = false;
- //g_MotPara[i].offset = 0;
g_MotPara[i].limit_hi = LIM_MOT_INP_MAX;
g_MotPara[i].limit_low = LIM_MOT_INP_MIN;
}
}
-void init1PushStruct(typ1Push& item){
- item.req = false;
- item.sFlg = false;
- item.add_end = false;
- item.jumpFlg = false;
- item.addVal = 0;
- item.counter = 0;
- item.num = 0;
- item.sVal = 0;
-}
+
void setState(enmHbState stat){
// ありえない遷移を排除
if(gf_State == SLEEP){if(stat != WAKEUP) return;}