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
- Committer:
- MasashiNomura
- Date:
- 2019-01-18
- Revision:
- 38:24ee50452755
- Parent:
- 36:2cc739c7e4cb
- Child:
- 39:1b76f7df8804
File content as of revision 38:24ee50452755:
#ifndef __HBMANAGER_H__ #define __HBMANAGER_H__ ///////////////////////////////////////////////////////////////////// #include "typedef.h" #include "HbEngine.h" #include "HbAttitude.h" #include "HbMotor.h" #include "Imu.h" #include "HbUserOpe.h" ///////////////////////////////////////////////// class HbManager{ private: //INT16 motorVal[4] ;// UINT16 accelVal[2] ;// float nowTrgtAng; //目標ヨー角 float nowAngle ;//現在ヨー角 float nowRate ;//現在加速度 typUserSw usrSW ;//ユーザー操作SW //メンバクラス HbEngine *eng[2] ;//エンジン制御クラス HbAttitude *att ;//姿勢制御クラス //HbMotor *mot[4] ;//モーター制御クラス HbSubProp *subProp[4] ;//モーター制御クラス Imu *imu ;//慣性計測装置 HbUserOpe *ope ;//ユーザー操作 //INT16 motVal; // モーターチェック用モーター値 //short motNum; // モーターチェック用モーター番号 public: HbManager(); // Attitude void getAttitude(); void calAtt(); void controlAttitude(); void controlAttitude(float cmdAngle); void setAttPara(typPidPara para); // Motor void controlMotor(); void addMotVal(eMotPos pos, INT16 add); void subMotVal(eMotPos pos, INT16 add); INT16 getCurMotVal(eMotPos pos); void setMotVal(eMotPos pos, INT16 val); //void setMotFPGA(UCHAR num, INT16 val); // Engine void controlEngine(); void clearHvAxl(); bool chkSetHvAxl(eEgPos pos); void setHvAxl(eEgPos pos, INT16 val); INT16 getHvAxl(eEgPos pos); void setAccelVal(eEgPos pos, INT16 val); void getUserCommand(); INT16 getUserMotAxl(); INT16 getUserEngTrottle(); float getUserMotAxlRaw(); float getUserEngTrottleRaw(); bool chkOverIDLE(); bool chkInRangeIDLE(); void chkSW(enmHbState stat); bool chkSWUserOpe(HbUserOpe::SW_TYPE stype); bool chkSWUserOpeRE(HbUserOpe::SW_TYPE stype);//立ち上がり検出 bool chkSWUserOpeAny(); bool chkSWUserOpeBoth(HbUserOpe::SW_TYPE stype1, HbUserOpe::SW_TYPE stype2); typUserSw getUserSw(); }; ///////////////////////////////////////////////////////////////////// #endif