Merge branch 'develop' into feature/android

* develop:
  refactor(device): merge device_s210a to device_s2
  fix: improve processor close order
  refactor(synthetic): make switch of disable copy and disable unnessary copy
  fix(api): remove enable LEFT/RIGHT stream code
  refactor(synthetic): use RootProcessor as root node
  fix(ros): ros record -a
  fix(api): LEFT/RIGHT callback fix
  fix(samples): check sample enable code
  style(api): change sdk version api
  refactor(synthetic): remove usless logic
This commit is contained in:
John Zhao
2019-03-02 13:58:05 +08:00
32 changed files with 619 additions and 989 deletions

View File

@@ -26,7 +26,6 @@
#include "mynteye/device/motions.h"
#include "mynteye/device/standard/device_s.h"
#include "mynteye/device/standard2/device_s2.h"
#include "mynteye/device/standard2/device_s210a.h"
#include "mynteye/device/streams.h"
#include "mynteye/device/types.h"
#include "mynteye/util/strings.h"
@@ -104,7 +103,6 @@ std::shared_ptr<Device> Device::Create(
if (name == "MYNTEYE") {
return std::make_shared<StandardDevice>(device);
} else if (strings::starts_with(name, "MYNT-EYE-")) {
// TODO(JohnZhao): Create different device by name, such as MYNT-EYE-S1000
std::string model_s = name.substr(9, 5);
VLOG(2) << "MYNE EYE Model: " << model_s;
DeviceModel model(model_s);
@@ -113,9 +111,9 @@ std::shared_ptr<Device> Device::Create(
return std::make_shared<StandardDevice>(device);
} else if (model.generation == '2') {
if (model.custom_code == '0') {
return std::make_shared<Standard2Device>(device);
return std::make_shared<Standard2Device>(Model::STANDARD2, device);
} else if (model.custom_code == 'A') {
return std::make_shared<Standard210aDevice>(device);
return std::make_shared<Standard2Device>(Model::STANDARD210A, device);
} else {
LOG(FATAL) << "No such custom code now";
}