Browse Source

HAL_Linux: fixed termios settings on BBB initial boot

this should fix the problem of losing the GPS in flight
mission-4.1.18
Andrew Tridgell 10 years ago
parent
commit
14a6878bcd
  1. 3
      libraries/AP_HAL_Linux/UARTDriver.cpp

3
libraries/AP_HAL_Linux/UARTDriver.cpp

@ -150,9 +150,10 @@ void LinuxUARTDriver::begin(uint32_t b, uint16_t rxS, uint16_t txS)
tcgetattr(_rd_fd, &t); tcgetattr(_rd_fd, &t);
cfsetspeed(&t, b); cfsetspeed(&t, b);
// disable LF -> CR/LF // 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_oflag &= ~(OPOST | ONLCR);
t.c_lflag &= ~(ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE); t.c_lflag &= ~(ISIG | ICANON | IEXTEN | ECHO | ECHOE | ECHOK | ECHOCTL | ECHOKE);
t.c_cc[VMIN] = 0;
tcsetattr(_rd_fd, TCSANOW, &t); tcsetattr(_rd_fd, TCSANOW, &t);
} }

Loading…
Cancel
Save