fix(samples): check sample enable code
This commit is contained in:
parent
3b22fa3abc
commit
96a1b2a62d
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -25,6 +25,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
bool ok;
|
||||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
api->ConfigStreamRequest(request);
|
||||
|
||||
Model model = api->GetModel();
|
||||
|
|
|
@ -28,6 +28,8 @@ int main(int argc, char *argv[]) {
|
|||
auto &&request = api->SelectStreamRequest(&ok);
|
||||
if (!ok) return 1;
|
||||
api->ConfigStreamRequest(request);
|
||||
api->EnableStreamData(Stream::LEFT);
|
||||
api->EnableStreamData(Stream::RIGHT);
|
||||
|
||||
// Enable this will cache the motion datas until you get them.
|
||||
api->EnableMotionDatas();
|
||||
|
|
|
@ -238,8 +238,7 @@ void Synthetic::DisableStreamData(const Stream &stream) {
|
|||
bool Synthetic::IsStreamDataEnabled(const Stream &stream) const {
|
||||
if (checkControlDateWithStream(stream)) {
|
||||
auto data = getControlDateWithStream(stream);
|
||||
return data.enabled_mode_ == MODE_SYNTHETIC ||
|
||||
data.enabled_mode_ == MODE_NATIVE;
|
||||
return data.enabled_mode_ == MODE_SYNTHETIC;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user