HAL_Linux: fixed termios settings on BBB initial boot

this should fix the problem of losing the GPS in flight
This commit is contained in:
Andrew Tridgell 2014-11-07 22:13:29 +11:00
parent 3f60cddb87
commit 14a6878bcd

View File

@ -150,9 +150,10 @@ 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_iflag &= ~(BRKINT | ICRNL | IMAXBEL);
t.c_iflag &= ~(BRKINT | ICRNL | IMAXBEL | IXON | IXOFF);
t.c_oflag &= ~(OPOST | ONLCR);
t.c_lflag &= ~(ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE);
t.c_cc[VMIN] = 0;
tcsetattr(_rd_fd, TCSANOW, &t);
}