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.
HbEngine.h@35:3779201b4c73, 2018-12-25 (annotated)
- Committer:
- MasashiNomura
- Date:
- Tue Dec 25 08:20:17 2018 +0000
- Revision:
- 35:3779201b4c73
- Parent:
- 23:79e20be4bc5b
- Child:
- 36:2cc739c7e4cb
12/25 Remove no use commentout, add cchecking motAxl etc
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
takeru0x1103 | 17:f9610f3cfa1b | 1 | #ifndef __HBENGINE_H__ |
takeru0x1103 | 17:f9610f3cfa1b | 2 | #define __HBENGINE_H__ |
takeru0x1103 | 17:f9610f3cfa1b | 3 | |
takeru0x1103 | 17:f9610f3cfa1b | 4 | #include "typedef.h" |
takeru0x1103 | 17:f9610f3cfa1b | 5 | |
takeru0x1103 | 17:f9610f3cfa1b | 6 | class HbEngine{ |
takeru0x1103 | 17:f9610f3cfa1b | 7 | private: |
takeru0x1103 | 17:f9610f3cfa1b | 8 | /* |
takeru0x1103 | 17:f9610f3cfa1b | 9 | * Varialbles |
takeru0x1103 | 17:f9610f3cfa1b | 10 | */ |
takeru0x1103 | 17:f9610f3cfa1b | 11 | UCHAR id; |
takeru0x1103 | 17:f9610f3cfa1b | 12 | INT16 accel;//エンジンアクセル12bit |
takeru0x1103 | 17:f9610f3cfa1b | 13 | INT16 rpm;//エンジン 回転数 |
takeru0x1103 | 17:f9610f3cfa1b | 14 | |
MasashiNomura | 23:79e20be4bc5b | 15 | // 仮の定数 |
MasashiNomura | 23:79e20be4bc5b | 16 | static const int IDLE_LOW = 1500; |
MasashiNomura | 23:79e20be4bc5b | 17 | static const int IDLE_HI = 3000; |
MasashiNomura | 23:79e20be4bc5b | 18 | static const int HOVER_CYCLE = 6000; |
MasashiNomura | 23:79e20be4bc5b | 19 | |
takeru0x1103 | 17:f9610f3cfa1b | 20 | /* |
takeru0x1103 | 17:f9610f3cfa1b | 21 | * functions |
takeru0x1103 | 17:f9610f3cfa1b | 22 | */ |
takeru0x1103 | 17:f9610f3cfa1b | 23 | public: |
takeru0x1103 | 17:f9610f3cfa1b | 24 | HbEngine(UCHAR iID); |
takeru0x1103 | 17:f9610f3cfa1b | 25 | UINT16 getRpm(); |
MasashiNomura | 35:3779201b4c73 | 26 | void setAccel(UINT16 iVal); |
MasashiNomura | 23:79e20be4bc5b | 27 | |
MasashiNomura | 23:79e20be4bc5b | 28 | bool chkOverIDLECycle(); |
MasashiNomura | 23:79e20be4bc5b | 29 | bool chkInRangeIDLE(); |
takeru0x1103 | 17:f9610f3cfa1b | 30 | }; |
takeru0x1103 | 17:f9610f3cfa1b | 31 | |
takeru0x1103 | 17:f9610f3cfa1b | 32 | #endif |
takeru0x1103 | 17:f9610f3cfa1b | 33 | |
takeru0x1103 | 17:f9610f3cfa1b | 34 |