HAL_Linux: clear more UART flags

this fixes a major timing issue caused by bad UART flags (I suspect
the echo flags) and the GPS auto detection code
This commit is contained in:
Andrew Tridgell 2014-08-18 22:20:55 +10:00
parent 79fa22e4ad
commit 9fccb5f5ed

View File

@ -166,7 +166,9 @@ void LinuxUARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS)
tcgetattr(_rd_fd, &t);
cfsetspeed(&t, b);
// disable LF -> CR/LF
t.c_oflag &= ~ONLCR;
t.c_iflag &= ~(BRKINT | ICRNL | IMAXBEL);
t.c_oflag &= ~(OPOST | ONLCR);
t.c_lflag &= ~(ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE);
tcsetattr(_rd_fd, TCSANOW, &t);
}