Skip to content

Commit

Permalink
Merge branch 'examples_fixes' into 'main'
Browse files Browse the repository at this point in the history
Minor examples fixes

See merge request syntron/support/csr/ifm3d/ifm3d!307
  • Loading branch information
lola-masson committed Aug 22, 2023
2 parents ef52c3e + ac9ed2f commit 7691085
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/o3r/deserialize/deserialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ main()
auto frame = future.get();
// Get the data from the relevant buffer
auto rgb_info_buffer = frame->GetBuffer(ifm3d::buffer_id::RGB_INFO);

fg->Stop();
//////////////////////////
// Extract data from the buffer
// Using the deserializer module
Expand Down
2 changes: 1 addition & 1 deletion examples/o3r/deserialize/deserialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
raise TimeoutError
except Exception as e:
raise e

fg.stop()
###############################
# Extract data from the buffer
# Using the deserializer module
Expand Down
10 changes: 8 additions & 2 deletions examples/o3r/multi_head/multi_head.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,12 @@ main()
auto fg = std::make_shared<ifm3d::FrameGrabber>(o3r, pcic);

// Start the framegrabber
fg->Start({ifm3d::buffer_id::XYZ, ifm3d::buffer_id::JPEG_IMAGE});
if (type=="2D"){
fg->Start({ifm3d::buffer_id::JPEG_IMAGE});
}
else{
fg->Start({ifm3d::buffer_id::XYZ});
}
fgs.push_back(fg);
}

Expand All @@ -84,10 +89,11 @@ main()
return -1;
}
auto frame = future.get();

std::cout << "Timestamp of frame " << std::setw(2) << std::setfill('0')
<< ": " << formatTimestamp(frame->TimeStamps()[0])
<< std::endl;

fg->Stop();
}

return 0;
Expand Down

0 comments on commit 7691085

Please sign in to comment.