forked from Archive/PX4-Autopilot
Add raw mode for UART to mavink_main.cpp
Raw mode is not the default mode in Ubuntu 14.04. Disable echo and special character processing. Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
parent
fd1effa4fe
commit
5cf1140944
|
@ -675,6 +675,9 @@ int Mavlink::mavlink_open_uart(int baud, const char *uart_name, struct termios *
|
|||
_is_usb_uart = true;
|
||||
}
|
||||
|
||||
/* Put in raw mode */
|
||||
cfmakeraw(&uart_config);
|
||||
|
||||
if ((termios_state = tcsetattr(_uart_fd, TCSANOW, &uart_config)) < 0) {
|
||||
warnx("ERR SET CONF %s\n", uart_name);
|
||||
::close(_uart_fd);
|
||||
|
|
Loading…
Reference in New Issue