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.
Diff: HbEngine.cpp
- Revision:
- 38:24ee50452755
- Parent:
- 36:2cc739c7e4cb
- Child:
- 39:1b76f7df8804
--- a/HbEngine.cpp	Thu Jan 17 11:26:09 2019 +0000
+++ b/HbEngine.cpp	Fri Jan 18 11:52:00 2019 +0000
@@ -5,13 +5,20 @@
 //======================================================
 HbEngine::HbEngine(UCHAR iID){
     id = iID;
+    hvAxl = 0;
+    bSetHvAxl = 0;
 }
 
 
 UINT16  HbEngine::getRpm(){
     UINT16  rpm;
     //エンジン回転数読み出し
-    rpm = fpgaGetRpm(true);//前
+    //if(id<0||id>1)return 0;//現在の使用状況では不要
+    if(id == 0){
+        rpm = fpgaGetRpm(true);//前
+    }else/*if(id == 1)*/{
+        rpm = fpgaGetRpm(false);//後
+    }
     return rpm;
 }
 
@@ -30,6 +37,10 @@
     bSetHvAxl = false;
 }
 
+INT16 HbEngine::getHoverAccelVal(){
+    return hvAxl;
+}
+
 bool HbEngine::chkSetHoverAccel(){
     return bSetHvAxl;
 }