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