teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Mon Feb 04 10:38:13 2019 +0000
Revision:
44:14fe4bd10fdb
Parent:
43:156199c2f9b6
Child:
45:3b51dd26b579
20190204 Change Accel speed, Brake RPM

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