fix(imu): repair 2.0 firmware and s1/s2 logic if.

This commit is contained in:
TinyO 2019-09-27 09:17:35 +08:00
parent 0447c2335f
commit 25e5a0bead
2 changed files with 4 additions and 25 deletions

View File

@ -378,7 +378,8 @@ void Channels::SetImuCallback(imu_callback_t callback) {
}
void Channels::DoImuTrack() {
if (dev_info_->firmware_version >= Version(2, 0)) {
if (dev_info_->firmware_version >= Version(2, 0) &&
strstr(dev_info_->name.c_str(), "S2") != nullptr ) {
return DoImuTrack2();
} else {
return DoImuTrack1();
@ -498,7 +499,8 @@ void Channels::StartImuTracking(imu_callback_t callback) {
<< ", sleep " << (IMU_TRACK_PERIOD - time_elapsed_ms) << " ms";
}
};
if (dev_info_->firmware_version >= Version(2, 0)) {
if (dev_info_->firmware_version >= Version(2, 0) &&
strstr(dev_info_->name.c_str(), "S2") != nullptr ) {
while (!imu_track_stop_) {
auto &&time_beg = times::now();
DoImuTrack2();

View File

@ -162,27 +162,4 @@ std::shared_ptr<Extrinsics> getDefaultExtrinsics() {
return res;
}
// sgbm_matcher = cv::StereoSGBM::create(0, 16, 3);
// sgbm_matcher->setPreFilterCap(63);
// sgbm_matcher->setBlockSize(sgbmWinSize);
// sgbm_matcher->setP1(8 * sgbmWinSize * sgbmWinSize);
// sgbm_matcher->setP2(32 * sgbmWinSize * sgbmWinSize);
// sgbm_matcher->setMinDisparity(0);
// sgbm_matcher->setNumDisparities(numberOfDisparities);
// sgbm_matcher->setUniquenessRatio(10);
// sgbm_matcher->setSpeckleWindowSize(100);
// sgbm_matcher->setSpeckleRange(32);
// sgbm_matcher->setDisp12MaxDiff(1);
// bm_matcher = cv::StereoBM::create(0, 3);
// bm_matcher->setPreFilterSize(9);
// bm_matcher->setPreFilterCap(31);
// bm_matcher->setBlockSize(15);
// bm_matcher->setMinDisparity(0);
// bm_matcher->setNumDisparities(64);
// bm_matcher->setUniquenessRatio(60);
// bm_matcher->setTextureThreshold(10);
// bm_matcher->setSpeckleWindowSize(100);
// bm_matcher->setSpeckleRange(4);
MYNTEYE_END_NAMESPACE