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.
This commit is contained in:
Beat Küng 2018-03-05 15:58:48 +01:00 committed by Lorenz Meier
parent 1290db7cb7
commit 03b8cd78b3

View File

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