Commit b4c5624d authored by wangdawei's avatar wangdawei

test

parent 5db99f39
...@@ -337,7 +337,7 @@ bool AdjustPPK::Undisort( ...@@ -337,7 +337,7 @@ bool AdjustPPK::Undisort(
bool AdjustPPK::ConfigMap(double timestamp) bool AdjustPPK::ConfigMap(double timestamp)
{ {
int ret; int ret;
bool newMatcher = false; static size_t lastPeriodIndex = 9999;
while(true){ while(true){
ret = ppkPeriodVec_.at(periodIndex_).InPeriod(timestamp); ret = ppkPeriodVec_.at(periodIndex_).InPeriod(timestamp);
if(-1 == ret){ if(-1 == ret){
...@@ -345,9 +345,8 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -345,9 +345,8 @@ bool AdjustPPK::ConfigMap(double timestamp)
} }
if(0 == ret){ if(0 == ret){
periodIndex_++; periodIndex_++;
newMatcher = true;
LOG(INFO) << "next period " << periodIndex_; LOG(INFO) << "next period " << periodIndex_;
}else{ //no need reset matcher }else{
break; break;
} }
if(periodIndex_ >= ppkPeriodVec_.size()){ if(periodIndex_ >= ppkPeriodVec_.size()){
...@@ -355,7 +354,7 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -355,7 +354,7 @@ bool AdjustPPK::ConfigMap(double timestamp)
return false; return false;
} }
} }
if(!newMatcher){ if(lastPeriodIndex == periodIndex_){
return true; return true;
} }
auto meshId = ppkPeriodVec_.at(periodIndex_).meshId; auto meshId = ppkPeriodVec_.at(periodIndex_).meshId;
...@@ -364,6 +363,7 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -364,6 +363,7 @@ bool AdjustPPK::ConfigMap(double timestamp)
} }
currMatcher_ = meshVec_.at(meshId).matcher; currMatcher_ = meshVec_.at(meshId).matcher;
LOG(INFO) << "set currMatcher_: " << meshId; LOG(INFO) << "set currMatcher_: " << meshId;
lastPeriodIndex = periodIndex_;
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment