Skip to content

Commit

Permalink
Merge pull request #135 from theseankelly/dev-0.7.7
Browse files Browse the repository at this point in the history
Updated for cross-compiling on 18.04 and O3D3XX FW 1.25.4073
  • Loading branch information
theseankelly authored Nov 6, 2019
2 parents cefac20 + 784a16c commit c4c8973
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 13 deletions.
8 changes: 8 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## Changes between libo3d3xx 0.7.6 and 0.7.7

* Updated cmake/packaging scripts to support the Ubuntu 18.04 toolchain
* Disabled FindXMLRPC CMake module when cross compiling. This fixes a build
failure when cross compiling for the O3D303 with CMake 3.10.2 on Ubuntu
18.04)
* Backported PR#180 from ifm3d to handle spurious wakeups in WaitForFrame

## Changes between libo3d3xx 0.7.5 and 0.7.6

* Makes unit tests pass for the 1.23.1522 firmware (json dumps still do not
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,12 @@ Software Compatibility Matrix
<td>O3D303</td>
<td>Ethernet/IP assembly size configuration and PCIC schema auto update</td>
</tr>
<tr>
<td>0.7.7</td>
<td>1.25.4073</td>
<td>O3D303</td>
<td>Support for building with Ubuntu 18.04 toolchain, bugfixes</td>
</tr>
</table>

Features
Expand Down Expand Up @@ -257,6 +263,7 @@ validated:

* g++ 4.8.x on Ubuntu Linux 14.04 LTS
* g++ 5.3.x on Ubuntu Linux 16.04 LTS
* g++ 7.3.x on Ubuntu Linux 18.04 LTS

Installation (from source)
--------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/o3d3xx_version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
################################################
set(O3D3XX_VERSION_MAJOR 0)
set(O3D3XX_VERSION_MINOR 7)
set(O3D3XX_VERSION_PATCH 6)
set(O3D3XX_VERSION_PATCH 7)
set(O3D3XX_VERSION_STRING
"${O3D3XX_VERSION_MAJOR}.${O3D3XX_VERSION_MINOR}.${O3D3XX_VERSION_PATCH}")
4 changes: 3 additions & 1 deletion modules/camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ get_ubuntu_version(${UBUNTU_VERSION})
################################################
## Bring in dependent projects
################################################
find_package(XMLRPC REQUIRED c++ client)
if (NOT CMAKE_CROSSCOMPILING)
find_package(XMLRPC REQUIRED c++ client)
endif()
find_package(Boost REQUIRED COMPONENTS program_options system)

################################################
Expand Down
2 changes: 1 addition & 1 deletion modules/camera/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(GTEST_CMAKE_DIR "/usr/src/gtest")
enable_testing()
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin)
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin EXCLUDE_FROM_ALL)
file(GLOB CAMERA_TEST_SOURCES *.cpp)
add_executable(o3d3xx-camera-tests ${CAMERA_TEST_SOURCES})
if(BUILD_SHARED_LIBS)
Expand Down
2 changes: 1 addition & 1 deletion modules/camera/test/o3d3xx-camera-tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ TEST(Camera_Tests, GetDeviceConfig)
// std::cout << kv.first << "=" << kv.second << std::endl;
// }

EXPECT_EQ(params.size(), 38);
EXPECT_EQ(params.size(), 40);

EXPECT_EQ(params.at("Name"), dev->Name());
EXPECT_EQ(params.at("Description"), dev->Description());
Expand Down
19 changes: 15 additions & 4 deletions modules/framegrabber/src/libo3d3xx_framegrabber/frame_grabber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,15 +180,26 @@ o3d3xx::FrameGrabber::WaitForFrame(o3d3xx::ByteBuffer* buff,

try
{
// Store the current pointer backing the front buffer - this will be the
// condition checked by the condition_variable predicate (pointer should
// have changed) below
std::uint8_t* initial_buff_ptr = this->front_buffer_.data();
auto predicate =
[this, initial_buff_ptr]()
{
return this->front_buffer_.data() != initial_buff_ptr;
};

if (timeout_millis <= 0)
{
this->front_buffer_cv_.wait(lock);
this->front_buffer_cv_.wait(lock, predicate);
}
else
{
if (this->front_buffer_cv_.wait_for(
lock, std::chrono::milliseconds(timeout_millis)) ==
std::cv_status::timeout)
if (!this->front_buffer_cv_.wait_for(
lock,
std::chrono::milliseconds(timeout_millis),
predicate))
{
LOG(WARNING) << "Timeout waiting for image buffer from camera";
return false;
Expand Down
2 changes: 1 addition & 1 deletion modules/framegrabber/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(GTEST_CMAKE_DIR "/usr/src/gtest")
enable_testing()
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin)
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin EXCLUDE_FROM_ALL)
file(GLOB FRAMEGRABBER_TEST_SOURCES *.cpp)
add_executable(o3d3xx-framegrabber-tests
${FRAMEGRABBER_TEST_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion modules/image/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ if(BUILD_EXE_VIEWER)
set(CPACK_DEBIAN_PACKAGE_DEPENDS
"${CPACK_DEBIAN_PACKAGE_DEPENDS},
libvtk6-dev,
libpcl1.7,
libpcl-dev,
libopencv-highgui-dev,
libopencv-contrib-dev")
else()
Expand Down
2 changes: 1 addition & 1 deletion modules/image/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ find_library(LIB_boost_system NAMES boost_system)

set(GTEST_CMAKE_DIR "/usr/src/gtest")
enable_testing()
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin)
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin EXCLUDE_FROM_ALL)
file(GLOB IMAGE_TEST_SOURCES *.cpp)
add_executable(o3d3xx-image-tests
${IMAGE_TEST_SOURCES})
Expand Down
2 changes: 1 addition & 1 deletion modules/oem/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set(GTEST_CMAKE_DIR "${SYSROOT_CONTRIB}/usr/src/gtest")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${SYSROOT_CONTRIB}/usr/include")

enable_testing()
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin)
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin EXCLUDE_FROM_ALL)
file(GLOB TEST_SOURCES *.cpp)
add_executable(o3d3xx-oem-tests ${TEST_SOURCES})
target_link_libraries(o3d3xx-oem-tests
Expand Down
2 changes: 1 addition & 1 deletion modules/pcicclient/test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
set(GTEST_CMAKE_DIR "/usr/src/gtest")
enable_testing()
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin)
add_subdirectory(${GTEST_CMAKE_DIR} gtest_bin EXCLUDE_FROM_ALL)
file(GLOB PCICCLIENT_TEST_SOURCES *.cpp)
add_executable(o3d3xx-pcicclient-tests
${PCICCLIENT_TEST_SOURCES})
Expand Down

0 comments on commit c4c8973

Please sign in to comment.