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: HbManager.cpp
- Revision:
- 43:156199c2f9b6
- Parent:
- 42:cc8501b824ba
- Child:
- 44:14fe4bd10fdb
diff -r cc8501b824ba -r 156199c2f9b6 HbManager.cpp
--- a/HbManager.cpp Wed Jan 23 11:58:53 2019 +0000
+++ b/HbManager.cpp Thu Jan 24 13:21:01 2019 +0000
@@ -306,6 +306,12 @@
setHvAxl(REAR,gf_AxReqH[1].bf.val);
gf_AxReqH[1].bf.req = false;
}
+ for(int i = 0; i < 2; ++i){
+ if(gf_AxStepReq[i].bf.req){
+ en_srv_step[i] = gf_AxStepReq[i].bf.val;
+ gf_AxStepReq[i].bf.req = false;
+ }
+ }
}
void HbManager::controlEngine(){
@@ -322,6 +328,7 @@
INT16 step = 100;
//アクセル設定
for(i=0; i<2; i++){
+ step = en_srv_step[i];
if(gf_AxReq[i].bf.req==true){
tmp = eng[i]->getAccel();
dif = tmp - (INT16)gf_AxReq[i].bf.val;
@@ -587,6 +594,7 @@
}
if(chkSWUserOpe(HbUserOpe::F_ENG_UP)){
if(stat == TAKE_OFF || stat == HOVER || stat == DRIVE){
+ gf_BlinkLED = true;
INT16 step = 3;
tmpAxl = getAccelVal(FRONT);
tmpAxl+=step;
@@ -599,6 +607,7 @@
}
if(chkSWUserOpe(HbUserOpe::F_ENG_DOWN)){
if(stat == TAKE_OFF || stat == HOVER || stat == DRIVE){
+ gf_BlinkLED = true;
INT16 step = 3;
tmpAxl = getAccelVal(FRONT);
tmpAxl-=step;
@@ -612,6 +621,7 @@
if(chkSWUserOpe(HbUserOpe::R_ENG_UP)){
if(stat == TAKE_OFF || stat == HOVER || stat == DRIVE){
INT16 step = 3;
+ gf_BlinkLED = true;
tmpAxl = getAccelVal(REAR);
tmpAxl+=step;
if(tmpAxl > MAX_VAL_12BIT){
@@ -624,6 +634,7 @@
if(chkSWUserOpe(HbUserOpe::R_ENG_DOWN)){
if(stat == TAKE_OFF || stat == HOVER || stat == DRIVE){
INT16 step = 3;
+ gf_BlinkLED = true;
tmpAxl = getAccelVal(REAR);
tmpAxl-=step;
if(tmpAxl < 0){
@@ -704,6 +715,8 @@
ope = new HbUserOpe();
+ en_srv_step[0] = 100;
+ en_srv_step[1] = 100;
// //初期化
// motorVal[0]=0;
// motorVal[1]=0;