teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

HbManager.h

Committer:
takeru0x1103
Date:
2018-12-06
Revision:
21:78302ecdb661
Parent:
19:4b0fe9a5ec38
Child:
22:24c9c2dedca9

File content as of revision 21:78302ecdb661:

#ifndef __HBMANAGER_H__
#define __HBMANAGER_H__
/////////////////////////////////////////////////////////////////////
#include "typedef.h"
#include "HbEngine.h"
#include "HbAttitude.h"
#include "HbMotor.h"
#include "Imu.h"

//ユーザースイッチ(ハンドル)のレジスタ読み値のビットフィールド
typedef union{
    UINT16  w;
    struct{    
        UCHAR axl_r : 1;
        UCHAR axl_l : 1;
    }bf;
}typu_USER_SW;



/////////////////////////////////////////////////
class HbManager{
private:
    INT16       motorVal[4] ;//
    UINT16      accelVal[2] ;//
    float       nowAngle    ;//現在ヨー角
    float       nowRate     ;//現在加速度
    //メンバクラス
    HbEngine    *eng[2]     ;//エンジン制御クラス
    HbAttitude  *att        ;//姿勢制御クラス
    HbMotor     *mot[4]     ;//モーター制御クラス
    Imu         *imu        ;//慣性計測装置
public:
    HbManager();
    void getAttitude();
    void controlAttitude();
    void controlMotor();
    void controlEngine();
    void getUserCommand();
};

/////////////////////////////////////////////////////////////////////
#endif