teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Fri Dec 14 12:32:27 2018 +0000
Revision:
27:ff63c23bc689
Parent:
26:732bc37fbefd
Child:
28:fdb3b144e342
2018/12/14 add AttCtrlDataArrayClass etc

Who changed what in which revision?

UserRevisionLine numberNew contents of line
takeru0x1103 16:05b9e44889f1 1 #ifndef __HBMANAGER_H__
takeru0x1103 16:05b9e44889f1 2 #define __HBMANAGER_H__
takeru0x1103 0:ecd925601fc6 3 /////////////////////////////////////////////////////////////////////
takeru0x1103 17:f9610f3cfa1b 4 #include "typedef.h"
takeru0x1103 17:f9610f3cfa1b 5 #include "HbEngine.h"
takeru0x1103 18:5aa48aec9cae 6 #include "HbAttitude.h"
takeru0x1103 18:5aa48aec9cae 7 #include "HbMotor.h"
takeru0x1103 18:5aa48aec9cae 8 #include "Imu.h"
MasashiNomura 22:24c9c2dedca9 9 #include "HbUserOpe.h"
takeru0x1103 17:f9610f3cfa1b 10
takeru0x1103 0:ecd925601fc6 11
takeru0x1103 19:4b0fe9a5ec38 12
takeru0x1103 19:4b0fe9a5ec38 13
takeru0x1103 17:f9610f3cfa1b 14 /////////////////////////////////////////////////
takeru0x1103 17:f9610f3cfa1b 15 class HbManager{
takeru0x1103 17:f9610f3cfa1b 16 private:
takeru0x1103 18:5aa48aec9cae 17 INT16 motorVal[4] ;//
MasashiNomura 25:f3a6e7eec9c3 18 INT16 motorValD[4] ;// オフセット込みで直接入れられた値
takeru0x1103 18:5aa48aec9cae 19 UINT16 accelVal[2] ;//
takeru0x1103 19:4b0fe9a5ec38 20 float nowAngle ;//現在ヨー角
takeru0x1103 19:4b0fe9a5ec38 21 float nowRate ;//現在加速度
MasashiNomura 22:24c9c2dedca9 22 typUserSw usrSW ;//ユーザー操作SW
takeru0x1103 19:4b0fe9a5ec38 23 //メンバクラス
takeru0x1103 18:5aa48aec9cae 24 HbEngine *eng[2] ;//エンジン制御クラス
takeru0x1103 18:5aa48aec9cae 25 HbAttitude *att ;//姿勢制御クラス
takeru0x1103 19:4b0fe9a5ec38 26 HbMotor *mot[4] ;//モーター制御クラス
takeru0x1103 18:5aa48aec9cae 27 Imu *imu ;//慣性計測装置
MasashiNomura 22:24c9c2dedca9 28
MasashiNomura 22:24c9c2dedca9 29 HbUserOpe *ope ;//ユーザー操作
MasashiNomura 22:24c9c2dedca9 30
MasashiNomura 24:c5945aaae777 31 //INT16 motVal; // モーターチェック用モーター値
MasashiNomura 24:c5945aaae777 32 //short motNum; // モーターチェック用モーター番号
MasashiNomura 24:c5945aaae777 33
takeru0x1103 17:f9610f3cfa1b 34 public:
takeru0x1103 17:f9610f3cfa1b 35 HbManager();
takeru0x1103 18:5aa48aec9cae 36 void getAttitude();
MasashiNomura 25:f3a6e7eec9c3 37 void calAtt();
takeru0x1103 18:5aa48aec9cae 38 void controlAttitude();
MasashiNomura 24:c5945aaae777 39 void controlAttitude(float cmdAngle);
MasashiNomura 24:c5945aaae777 40 void setAttPara(typPidPara para);
takeru0x1103 18:5aa48aec9cae 41 void controlMotor();
MasashiNomura 26:732bc37fbefd 42 void addMotOfs(HbUserOpe::SW_TYPE2 sw);// テスト用ボタンで回転数オフセット上げ
MasashiNomura 25:f3a6e7eec9c3 43 void setMotPara(UCHAR num, typMotPara para);
MasashiNomura 24:c5945aaae777 44 //void initChkMotor();
MasashiNomura 24:c5945aaae777 45 //bool chkMotor();
MasashiNomura 25:f3a6e7eec9c3 46 void getCurMotVal();
MasashiNomura 25:f3a6e7eec9c3 47 bool stopMotor();
MasashiNomura 25:f3a6e7eec9c3 48 void initMotVal();
MasashiNomura 27:ff63c23bc689 49
MasashiNomura 27:ff63c23bc689 50 void setMotFPGA(UCHAR num, INT16 val);
MasashiNomura 27:ff63c23bc689 51
takeru0x1103 17:f9610f3cfa1b 52 void controlEngine();
takeru0x1103 17:f9610f3cfa1b 53 void getUserCommand();
MasashiNomura 23:79e20be4bc5b 54
MasashiNomura 23:79e20be4bc5b 55 bool chkOverIDLE();
MasashiNomura 23:79e20be4bc5b 56 bool chkInRangeIDLE();
MasashiNomura 23:79e20be4bc5b 57 bool chkSWUserOpe(HbUserOpe::SW_TYPE stype);
MasashiNomura 26:732bc37fbefd 58 bool chkSWUserOpe(HbUserOpe::SW_TYPE2 stype);
MasashiNomura 26:732bc37fbefd 59 bool chkSWUserOpeRE(HbUserOpe::SW_TYPE2 stype);//立ち上がり検出
MasashiNomura 23:79e20be4bc5b 60 bool chkSWUserOpeAny();
MasashiNomura 23:79e20be4bc5b 61 typUserSw getUserSw();
takeru0x1103 17:f9610f3cfa1b 62 };
takeru0x1103 0:ecd925601fc6 63
takeru0x1103 0:ecd925601fc6 64 /////////////////////////////////////////////////////////////////////
takeru0x1103 16:05b9e44889f1 65 #endif