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@36:2cc739c7e4cb, 2019-01-16 (annotated)
- Committer:
- MasashiNomura
- Date:
- Wed Jan 16 10:51:07 2019 +0000
- Revision:
- 36:2cc739c7e4cb
- Parent:
- 35:3779201b4c73
- Child:
- 38:24ee50452755
2019/01/16 modify for 45inc Alfa HB / no debug, no checking
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;//エンジン 回転数 |
MasashiNomura | 36:2cc739c7e4cb | 14 | INT16 hvAxl;//エンジンアクセル 浮上用 |
MasashiNomura | 36:2cc739c7e4cb | 15 | bool bSetHvAxl; |
MasashiNomura | 36:2cc739c7e4cb | 16 | |
MasashiNomura | 23:79e20be4bc5b | 17 | // 仮の定数 |
MasashiNomura | 23:79e20be4bc5b | 18 | static const int IDLE_LOW = 1500; |
MasashiNomura | 23:79e20be4bc5b | 19 | static const int IDLE_HI = 3000; |
MasashiNomura | 23:79e20be4bc5b | 20 | static const int HOVER_CYCLE = 6000; |
MasashiNomura | 23:79e20be4bc5b | 21 | |
takeru0x1103 | 17:f9610f3cfa1b | 22 | /* |
takeru0x1103 | 17:f9610f3cfa1b | 23 | * functions |
takeru0x1103 | 17:f9610f3cfa1b | 24 | */ |
takeru0x1103 | 17:f9610f3cfa1b | 25 | public: |
takeru0x1103 | 17:f9610f3cfa1b | 26 | HbEngine(UCHAR iID); |
takeru0x1103 | 17:f9610f3cfa1b | 27 | UINT16 getRpm(); |
MasashiNomura | 35:3779201b4c73 | 28 | void setAccel(UINT16 iVal); |
MasashiNomura | 23:79e20be4bc5b | 29 | |
MasashiNomura | 36:2cc739c7e4cb | 30 | void setHoverAccel(INT16 val); |
MasashiNomura | 36:2cc739c7e4cb | 31 | void clearHoverAccel(); |
MasashiNomura | 36:2cc739c7e4cb | 32 | bool chkSetHoverAccel(); |
MasashiNomura | 36:2cc739c7e4cb | 33 | |
MasashiNomura | 23:79e20be4bc5b | 34 | bool chkOverIDLECycle(); |
MasashiNomura | 23:79e20be4bc5b | 35 | bool chkInRangeIDLE(); |
takeru0x1103 | 17:f9610f3cfa1b | 36 | }; |
takeru0x1103 | 17:f9610f3cfa1b | 37 | |
takeru0x1103 | 17:f9610f3cfa1b | 38 | #endif |
takeru0x1103 | 17:f9610f3cfa1b | 39 | |
takeru0x1103 | 17:f9610f3cfa1b | 40 |