Skip to content

Commit

Permalink
Merge pull request photoneo#45 from photoneo/teebor/BIPI-3106-remove-…
Browse files Browse the repository at this point in the history
…ROS-dependencies-from-libPhoXiInterface

Remove ROS dependent LOG macros from the libPhoXiInterface
  • Loading branch information
PhotoTeeborChoka authored Apr 21, 2020
2 parents 692e0b5 + 3ebf5fd commit 85b62e1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 16 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ target_link_libraries(
${catkin_LIBRARIES}
)

target_link_libraries(
${PROJECT_NAME}
${catkin_LIBRARIES}
${PROJECT_NAME}_Ros_Interface
target_link_libraries( ${PROJECT_NAME}
PRIVATE
${catkin_LIBRARIES}
${PROJECT_NAME}_Ros_Interface
)

install(TARGETS ${PROJECT_NAME}_Ros_Interface ${PROJECT_NAME}_PhoXi_Interface
Expand Down
2 changes: 1 addition & 1 deletion include/phoxi_camera/PhoXiInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ namespace phoxi_camera {
/**
* Default constructor.
*/
PhoXiInterface();
PhoXiInterface() = default;

/**
* Types of rows (chars representing starting sign of row) returned by avahi-browse call.
Expand Down
12 changes: 1 addition & 11 deletions src/PhoXiInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
#include <phoxi_camera/PhoXiConversions.h>

namespace phoxi_camera {

PhoXiInterface::PhoXiInterface() {

}


std::vector<PhoXiDeviceInformation> PhoXiInterface::deviceList() {
if (!phoXiFactory.isPhoXiControlRunning()) {
scanner.Reset();
Expand All @@ -26,9 +20,7 @@ namespace phoxi_camera {
try {
scannersIPs = PhoXiInterface::getScannersIPs();
}
catch (PhoXiInterfaceException& e){
ROS_WARN_STREAM("Can not get scanner ip: " << e.what());
}
catch (PhoXiInterfaceException& e){}

for (auto &device : deviceInfo) {
if (scannersIPs.empty() || (scannersIPs.find(device.hwIdentification) == scannersIPs.end())) {
Expand Down Expand Up @@ -424,7 +416,6 @@ namespace phoxi_camera {
pclose(pipe);

if (connectedScanners.empty()) {
ROS_WARN("Avahi-browse does not see any scanners.");
return scannersIPs;
}

Expand Down Expand Up @@ -480,7 +471,6 @@ namespace phoxi_camera {
// if (!stderrOutput.empty()) {
// for (auto &err : stderrOutput) {
// if (err.find("Got SIGTERM, quitting") != std::string::npos) {
// ROS_WARN("Avahi-browse terminated due to IPv4 retrieving long processing time");
// } else {
// std::cout << err << std::endl;
// }
Expand Down

0 comments on commit 85b62e1

Please sign in to comment.