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
- Committer:
- MasashiNomura
- Date:
- 2018-12-08
- Revision:
- 23:79e20be4bc5b
- Parent:
- 17:f9610f3cfa1b
- Child:
- 35:3779201b4c73
File content as of revision 23:79e20be4bc5b:
#include "HbEngine.h"
#include "fpga.h"
//======================================================
//コンストラクタ
//======================================================
HbEngine::HbEngine(UCHAR iID){
    id = iID;
}
UINT16  HbEngine::getRpm(){
    UINT16  rpm;
    //エンジン回転数読み出し
    rpm = fpgaGetRpm(true);//前
    return rpm;
}
//アクセル設定
void HbEngine::setAccell(UINT16 iVal){
    fpgaEngine(id,iVal);
}
bool HbEngine::chkOverIDLECycle(){
    return rpm > IDLE_HI;
}
bool HbEngine::chkInRangeIDLE(){
    return rpm > IDLE_LOW && rpm < IDLE_HI;
}