forked from Archive/PX4-Autopilot
microRTPS: transport: fix UART configuration
This commit is contained in:
parent
4b6646c5f3
commit
21953daa3b
|
@ -373,11 +373,15 @@ int UART_node::init()
|
|||
// Flow control
|
||||
if (_hw_flow_control) {
|
||||
// HW flow control
|
||||
uart_config.c_lflag |= CRTSCTS;
|
||||
|
||||
uart_config.c_cflag |= CRTSCTS;
|
||||
uart_config.c_iflag &= ~(IXON | IXOFF | IXANY);
|
||||
} else if (_sw_flow_control) {
|
||||
// SW flow control
|
||||
uart_config.c_cflag &= ~CRTSCTS;
|
||||
uart_config.c_lflag |= (IXON | IXOFF | IXANY);
|
||||
} else {
|
||||
uart_config.c_cflag &= ~CRTSCTS;
|
||||
uart_config.c_iflag &= ~(IXON | IXOFF | IXANY);
|
||||
}
|
||||
|
||||
// Set baud rate
|
||||
|
|
Loading…
Reference in New Issue