diff --git a/include/mynteye/api/api.h b/include/mynteye/api/api.h index d369ecd..699247c 100644 --- a/include/mynteye/api/api.h +++ b/include/mynteye/api/api.h @@ -187,7 +187,10 @@ class MYNTEYE_API API { * Get the device info. */ std::string GetInfo(const Info &info) const; - + /** + * Get the sdk version. + */ + std::string GetSDKVersion() const; /** * @deprecated Get the intrinsics (pinhole) of stream. */ diff --git a/include/mynteye/types.h b/include/mynteye/types.h index 5af327e..adf52c8 100644 --- a/include/mynteye/types.h +++ b/include/mynteye/types.h @@ -126,8 +126,6 @@ enum class Info : std::uint8_t { AUXILIARY_CHIP_VERSION, /** Isp version */ ISP_VERSION, - /** SDK version*/ - SDK_VERSION, /** Last guard */ LAST }; diff --git a/src/mynteye/api/api.cc b/src/mynteye/api/api.cc index 3f034be..3f522db 100644 --- a/src/mynteye/api/api.cc +++ b/src/mynteye/api/api.cc @@ -328,23 +328,23 @@ std::shared_ptr API::GetInfo() const { } std::string API::GetInfo(const Info &info) const { - if (info == Info::SDK_VERSION) { - 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 device_->GetInfo(info); } +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"]; +} + IntrinsicsPinhole API::GetIntrinsics(const Stream &stream) const { auto in = GetIntrinsicsBase(stream); if (in->calib_model() == CalibrationModel::PINHOLE) { diff --git a/src/mynteye/api/synthetic.cc b/src/mynteye/api/synthetic.cc index 9f04ff0..818dad0 100644 --- a/src/mynteye/api/synthetic.cc +++ b/src/mynteye/api/synthetic.cc @@ -385,8 +385,6 @@ void Synthetic::InitProcessors() { processors_.push_back(points_processor); processors_.push_back(depth_processor); using namespace std::placeholders; // NOLINT - root_processor->SetProcessCallback( - std::bind(&Synthetic::OnDeviceProcess, this, _1, _2, _3)); rectify_processor->SetProcessCallback( std::bind(&Synthetic::OnRectifyProcess, this, _1, _2, _3)); disparity_processor->SetProcessCallback( @@ -398,8 +396,6 @@ void Synthetic::InitProcessors() { depth_processor->SetProcessCallback( std::bind(&Synthetic::OnDepthProcess, this, _1, _2, _3)); - root_processor->SetPostProcessCallback( - std::bind(&Synthetic::OnDevicePostProcess, this, _1)); rectify_processor->SetPostProcessCallback( std::bind(&Synthetic::OnRectifyPostProcess, this, _1)); disparity_processor->SetPostProcessCallback( diff --git a/src/mynteye/api/version_checker.cc b/src/mynteye/api/version_checker.cc index 723bbf0..d958f35 100644 --- a/src/mynteye/api/version_checker.cc +++ b/src/mynteye/api/version_checker.cc @@ -113,7 +113,7 @@ STATUS_UNIT checkUnit(const std::string& sdkv, } bool checkFirmwareVersion(const std::shared_ptr api) { - auto sdkv = api->GetInfo(Info::SDK_VERSION); + auto sdkv = api->GetSDKVersion(); auto devn = api->GetInfo(Info::DEVICE_NAME); auto firmv = api->GetInfo(Info::FIRMWARE_VERSION);