mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 00:43:34 +08:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user