From 5d41fe197a61d2ddc01dcd8e2a68cd612c9d50a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Mon, 5 Mar 2018 15:58:48 +0100 Subject: [PATCH] gps: explicitly disable flow control If the GPS driver was used on another port (e.g. TELEM2), it would get stuck in a `write` call and not return anymore. Disabling flow control fixes that. CPU usage is unchanged. --- src/drivers/gps/gps.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/gps/gps.cpp b/src/drivers/gps/gps.cpp index fb514da0a949..845976b51f66 100644 --- a/src/drivers/gps/gps.cpp +++ b/src/drivers/gps/gps.cpp @@ -530,8 +530,8 @@ int GPS::setBaudrate(unsigned baud) // uart_config.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG); - /* no parity, one stop bit */ - uart_config.c_cflag &= ~(CSTOPB | PARENB); + /* no parity, one stop bit, disable flow control */ + uart_config.c_cflag &= ~(CSTOPB | PARENB | CRTSCTS); /* set baud rate */ if ((termios_state = cfsetispeed(&uart_config, speed)) < 0) {