Commit 8a44737b authored by wangdawei's avatar wangdawei

test

parent 972c7846
...@@ -331,6 +331,7 @@ bool AdjustPPK::Undisort( ...@@ -331,6 +331,7 @@ bool AdjustPPK::Undisort(
bool AdjustPPK::ConfigMap(double timestamp) bool AdjustPPK::ConfigMap(double timestamp)
{ {
int ret; int ret;
bool newMatcher = false;
while(true){ while(true){
ret = ppkPeriodVec_.at(periodIndex_).InPeriod(timestamp); ret = ppkPeriodVec_.at(periodIndex_).InPeriod(timestamp);
if(-1 == ret){ if(-1 == ret){
...@@ -338,6 +339,7 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -338,6 +339,7 @@ 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{ //no need reset matcher
break; break;
...@@ -347,6 +349,9 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -347,6 +349,9 @@ bool AdjustPPK::ConfigMap(double timestamp)
return false; return false;
} }
} }
if(!newMatcher){
return true;
}
auto meshId = ppkPeriodVec_.at(periodIndex_).meshId; auto meshId = ppkPeriodVec_.at(periodIndex_).meshId;
while(!meshVec_.at(meshId).matcher){ while(!meshVec_.at(meshId).matcher){
std::this_thread::sleep_for(std::chrono::milliseconds(100)); std::this_thread::sleep_for(std::chrono::milliseconds(100));
...@@ -358,7 +363,7 @@ bool AdjustPPK::ConfigMap(double timestamp) ...@@ -358,7 +363,7 @@ bool AdjustPPK::ConfigMap(double timestamp)
bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo) bool AdjustPPK::LocateCloud(const CloudInfoForMatch &cloudInfo)
{ {
bool fstMatch = true; static bool fstMatch = true;
if(!currMatcher_){ if(!currMatcher_){
LOG(INFO) << "no currMatcher_!"; LOG(INFO) << "no currMatcher_!";
return false; return false;
......
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