teamALI / Mbed 2 deprecated HB2018

Dependencies:   mbed FreeRTOS

Committer:
MasashiNomura
Date:
Sat Dec 08 12:08:25 2018 +0000
Revision:
23:79e20be4bc5b
Parent:
22:24c9c2dedca9
Child:
24:c5945aaae777
2018/12/08 Add State Trans 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] ;//
takeru0x1103 18:5aa48aec9cae 18 UINT16 accelVal[2] ;//
takeru0x1103 19:4b0fe9a5ec38 19 float nowAngle ;//現在ヨー角
takeru0x1103 19:4b0fe9a5ec38 20 float nowRate ;//現在加速度
MasashiNomura 22:24c9c2dedca9 21 typUserSw usrSW ;//ユーザー操作SW
takeru0x1103 19:4b0fe9a5ec38 22 //メンバクラス
takeru0x1103 18:5aa48aec9cae 23 HbEngine *eng[2] ;//エンジン制御クラス
takeru0x1103 18:5aa48aec9cae 24 HbAttitude *att ;//姿勢制御クラス
takeru0x1103 19:4b0fe9a5ec38 25 HbMotor *mot[4] ;//モーター制御クラス
takeru0x1103 18:5aa48aec9cae 26 Imu *imu ;//慣性計測装置
MasashiNomura 22:24c9c2dedca9 27
MasashiNomura 22:24c9c2dedca9 28 HbUserOpe *ope ;//ユーザー操作
MasashiNomura 22:24c9c2dedca9 29
takeru0x1103 17:f9610f3cfa1b 30 public:
takeru0x1103 17:f9610f3cfa1b 31 HbManager();
takeru0x1103 18:5aa48aec9cae 32 void getAttitude();
takeru0x1103 18:5aa48aec9cae 33 void controlAttitude();
takeru0x1103 18:5aa48aec9cae 34 void controlMotor();
takeru0x1103 17:f9610f3cfa1b 35 void controlEngine();
takeru0x1103 17:f9610f3cfa1b 36 void getUserCommand();
MasashiNomura 23:79e20be4bc5b 37
MasashiNomura 23:79e20be4bc5b 38 bool chkOverIDLE();
MasashiNomura 23:79e20be4bc5b 39 bool chkInRangeIDLE();
MasashiNomura 23:79e20be4bc5b 40 bool chkSWUserOpe(HbUserOpe::SW_TYPE stype);
MasashiNomura 23:79e20be4bc5b 41 bool chkSWUserOpeAny();
MasashiNomura 23:79e20be4bc5b 42 typUserSw getUserSw();
takeru0x1103 17:f9610f3cfa1b 43 };
takeru0x1103 0:ecd925601fc6 44
takeru0x1103 0:ecd925601fc6 45 /////////////////////////////////////////////////////////////////////
takeru0x1103 16:05b9e44889f1 46 #endif