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:
- 64:40943c843da7
- Parent:
- 62:4b873328d3a8
- Parent:
- 63:aee44afe6363
- Child:
- 66:0b3b290137b6
diff -r 4b873328d3a8 -r 40943c843da7 HbManager.cpp
--- a/HbManager.cpp Mon Mar 11 04:07:43 2019 +0000
+++ b/HbManager.cpp Mon Mar 11 04:24:00 2019 +0000
@@ -60,6 +60,11 @@
gf_AngBrk.req = false;
sp.printf("Ang Rate Brk:[%f]",ang_rate_brk);
}
+ if(gf_MtDefaultOffset.req){
+ mot_takeoff_offset = gf_MtDefaultOffset.val;
+ gf_MtDefaultOffset.req = false;
+ sp.printf("take off Offset:[%d]",mot_takeoff_offset);
+ }
}
void HbManager::calAtt(){
if(att == NULL) return;
@@ -366,6 +371,12 @@
subProp[(int)pos]->setValue(ATT, val);
}
+void HbManager::setMotTakeOffOffset(){
+ for(int i = 0; i < 4; ++i){
+ gf_MtReqOfs[i].req = true;
+ gf_MtReqOfs[i].val = mot_takeoff_offset;
+ }
+}
void HbManager::setFpgaMot(eMotPos pos,eMotType type, INT16 val){
if(subProp[(int)pos] == NULL) return;
subProp[(int)pos]->setValueFpgaMot(type, val);
@@ -971,10 +982,13 @@
for(int i = 0; i < 2; ++i){
en_srv_step[i] = 30;
- en_srv_adj_step[i] = 20;
+ en_srv_adj_step[i] = 50;
}
+
mot_brk = DEF_BRK_RPM;
ang_rate_brk = DEF_BRK_ANG / static_cast<float>(UPDATE_RATE);
+
+ mot_takeoff_offset = DEF_MOT_OFFSET;
// //初期化
// motorVal[0]=0;
// motorVal[1]=0;