Iceman support: info(), chk(), nested()

This commit is contained in:
wh201906
2020-08-05 23:55:14 +08:00
parent eb5fa7ec9a
commit d15b8e21fc
3 changed files with 64 additions and 18 deletions
+3 -3
View File
@@ -26,10 +26,10 @@ void Util::execCMD(QString cmd)
emit write(cmd + "\r\n");
}
QString Util::execCMDWithOutput(QString cmd, unsigned long timeout)
QString Util::execCMDWithOutput(QString cmd, unsigned long waitTime)
{
QTime currTime = QTime::currentTime();
QTime targetTime = QTime::currentTime().addMSecs(timeout);
QTime targetTime = QTime::currentTime().addMSecs(waitTime);
isRequiringOutput = true;
requiredOutput->clear();
execCMD(cmd);
@@ -39,7 +39,7 @@ QString Util::execCMDWithOutput(QString cmd, unsigned long timeout)
if(timeStamp > currTime)
{
currTime = timeStamp;
targetTime = timeStamp.addMSecs(timeout);
targetTime = timeStamp.addMSecs(waitTime);
}
}
isRequiringOutput = false;
+1 -1
View File
@@ -25,7 +25,7 @@ public:
explicit Util(QObject *parent = nullptr);
void execCMD(QString cmd);
QString execCMDWithOutput(QString cmd, unsigned long timeout = 2000);
QString execCMDWithOutput(QString cmd, unsigned long waitTime = 2000);
void delay(unsigned int msec);
ClientType getClientType();
public slots: