We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2034934 commit 4c2b86fCopy full SHA for 4c2b86f
qt/programmer.cpp
@@ -9,7 +9,8 @@
9
#define CDC_DEV_NAME "/dev/ttyACM0"
10
#define CDC_BUF_SIZE 60
11
12
-#define READ_WRITE_TIMEOUT_MS 30000
+#define READ_WRITE_TIMEOUT_MS 10
13
+#define READ_RESP_TIMEOUT_MS 30000
14
15
Programmer::Programmer(QObject *parent) : QObject(parent)
16
{
@@ -81,7 +82,7 @@ int Programmer::readRespHead(RespHeader *respHead)
81
82
83
qint64 ret;
84
- serialPort.waitForReadyRead(READ_WRITE_TIMEOUT_MS);
85
+ serialPort.waitForReadyRead(READ_RESP_TIMEOUT_MS);
86
ret = serialPort.read((char *)respHead, sizeof(RespHeader));
87
if (ret < 0)
88
0 commit comments