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: HbUserOpe.cpp
- Revision:
- 38:24ee50452755
- Parent:
- 36:2cc739c7e4cb
- Child:
- 41:45c982b1c5b6
--- a/HbUserOpe.cpp Thu Jan 17 11:26:09 2019 +0000
+++ b/HbUserOpe.cpp Fri Jan 18 11:52:00 2019 +0000
@@ -20,6 +20,11 @@
curOpe.w = fpgaGetUserSw();
return curOpe;
}
+float HbUserOpe::GetAinAccelRaw()
+{
+ AinAxlVal = AinAxl.read();
+ return AinAxlVal;
+}
INT16 HbUserOpe::GetAinAccel()
{
// max rpm 8500 ユーザー使用分として7000をマックスとする(仮)
@@ -43,11 +48,18 @@
return ret;
}
+float HbUserOpe::GetAinThrottleRaw()
+{
+ AinTrtlVal = AinAxl.read();
+ return AinTrtlVal;
+}
+
INT16 HbUserOpe::GetAinThrottle()
{
INT16 ret = 0;
- AinTrtlVal = AinThrottle.read();
- ret = (INT16)(MAX_12BIT_DATA * AinTrtlVal);
+ AinTrtlVal = AinAxl.read();
+ //AinTrtlVal = AinThrottle.read();
+ ret = (INT16)(MAX_VAL_12BIT * AinTrtlVal);
if(gf_DbgPrint.bf.ana2 == true){
sp.printf("Trottle Val=%d analog val=%f\r\n",ret,AinTrtlVal);
gf_DbgPrint.bf.ana2 = false;