From bc7e4919e2d35d87fed9ce5e363f44b5d22b11f0 Mon Sep 17 00:00:00 2001 From: John Zhao Date: Thu, 30 May 2019 15:30:17 +0800 Subject: [PATCH] refactor(api): improve get sdk version and style changes --- src/mynteye/api/api.cc | 12 +----------- src/mynteye/api/synthetic.cc | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/mynteye/api/api.cc b/src/mynteye/api/api.cc index f122c23..bb9a95b 100644 --- a/src/mynteye/api/api.cc +++ b/src/mynteye/api/api.cc @@ -332,17 +332,7 @@ std::string API::GetInfo(const Info &info) const { } std::string API::GetSDKVersion() const { - std::string info_path = - utils::get_sdk_install_dir(); - info_path.append(MYNTEYE_OS_SEP "share" \ - MYNTEYE_OS_SEP "mynteye" MYNTEYE_OS_SEP "build.info"); - - cv::FileStorage fs(info_path, cv::FileStorage::READ); - if (!fs.isOpened()) { - LOG(WARNING) << "build.info not found: " << info_path; - return "null"; - } - return fs["MYNTEYE_VERSION"]; + return MYNTEYE_API_VERSION_STR; } IntrinsicsPinhole API::GetIntrinsics(const Stream &stream) const { diff --git a/src/mynteye/api/synthetic.cc b/src/mynteye/api/synthetic.cc index 5fdc446..d97f4a4 100644 --- a/src/mynteye/api/synthetic.cc +++ b/src/mynteye/api/synthetic.cc @@ -65,7 +65,7 @@ void Synthetic::InitCalibInfo() { } else { calib_default_tag_ = true; calib_model_ = CalibrationModel::PINHOLE; - LOG(INFO) << "camera calib model: unknow ,use default pinhole data"; + LOG(INFO) << "camera calib model: unknow, use default pinhole data"; intr_left_ = getDefaultIntrinsics(); intr_right_ = getDefaultIntrinsics(); extr_ = getDefaultExtrinsics();