Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HbManager.h@22:24c9c2dedca9, 2018-12-06 (annotated)
- Committer:
- MasashiNomura
- Date:
- Thu Dec 06 11:03:13 2018 +0000
- Revision:
- 22:24c9c2dedca9
- Parent:
- 21:78302ecdb661
- Child:
- 23:79e20be4bc5b
Temp State Transfer
Who changed what in which revision?
User | Revision | Line number | New 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(); |
takeru0x1103 | 17:f9610f3cfa1b | 37 | }; |
takeru0x1103 | 0:ecd925601fc6 | 38 | |
takeru0x1103 | 0:ecd925601fc6 | 39 | ///////////////////////////////////////////////////////////////////// |
takeru0x1103 | 16:05b9e44889f1 | 40 | #endif |