add other serial communication options
Otherwize, it can be happened that Operation "7" (0x07) turns to be "135" (0x87)
This commit is contained in:
parent
9b3e77d0fe
commit
b42565be8e
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue