mirror of
https://github.com/wjwwood/serial.git
synced 2026-01-22 19:54:57 +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:
parent
0f75942fb4
commit
81b93ee513
@ -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)
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user