From 30363e18c6082912ad1b78e8b024d5e2aca97734 Mon Sep 17 00:00:00 2001 From: Kalman Date: Sun, 30 Sep 2018 13:57:21 +0800 Subject: [PATCH] Add constraints to imu's parameter settings --- src/api/api.cc | 3 +++ src/internal/channels.cc | 29 ++++++++++++++++++++++++----- src/internal/config.cc | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/src/api/api.cc b/src/api/api.cc index fb8d958..a7b8a8d 100644 --- a/src/api/api.cc +++ b/src/api/api.cc @@ -236,6 +236,7 @@ std::shared_ptr API::Create( return std::make_shared(device); } +// TODO(Kalman): Compatible with two generation std::shared_ptr API::Create(std::shared_ptr device) { return Create(device, Resolution::RES_2560x800); } @@ -245,6 +246,7 @@ std::shared_ptr API::Create(int argc, char *argv[]) { return Create(argc, argv, device); } +// TODO(Kalman): Compatible with two generation std::shared_ptr API::Create( int argc, char *argv[], std::shared_ptr device) { static glog_init _(argc, argv); @@ -458,6 +460,7 @@ std::shared_ptr API::device() { return device_; } +// TODO(Kalman): Call this function in the appropriate place void API::CheckImageParams() { if (device_ != nullptr) { bool in_l_ok, in_r_ok, ex_l2r_ok; diff --git a/src/internal/channels.cc b/src/internal/channels.cc index bf65f1e..05dfc80 100644 --- a/src/internal/channels.cc +++ b/src/internal/channels.cc @@ -142,6 +142,7 @@ void Channels::LogControlInfos() const { } } +// TODO(Kalman): Compatible with two generation void Channels::UpdateControlInfos() { for (auto &&option : std::vector