diff --git a/platforms/nuttx/src/px4/common/SerialImpl.cpp b/platforms/nuttx/src/px4/common/SerialImpl.cpp index 4264976f4471..904d6124b132 100644 --- a/platforms/nuttx/src/px4/common/SerialImpl.cpp +++ b/platforms/nuttx/src/px4/common/SerialImpl.cpp @@ -339,7 +339,7 @@ ssize_t SerialImpl::write(const void *buffer, size_t buffer_size) } int written = ::write(_serial_fd, buffer, buffer_size); - ::fsync(_serial_fd); + tcdrain(_serial_fd); // Wait until all output is transmitted if (written < 0) { PX4_ERR("%s write error %d", _port, written);