mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-29 03:36:07 +08:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user