teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

globalFlags.h

Committer:
takeru0x1103
Date:
2018-11-30
Revision:
17:f9610f3cfa1b
Parent:
16:05b9e44889f1
Child:
18:5aa48aec9cae

File content as of revision 17:f9610f3cfa1b:

#ifndef __GLOBALFLAGS_H__
#define __GLOBALFLAGS_H__

#include "mbed.h"
#include "typedef.h"

typedef union{
    UINT16  flg;
    struct{    
        bool    e1   : 1;//前エンジン回転数
        bool    e2   : 1;//後ろエンジン回転数
        bool    m1   : 1;//サブモーター回転数
        bool    m2   : 1;//サブモーター回転数
        bool    m3   : 1;//サブモーター回転数
        bool    m4   : 1;//サブモーター回転数
        bool    gy   : 1;//ジャイロ
        bool    yaw  : 1;//ヨー角
        bool    pp   : 1;//P制御
        bool    p    : 1;//
        bool    i    : 1;//
        bool    d    : 1;//
        
    }bf;
}typPrintFlag;

typedef union{
    UINT16  flg;
    struct{    
        bool    e1   : 1;//
        bool    e2   : 1;//
        bool    m1   : 1;//
        bool    m2   : 1;//
        bool    m3   : 1;//
        bool    m4   : 1;//
        bool    gy   : 1;//
        bool    yaw  : 1;//
    }bf;
}typCalFlag;

typedef union{
    UINT16  dt;
    struct{    
        UINT16   val   : 12;//アクセル設定値
        bool    req   : 1;//アクセル更新要求
    }bf;
}typAccel;

/////////////////////////////////////////////////


//モニタ用LED
extern DigitalOut led1;
extern DigitalOut led2;
extern DigitalOut led3;
extern DigitalOut led4;

extern typPrintFlag gf_Print;
extern typCalFlag   gf_Cal;
extern bool         gf_CmdPrs;    //コマンドパーサー実行要求フラグ
extern typAccel     gf_AxReq[2];  //アクセル更新
extern typAccel     gf_MtReq[4];  //モーター更新
extern bool         gf_AttCntEna;   //姿勢制御イネーブル

#endif /* GYRO_H */