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:
Mark Charlebois 2015-06-03 18:29:56 -07:00
parent fd1effa4fe
commit 5cf1140944
1 changed files with 3 additions and 0 deletions

View File

@ -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);