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.cpp@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 | #include "HbEngine.h" | 
| takeru0x1103 | 17:f9610f3cfa1b | 2 | #include "fpga.h" | 
| takeru0x1103 | 17:f9610f3cfa1b | 3 | //====================================================== | 
| takeru0x1103 | 17:f9610f3cfa1b | 4 | //コンストラクタ | 
| takeru0x1103 | 17:f9610f3cfa1b | 5 | //====================================================== | 
| takeru0x1103 | 17:f9610f3cfa1b | 6 | HbEngine::HbEngine(UCHAR iID){ | 
| takeru0x1103 | 17:f9610f3cfa1b | 7 | id = iID; | 
| takeru0x1103 | 17:f9610f3cfa1b | 8 | } | 
| takeru0x1103 | 17:f9610f3cfa1b | 9 | |
| takeru0x1103 | 17:f9610f3cfa1b | 10 | |
| takeru0x1103 | 17:f9610f3cfa1b | 11 | UINT16 HbEngine::getRpm(){ | 
| takeru0x1103 | 17:f9610f3cfa1b | 12 | UINT16 rpm; | 
| takeru0x1103 | 17:f9610f3cfa1b | 13 | //エンジン回転数読み出し | 
| takeru0x1103 | 17:f9610f3cfa1b | 14 | rpm = fpgaGetRpm(true);//前 | 
| takeru0x1103 | 17:f9610f3cfa1b | 15 | return rpm; | 
| takeru0x1103 | 17:f9610f3cfa1b | 16 | } | 
| takeru0x1103 | 17:f9610f3cfa1b | 17 | |
| takeru0x1103 | 17:f9610f3cfa1b | 18 | //アクセル設定 | 
| MasashiNomura | 35:3779201b4c73 | 19 | void HbEngine::setAccel(UINT16 iVal){ | 
| takeru0x1103 | 17:f9610f3cfa1b | 20 | fpgaEngine(id,iVal); | 
| MasashiNomura | 23:79e20be4bc5b | 21 | } | 
| MasashiNomura | 23:79e20be4bc5b | 22 | |
| MasashiNomura | 23:79e20be4bc5b | 23 | bool HbEngine::chkOverIDLECycle(){ | 
| MasashiNomura | 23:79e20be4bc5b | 24 | return rpm > IDLE_HI; | 
| MasashiNomura | 23:79e20be4bc5b | 25 | } | 
| MasashiNomura | 23:79e20be4bc5b | 26 | |
| MasashiNomura | 23:79e20be4bc5b | 27 | bool HbEngine::chkInRangeIDLE(){ | 
| MasashiNomura | 23:79e20be4bc5b | 28 | return rpm > IDLE_LOW && rpm < IDLE_HI; | 
| MasashiNomura | 23:79e20be4bc5b | 29 | } |