Skip to content

Commit

Permalink
Merge pull request #809 from mavlink/fix-serial-disconnect
Browse files Browse the repository at this point in the history
core: fix destruction of serial connection
  • Loading branch information
julianoes committed Jul 23, 2019
2 parents d83f57f + 9b8fe0d commit f1725a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/serial_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ ConnectionResult SerialConnection::setup_port()
tc.c_cflag &= ~(CSIZE | PARENB | CRTSCTS);
tc.c_cflag |= CS8;

tc.c_cc[VMIN] = 1; // We want at least 1 byte to be available.
tc.c_cc[VTIME] = 0; // We don't timeout but wait indefinitely.
tc.c_cc[VMIN] = 0; // We are ok with 0 bytes.
tc.c_cc[VTIME] = 10; // Timeout after 1 second.
#endif

#if defined(LINUX) || defined(APPLE)
Expand Down

0 comments on commit f1725a5

Please sign in to comment.