Skip to content

Commit 11c2618

Browse files
committed
qt: fix write data is slow
1 parent e072260 commit 11c2618

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

qt/writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ int Writer::writeData()
301301
break;
302302
}
303303

304-
if (read(pbuf, bufSize))
304+
if (read(pbuf, writeDataAckLen))
305305
return -1;
306306

307307
return 0;

qt/writer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class Writer : public QObject
1616
Q_OBJECT
1717

1818
static const uint32_t bufSize = 64;
19+
static const uint32_t writeDataAckLen = 10;
1920

2021
SerialPort *serialPort = nullptr;
2122
QString portName;

0 commit comments

Comments
 (0)