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:
- 2018-12-14
- Revision:
- 27:ff63c23bc689
- Parent:
- 26:732bc37fbefd
- Child:
- 28:fdb3b144e342
File content as of revision 27:ff63c23bc689:
#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] ;// INT16 motorValD[4] ;// オフセット込みで直接入れられた値 UINT16 accelVal[2] ;// float nowAngle ;//現在ヨー角 float nowRate ;//現在加速度 typUserSw usrSW ;//ユーザー操作SW //メンバクラス HbEngine *eng[2] ;//エンジン制御クラス HbAttitude *att ;//姿勢制御クラス HbMotor *mot[4] ;//モーター制御クラス Imu *imu ;//慣性計測装置 HbUserOpe *ope ;//ユーザー操作 //INT16 motVal; // モーターチェック用モーター値 //short motNum; // モーターチェック用モーター番号 public: HbManager(); void getAttitude(); void calAtt(); void controlAttitude(); void controlAttitude(float cmdAngle); void setAttPara(typPidPara para); void controlMotor(); void addMotOfs(HbUserOpe::SW_TYPE2 sw);// テスト用ボタンで回転数オフセット上げ void setMotPara(UCHAR num, typMotPara para); //void initChkMotor(); //bool chkMotor(); void getCurMotVal(); bool stopMotor(); void initMotVal(); void setMotFPGA(UCHAR num, INT16 val); void controlEngine(); void getUserCommand(); bool chkOverIDLE(); bool chkInRangeIDLE(); bool chkSWUserOpe(HbUserOpe::SW_TYPE stype); bool chkSWUserOpe(HbUserOpe::SW_TYPE2 stype); bool chkSWUserOpeRE(HbUserOpe::SW_TYPE2 stype);//立ち上がり検出 bool chkSWUserOpeAny(); typUserSw getUserSw(); }; ///////////////////////////////////////////////////////////////////// #endif