teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Thu Jan 24 13:21:01 2019 +0000
Revision:
43:156199c2f9b6
Parent:
42:cc8501b824ba
Child:
44:14fe4bd10fdb
20190124 Modify for 45inc.; Add to varialble servo step val , Blink LED when pressing up-down sw in HOVER State.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 8:1ca49cb18290 1 #ifndef __GLOBALFLAGS_H__
takeru0x1103 8:1ca49cb18290 2 #define __GLOBALFLAGS_H__
takeru0x1103 8:1ca49cb18290 3
takeru0x1103 16:05b9e44889f1 4 #include "mbed.h"
takeru0x1103 17:f9610f3cfa1b 5 #include "typedef.h"
takeru0x1103 17:f9610f3cfa1b 6
takeru0x1103 19:4b0fe9a5ec38 7 #define G_CMD_BUF_SIZ 32
takeru0x1103 19:4b0fe9a5ec38 8 #define STATE_QUE_SIZ 8
takeru0x1103 19:4b0fe9a5ec38 9
MasashiNomura 22:24c9c2dedca9 10 #define STATE_BUF_SIZ 8
MasashiNomura 22:24c9c2dedca9 11
MasashiNomura 25:f3a6e7eec9c3 12 #define LIM_MOT_INP_MIN -2000
MasashiNomura 25:f3a6e7eec9c3 13 #define LIM_MOT_INP_MAX 2000
MasashiNomura 25:f3a6e7eec9c3 14
MasashiNomura 35:3779201b4c73 15 #define MAX_VAL_12BIT 4095
MasashiNomura 36:2cc739c7e4cb 16 #define BRK_RPM 4000
MasashiNomura 35:3779201b4c73 17
MasashiNomura 39:1b76f7df8804 18 typedef struct {
MasashiNomura 39:1b76f7df8804 19 union{
MasashiNomura 40:debe99e228d3 20 UINT16 flg;
MasashiNomura 39:1b76f7df8804 21 struct{
MasashiNomura 39:1b76f7df8804 22 bool e1 : 1;//前エンジン回転数
MasashiNomura 39:1b76f7df8804 23 bool e2 : 1;//後ろエンジン回転数
MasashiNomura 39:1b76f7df8804 24 bool m1 : 1;//サブモーター回転数
MasashiNomura 39:1b76f7df8804 25 bool m2 : 1;//サブモーター回転数
MasashiNomura 39:1b76f7df8804 26 bool m3 : 1;//サブモーター回転数
MasashiNomura 39:1b76f7df8804 27 bool m4 : 1;//サブモーター回転数
MasashiNomura 39:1b76f7df8804 28 bool gy : 1;//ジャイロ
MasashiNomura 39:1b76f7df8804 29 bool yaw : 1;//ヨー角
MasashiNomura 39:1b76f7df8804 30 bool fb : 1;//PID制御feedback結果
MasashiNomura 39:1b76f7df8804 31 bool pp : 1;//P制御ゲイン(アウターループ)
MasashiNomura 39:1b76f7df8804 32 bool p : 1;//P制御ゲイン
MasashiNomura 39:1b76f7df8804 33 bool i : 1;//I制御ゲイン
MasashiNomura 39:1b76f7df8804 34 bool d : 1;//D制御ゲイン
MasashiNomura 39:1b76f7df8804 35 bool v : 1;//PID2(torgue)角速度feedback制御用ゲイン
MasashiNomura 40:debe99e228d3 36 bool stat : 1;//ステート表示
MasashiNomura 40:debe99e228d3 37 }bf;
MasashiNomura 40:debe99e228d3 38 }d1;
MasashiNomura 40:debe99e228d3 39 union{
MasashiNomura 40:debe99e228d3 40 UINT32 flg;
MasashiNomura 40:debe99e228d3 41 struct{
MasashiNomura 41:45c982b1c5b6 42 bool ain : 1;//アナログ入力値
MasashiNomura 41:45c982b1c5b6 43 bool sw : 1;//User Ope Switch
MasashiNomura 39:1b76f7df8804 44 bool mo1 : 1;//Motor1 Offset val
MasashiNomura 39:1b76f7df8804 45 bool mo2 : 1;//Motor2 Offset val
MasashiNomura 39:1b76f7df8804 46 bool mo3 : 1;//Motor3 Offset val
MasashiNomura 39:1b76f7df8804 47 bool mo4 : 1;//Motor4 Offset val
MasashiNomura 42:cc8501b824ba 48 bool ep1 : 1;//前エンジンにセットされたパラメータ値
MasashiNomura 42:cc8501b824ba 49 bool ep2 : 1;//後エンジンにセットされたパラメータ値
MasashiNomura 40:debe99e228d3 50 bool rsv_01 : 1;
MasashiNomura 40:debe99e228d3 51 bool rsv_02 : 1;
MasashiNomura 40:debe99e228d3 52 bool rsv_03 : 1;
MasashiNomura 40:debe99e228d3 53 bool rsv_04 : 1;
MasashiNomura 40:debe99e228d3 54 bool rsv_05 : 1;
MasashiNomura 40:debe99e228d3 55 bool rsv_06 : 1;
MasashiNomura 40:debe99e228d3 56 bool rsv_07 : 1;
MasashiNomura 40:debe99e228d3 57 bool rsv_08 : 1;
MasashiNomura 39:1b76f7df8804 58 }bf;
MasashiNomura 39:1b76f7df8804 59 }d2;
MasashiNomura 39:1b76f7df8804 60 }typPrintFlg;
MasashiNomura 39:1b76f7df8804 61
MasashiNomura 41:45c982b1c5b6 62 // typedef union{
MasashiNomura 41:45c982b1c5b6 63 // UINT16 flg;
MasashiNomura 41:45c982b1c5b6 64 // struct{
MasashiNomura 41:45c982b1c5b6 65 // bool e1 : 1;//前エンジン回転数
MasashiNomura 41:45c982b1c5b6 66 // bool e2 : 1;//後ろエンジン回転数
MasashiNomura 41:45c982b1c5b6 67 // bool m1 : 1;//サブモーター回転数
MasashiNomura 41:45c982b1c5b6 68 // bool m2 : 1;//サブモーター回転数
MasashiNomura 41:45c982b1c5b6 69 // bool m3 : 1;//サブモーター回転数
MasashiNomura 41:45c982b1c5b6 70 // bool m4 : 1;//サブモーター回転数
MasashiNomura 41:45c982b1c5b6 71 // bool gy : 1;//ジャイロ
MasashiNomura 41:45c982b1c5b6 72 // bool yaw : 1;//ヨー角
MasashiNomura 41:45c982b1c5b6 73 // bool fb : 1;//PID制御feedback結果
MasashiNomura 41:45c982b1c5b6 74 // bool pp : 1;//P制御ゲイン(アウターループ)
MasashiNomura 41:45c982b1c5b6 75 // bool p : 1;//P制御ゲイン
MasashiNomura 41:45c982b1c5b6 76 // bool i : 1;//I制御ゲイン
MasashiNomura 41:45c982b1c5b6 77 // bool d : 1;//D制御ゲイン
MasashiNomura 41:45c982b1c5b6 78 // bool v : 1;//PID2(torgue)角速度feedback制御用ゲイン
MasashiNomura 41:45c982b1c5b6 79 // bool stat : 1;//ステート表示
MasashiNomura 41:45c982b1c5b6 80 // bool ain : 1;//アナログ入力値
MasashiNomura 41:45c982b1c5b6 81 // }bf;
MasashiNomura 41:45c982b1c5b6 82 // }typPrintFlag;
takeru0x1103 17:f9610f3cfa1b 83
takeru0x1103 17:f9610f3cfa1b 84 typedef union{
takeru0x1103 17:f9610f3cfa1b 85 UINT16 flg;
takeru0x1103 17:f9610f3cfa1b 86 struct{
takeru0x1103 17:f9610f3cfa1b 87 bool e1 : 1;//
takeru0x1103 17:f9610f3cfa1b 88 bool e2 : 1;//
takeru0x1103 17:f9610f3cfa1b 89 bool m1 : 1;//
takeru0x1103 17:f9610f3cfa1b 90 bool m2 : 1;//
takeru0x1103 17:f9610f3cfa1b 91 bool m3 : 1;//
takeru0x1103 17:f9610f3cfa1b 92 bool m4 : 1;//
takeru0x1103 17:f9610f3cfa1b 93 bool gy : 1;//
takeru0x1103 17:f9610f3cfa1b 94 bool yaw : 1;//
takeru0x1103 18:5aa48aec9cae 95 bool fb : 1;//PID制御feedback結果
takeru0x1103 18:5aa48aec9cae 96 bool pp : 1;//P制御ゲイン(アウターループ)
takeru0x1103 18:5aa48aec9cae 97 bool p : 1;//P制御ゲイン
takeru0x1103 18:5aa48aec9cae 98 bool i : 1;//I制御ゲイン
takeru0x1103 18:5aa48aec9cae 99 bool d : 1;//D制御ゲイン
takeru0x1103 17:f9610f3cfa1b 100 }bf;
takeru0x1103 17:f9610f3cfa1b 101 }typCalFlag;
takeru0x1103 17:f9610f3cfa1b 102
MasashiNomura 42:cc8501b824ba 103 typedef union{
MasashiNomura 42:cc8501b824ba 104 UINT16 dt;
MasashiNomura 42:cc8501b824ba 105 struct{
MasashiNomura 42:cc8501b824ba 106 UINT16 val : 15;//立てたいbit番号(現状0~10)
MasashiNomura 42:cc8501b824ba 107 bool req : 1;//コマンド要求
MasashiNomura 42:cc8501b824ba 108 }bf;
MasashiNomura 42:cc8501b824ba 109 }typSWCmd;
MasashiNomura 42:cc8501b824ba 110
takeru0x1103 19:4b0fe9a5ec38 111 //
takeru0x1103 17:f9610f3cfa1b 112 typedef union{
takeru0x1103 17:f9610f3cfa1b 113 UINT16 dt;
takeru0x1103 17:f9610f3cfa1b 114 struct{
takeru0x1103 18:5aa48aec9cae 115 UINT16 val : 12;//アクセル設定値
takeru0x1103 17:f9610f3cfa1b 116 bool req : 1;//アクセル更新要求
takeru0x1103 17:f9610f3cfa1b 117 }bf;
takeru0x1103 17:f9610f3cfa1b 118 }typAccel;
takeru0x1103 17:f9610f3cfa1b 119
MasashiNomura 32:7f4145cc3551 120 typedef struct{
MasashiNomura 32:7f4145cc3551 121 INT16 val;//アクセル設定値
MasashiNomura 32:7f4145cc3551 122 bool req;//アクセル更新要求
MasashiNomura 29:eb3d72dd94aa 123 }typAxlRpm;
MasashiNomura 29:eb3d72dd94aa 124
MasashiNomura 32:7f4145cc3551 125
MasashiNomura 41:45c982b1c5b6 126 // typedef union{
MasashiNomura 41:45c982b1c5b6 127 // UINT16 flg;
MasashiNomura 41:45c982b1c5b6 128 // struct{
MasashiNomura 41:45c982b1c5b6 129 // bool mo1 : 1;//Motor1 Offset val
MasashiNomura 41:45c982b1c5b6 130 // bool mo2 : 1;//Motor2 Offset val
MasashiNomura 41:45c982b1c5b6 131 // bool mo3 : 1;//Motor3 Offset val
MasashiNomura 41:45c982b1c5b6 132 // bool mo4 : 1;//Motor4 Offset val
MasashiNomura 41:45c982b1c5b6 133 // bool ana1 : 1;//AnalogRead for Motor Accel
MasashiNomura 41:45c982b1c5b6 134 // bool ana2 : 1;
MasashiNomura 41:45c982b1c5b6 135 // }bf;
MasashiNomura 41:45c982b1c5b6 136 // }typDbgPrintFlg;
MasashiNomura 25:f3a6e7eec9c3 137
MasashiNomura 29:eb3d72dd94aa 138 typedef union {
MasashiNomura 29:eb3d72dd94aa 139 UINT16 dt;
MasashiNomura 29:eb3d72dd94aa 140 struct{
MasashiNomura 29:eb3d72dd94aa 141 UINT16 num :6;
MasashiNomura 29:eb3d72dd94aa 142 UINT16 counter :6;
MasashiNomura 29:eb3d72dd94aa 143 //UINT16 pos :3;
MasashiNomura 29:eb3d72dd94aa 144 bool add_end :1;
MasashiNomura 29:eb3d72dd94aa 145 bool req :1;
MasashiNomura 29:eb3d72dd94aa 146 }bf;
MasashiNomura 29:eb3d72dd94aa 147 }typOnePushFlg;
MasashiNomura 24:c5945aaae777 148
takeru0x1103 19:4b0fe9a5ec38 149 //ステート定義
takeru0x1103 19:4b0fe9a5ec38 150 enum enmHbState
MasashiNomura 22:24c9c2dedca9 151 {NONE = 0 //何もなし
takeru0x1103 21:78302ecdb661 152 ,SLEEP //スリープモード(最初ここ)
takeru0x1103 20:0394e15412c3 153 ,WAKEUP //起動処理
takeru0x1103 20:0394e15412c3 154 ,STANDBY //スタンバイ(エンジンかかるの待ち)
takeru0x1103 21:78302ecdb661 155 ,IDLE //アイドル(エンジンがかかったけどなにもしない)
MasashiNomura 35:3779201b4c73 156 ,TAKE_OFF //離陸(エンジン回転数上昇 規定値まで)
takeru0x1103 20:0394e15412c3 157 ,HOVER //ホバリング
takeru0x1103 21:78302ecdb661 158 ,DRIVE //運転
takeru0x1103 21:78302ecdb661 159 ,GROUND //着陸(エンジン同時下げ)
takeru0x1103 21:78302ecdb661 160 ,EMGGND //緊急着陸(後ろエンジンを先に下げる)
MasashiNomura 36:2cc739c7e4cb 161 ,CHK_EG_ENT //SLEEPからエンジン調整モードへ(フラグリセット、アナログ入力が下がっていること、ボタンが押されいないことの確認State)
MasashiNomura 36:2cc739c7e4cb 162 ,CHK_EG_F //フロントエンジン調整
MasashiNomura 36:2cc739c7e4cb 163 ,CHK_EG_MID //アナログ入力が下がっていること、ボタンが押されていないことを確認するState
MasashiNomura 36:2cc739c7e4cb 164 ,CHK_EG_R //リアエンジン調整
MasashiNomura 36:2cc739c7e4cb 165 ,CHK_EG_EXIT//アナログ入力が下がっていること、他のボタンが押されていないことを確認してSLEEPへ
takeru0x1103 20:0394e15412c3 166 ,CHK_ENT //チェックエンター
takeru0x1103 20:0394e15412c3 167 ,CHK_MOT //モーターチェック
takeru0x1103 20:0394e15412c3 168 ,CHK_AXL //アクセルサーボチェック
takeru0x1103 20:0394e15412c3 169 ,CHK_ATT //姿勢制御チェック
takeru0x1103 20:0394e15412c3 170 ,CHK_EXIT //チェックステート脱出
MasashiNomura 25:f3a6e7eec9c3 171 ,MOT_STOP //モーター停止用
MasashiNomura 41:45c982b1c5b6 172 };
MasashiNomura 41:45c982b1c5b6 173
MasashiNomura 41:45c982b1c5b6 174 // 状態表示用LEDカラー
MasashiNomura 41:45c982b1c5b6 175 enum eLedCol{
MasashiNomura 41:45c982b1c5b6 176 OFF = 0,
MasashiNomura 41:45c982b1c5b6 177 WHITE,
MasashiNomura 41:45c982b1c5b6 178 RED,
MasashiNomura 41:45c982b1c5b6 179 GREEN,
MasashiNomura 41:45c982b1c5b6 180 BLUE,
MasashiNomura 41:45c982b1c5b6 181 YELLOW,
MasashiNomura 41:45c982b1c5b6 182 PURPLE,
MasashiNomura 41:45c982b1c5b6 183 LIGHT_BLUE,
MasashiNomura 42:cc8501b824ba 184 BLK_WHITE,//BLINK
MasashiNomura 42:cc8501b824ba 185 BLK_RED,
MasashiNomura 42:cc8501b824ba 186 BLK_GREEN,
MasashiNomura 42:cc8501b824ba 187 BLK_BLUE,
MasashiNomura 42:cc8501b824ba 188 BLK_YELLOW,
MasashiNomura 42:cc8501b824ba 189 BLK_PURPLE,
MasashiNomura 42:cc8501b824ba 190 BLK_LIGHT_BLUE,
MasashiNomura 41:45c982b1c5b6 191 };
takeru0x1103 19:4b0fe9a5ec38 192
MasashiNomura 28:fdb3b144e342 193 enum eMotPos{
MasashiNomura 28:fdb3b144e342 194 F_L = 0, // 前 左
MasashiNomura 28:fdb3b144e342 195 F_R, // 前 右
MasashiNomura 28:fdb3b144e342 196 R_L, // 後 左
MasashiNomura 28:fdb3b144e342 197 R_R, // 後 右
MasashiNomura 28:fdb3b144e342 198 };
MasashiNomura 28:fdb3b144e342 199 enum eMotType{
MasashiNomura 28:fdb3b144e342 200 IN = 0,
MasashiNomura 28:fdb3b144e342 201 OUT,
MasashiNomura 28:fdb3b144e342 202 };
MasashiNomura 32:7f4145cc3551 203 enum eMotInType{
MasashiNomura 32:7f4145cc3551 204 OFS = 0,
MasashiNomura 32:7f4145cc3551 205 ATT,
MasashiNomura 32:7f4145cc3551 206 USER,
MasashiNomura 32:7f4145cc3551 207 };
MasashiNomura 36:2cc739c7e4cb 208 enum eEgPos{
MasashiNomura 36:2cc739c7e4cb 209 FRONT = 0,
MasashiNomura 36:2cc739c7e4cb 210 REAR,
MasashiNomura 36:2cc739c7e4cb 211 };
takeru0x1103 17:f9610f3cfa1b 212 /////////////////////////////////////////////////
takeru0x1103 21:78302ecdb661 213
MasashiNomura 35:3779201b4c73 214 //void init1PushStruct(typ1Push& item);
MasashiNomura 29:eb3d72dd94aa 215
MasashiNomura 22:24c9c2dedca9 216 void initFlags();
MasashiNomura 22:24c9c2dedca9 217
MasashiNomura 41:45c982b1c5b6 218 void setDOCol(eLedCol col);
MasashiNomura 41:45c982b1c5b6 219 void setDO4LED(enmHbState stat);
MasashiNomura 43:156199c2f9b6 220 //void blinkLED(enmHbState stat);
MasashiNomura 43:156199c2f9b6 221
MasashiNomura 22:24c9c2dedca9 222 void setState(enmHbState stat);
MasashiNomura 23:79e20be4bc5b 223 void setStateF(enmHbState stat);
MasashiNomura 22:24c9c2dedca9 224
MasashiNomura 37:d51dacb4c30f 225 bool isActiveState();
MasashiNomura 22:24c9c2dedca9 226
takeru0x1103 21:78302ecdb661 227 /*
takeru0x1103 19:4b0fe9a5ec38 228 class GlobalFlags{
takeru0x1103 19:4b0fe9a5ec38 229 private:
takeru0x1103 19:4b0fe9a5ec38 230 enmHbState stateQueue[STATE_QUE_SIZ];//ステート予約用のキューバッファ
takeru0x1103 19:4b0fe9a5ec38 231 int wp; //ライトポインタ
takeru0x1103 19:4b0fe9a5ec38 232 int rp; //リードポインタ
takeru0x1103 19:4b0fe9a5ec38 233 bool full; //フルフラグ
takeru0x1103 19:4b0fe9a5ec38 234 bool empty; //エンプティフラグ
takeru0x1103 19:4b0fe9a5ec38 235 public:
takeru0x1103 21:78302ecdb661 236 //プロパティ
takeru0x1103 20:0394e15412c3 237 enmHbState state;//現在のステート
takeru0x1103 21:78302ecdb661 238 //メソッド
takeru0x1103 20:0394e15412c3 239 GlobalFlags();//コンストラクタ
takeru0x1103 19:4b0fe9a5ec38 240 bool push(enmHbState iState);
takeru0x1103 19:4b0fe9a5ec38 241 bool pull();
takeru0x1103 19:4b0fe9a5ec38 242 };
takeru0x1103 16:05b9e44889f1 243
takeru0x1103 21:78302ecdb661 244 */
takeru0x1103 21:78302ecdb661 245
takeru0x1103 21:78302ecdb661 246
takeru0x1103 17:f9610f3cfa1b 247 //モニタ用LED
takeru0x1103 16:05b9e44889f1 248 extern DigitalOut led1;
takeru0x1103 16:05b9e44889f1 249 extern DigitalOut led2;
takeru0x1103 16:05b9e44889f1 250 extern DigitalOut led3;
takeru0x1103 16:05b9e44889f1 251 extern DigitalOut led4;
takeru0x1103 8:1ca49cb18290 252
MasashiNomura 40:debe99e228d3 253 //状態表示用
MasashiNomura 40:debe99e228d3 254 extern DigitalOut DO_01;
MasashiNomura 40:debe99e228d3 255 extern DigitalOut DO_02;
MasashiNomura 40:debe99e228d3 256 extern DigitalOut DO_03;
MasashiNomura 40:debe99e228d3 257
MasashiNomura 33:eb260dbfc22a 258 //モーターアクセル用アナログ入力
MasashiNomura 33:eb260dbfc22a 259 extern AnalogIn AinAxl;
MasashiNomura 33:eb260dbfc22a 260
MasashiNomura 38:24ee50452755 261 // //エンジンスロットル用アナログ入力
MasashiNomura 38:24ee50452755 262 // extern AnalogIn AinThrottle;
MasashiNomura 36:2cc739c7e4cb 263
MasashiNomura 22:24c9c2dedca9 264 //////////////////////////////////////////////////
MasashiNomura 22:24c9c2dedca9 265 // フラグ
takeru0x1103 21:78302ecdb661 266 //extern GlobalFlags gf;
takeru0x1103 19:4b0fe9a5ec38 267
takeru0x1103 19:4b0fe9a5ec38 268 extern char g_CmdBuf[G_CMD_BUF_SIZ] ;// コマンド受け渡しバッファ
MasashiNomura 22:24c9c2dedca9 269 extern bool gf_CmdPrs; //コマンドパーサー実行要求フラグ
takeru0x1103 19:4b0fe9a5ec38 270
takeru0x1103 21:78302ecdb661 271 extern bool gf_Armed; //アーミングフラグ
MasashiNomura 22:24c9c2dedca9 272 extern bool gf_Dbg; //デバッグフラグ
MasashiNomura 37:d51dacb4c30f 273 extern bool gf_StopMot; //モーターの強制停止 サーボ全閉
MasashiNomura 37:d51dacb4c30f 274 extern bool gf_FromActiveStat ;//モーターの強制停止 サーボ全閉が動作時に発生したかどうか
MasashiNomura 25:f3a6e7eec9c3 275
MasashiNomura 43:156199c2f9b6 276 extern bool gf_BlinkLED;
MasashiNomura 43:156199c2f9b6 277
MasashiNomura 43:156199c2f9b6 278
MasashiNomura 41:45c982b1c5b6 279 //extern typPrintFlag gf_Print; //デバッグプリントフラグ(1回表示)
MasashiNomura 41:45c982b1c5b6 280 //extern typPrintFlag gf_Mon; //デバッグモニタフラグ(繰り返し表示)
MasashiNomura 41:45c982b1c5b6 281 extern typPrintFlg gf_Print; //デバッグプリントフラグ(1回表示)
MasashiNomura 41:45c982b1c5b6 282 extern typPrintFlg gf_Mon; //デバッグモニタフラグ(繰り返し表示)
MasashiNomura 22:24c9c2dedca9 283 extern typCalFlag gf_Cal; //キャリブレーションフラグ
MasashiNomura 26:732bc37fbefd 284
MasashiNomura 41:45c982b1c5b6 285 //extern typDbgPrintFlg gf_DbgPrint ;//デバッグ用
MasashiNomura 26:732bc37fbefd 286
MasashiNomura 22:24c9c2dedca9 287 extern typAccel gf_AxReq[2]; //アクセル更新
MasashiNomura 43:156199c2f9b6 288 extern typAccel gf_AxReqH[2] ;//浮上時アクセル値更新フラグ
MasashiNomura 43:156199c2f9b6 289 extern typAccel gf_AxStepReq[2] ;//アクセル用サーボ動作ステップ値更新フラグ
MasashiNomura 43:156199c2f9b6 290
MasashiNomura 32:7f4145cc3551 291 extern typAxlRpm gf_MtReq[4]; //モーター姿勢制御更新
MasashiNomura 29:eb3d72dd94aa 292 extern typAxlRpm gf_MtReqOfs[4]; //モーターオフセット更新
MasashiNomura 32:7f4145cc3551 293 extern typAxlRpm gf_MtReqU[4]; //モーターユーザー更新
MasashiNomura 29:eb3d72dd94aa 294 extern typAxlRpm gf_MtReqDct[8] ;//ダイレクト(FPGA関数直接呼び出し)モーター更新フラグ
MasashiNomura 22:24c9c2dedca9 295
MasashiNomura 42:cc8501b824ba 296 extern typSWCmd gf_SwCmd; //スイッチが押されたことを模擬するフラグ
MasashiNomura 42:cc8501b824ba 297
MasashiNomura 22:24c9c2dedca9 298 extern enmHbState gf_State; //現在のステート
MasashiNomura 36:2cc739c7e4cb 299 extern bool gf_StateEnt ;//状態遷移後、最初であることを示す
takeru0x1103 19:4b0fe9a5ec38 300
MasashiNomura 24:c5945aaae777 301 extern bool gf_PidParaUpdate ;//PID Pp,P,I,Dの係数アップデートフラグ
MasashiNomura 24:c5945aaae777 302 extern typPidPara g_PidPara; //PID Pp,P,I,Dの係数の外部設定用
takeru0x1103 19:4b0fe9a5ec38 303
MasashiNomura 36:2cc739c7e4cb 304 // extern bool gf_MotParaUpdate[4] ;//モーターのパラメータ値更新フラグ
MasashiNomura 36:2cc739c7e4cb 305 // extern typMotPara g_MotPara[4]; //モーターのパラメータ値
MasashiNomura 25:f3a6e7eec9c3 306
takeru0x1103 18:5aa48aec9cae 307 #endif