From 259dc968aa103e9c464a6cec5c5dd5a8ee2df2b3 Mon Sep 17 00:00:00 2001 From: KalmanSLightech Date: Sat, 21 Jul 2018 15:43:02 +0800 Subject: [PATCH] Enable imu data --- samples/device/camera.cc | 4 ++-- src/device/device.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/device/camera.cc b/samples/device/camera.cc index 65d3cee..e225ccc 100644 --- a/samples/device/camera.cc +++ b/samples/device/camera.cc @@ -87,8 +87,8 @@ int main(int argc, char *argv[]) { }); // Enable this will cache the motion datas until you get them. - // device->EnableMotionDatas(); - device->Start(Source::VIDEO_STREAMING); + device->EnableMotionDatas(); + device->Start(Source::ALL); cv::namedWindow("frame"); std::size_t motion_count = 0; diff --git a/src/device/device.cc b/src/device/device.cc index c38db1d..7ec23b8 100644 --- a/src/device/device.cc +++ b/src/device/device.cc @@ -96,7 +96,7 @@ Device::~Device() { std::shared_ptr Device::Create( const std::string &name, std::shared_ptr device) { - if (name == "MYNTEYE" || name == "CX3-UVC") { + if (name == "MYNTEYE") { return std::make_shared(device); } else if (strings::starts_with(name, "MYNT-EYE-")) { // TODO(JohnZhao): Create different device by name, such as MYNT-EYE-S1000