1
0
mirror of https://github.com/wjwwood/serial.git synced 2026-01-22 11:44:53 +08:00

Fixed the issue with reading on osx. writing still needs to be tested, then I am going to remove the ROS dependency.

This commit is contained in:
William Woodall 2011-03-19 14:08:34 -05:00
parent 0f75942fb4
commit 81b93ee513
3 changed files with 8 additions and 2 deletions

View File

@ -28,4 +28,8 @@ rosbuild_add_boost_directories()
rosbuild_link_boost(${PROJECT_NAME} system filesystem thread)
rosbuild_add_executable(test_serial src/test_serial.cpp)
target_link_libraries(test_serial serial)
# rosbuild_add_executable(boosttest src/boosttest.cpp)
# Check for OS X and if so disable kqueue support in asio
IF(CMAKE_SYSTEM_NAME MATCHES Darwin)
add_definitions(-DBOOST_ASIO_DISABLE_KQUEUE)
ENDIF(CMAKE_SYSTEM_NAME MATCHES Darwin)

View File

@ -40,6 +40,8 @@
#include <sstream>
#include <string>
// #define BOOST_ASIO_DISABLE_KQUEUE
#include <boost/asio.hpp>
#include <boost/asio/serial_port.hpp>
#include <boost/bind.hpp>

View File

@ -30,7 +30,7 @@ int main(int argc, char **argv)
ros::NodeHandle n;
std::string port("/dev/ttyUSB0");
std::string port("/dev/tty.usbserial-A900cfJA");
// std::string port("/dev/tty.usbmodemfa141");
serial = new Serial(port, 9600, 250);