add other serial communication options

Otherwize, it can be happened that Operation "7" (0x07) turns to be "135" (0x87)
This commit is contained in:
Ryota Suzuki 2019-07-30 12:43:19 +09:00 committed by Jacob Perron
parent 9b3e77d0fe
commit b42565be8e

View file

@ -22,6 +22,9 @@ namespace create {
using namespace boost::asio;
port.open(portName);
port.set_option(serial_port::baud_rate(baud));
port.set_option(serial_port::character_size(8));
port.set_option(serial_port::parity(serial_port::parity::none));
port.set_option(serial_port::stop_bits(serial_port::stop_bits::one));
port.set_option(serial_port::flow_control(serial_port::flow_control::none));
usleep(1000000);