mirror of
https://github.com/wh201906/Proxmark3GUI.git
synced 2024-11-10 08:55:43 +08:00
Fix a bug in disconnect()
This commit is contained in:
parent
fb8e1a6e1b
commit
c3aafc3d31
3 changed files with 10 additions and 4 deletions
|
@ -108,9 +108,7 @@ void PM3Process::onTimeout() //when the proxmark3 client is unexpectedly termina
|
|||
// qDebug()<<portInfo->isBusy();
|
||||
if(!portInfo->isBusy())
|
||||
{
|
||||
kill();
|
||||
emit PM3StatedChanged(false);
|
||||
setSerialListener(false);
|
||||
killPM3();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,3 +147,10 @@ void PM3Process::setWorkingDir(const QString& dir)
|
|||
// the working directory cannot be the default, or the client will failed to load the dll
|
||||
this->setWorkingDirectory(dir);
|
||||
}
|
||||
|
||||
void PM3Process::killPM3()
|
||||
{
|
||||
kill();
|
||||
emit PM3StatedChanged(false);
|
||||
setSerialListener(false);
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ public slots:
|
|||
void reconnectPM3();
|
||||
void setProcEnv(const QStringList* env);
|
||||
void setWorkingDir(const QString& dir);
|
||||
void killPM3();
|
||||
private slots:
|
||||
void onTimeout();
|
||||
void onReadyRead();
|
||||
|
|
|
@ -1039,7 +1039,7 @@ void MainWindow::signalInit()
|
|||
connect(this, &MainWindow::reconnectPM3, pm3, &PM3Process::reconnectPM3);
|
||||
connect(pm3, &PM3Process::PM3StatedChanged, this, &MainWindow::onPM3StateChanged);
|
||||
connect(pm3, &PM3Process::PM3StatedChanged, util, &Util::setRunningState);
|
||||
connect(this, &MainWindow::killPM3, pm3, &PM3Process::kill);
|
||||
connect(this, &MainWindow::killPM3, pm3, &PM3Process::killPM3);
|
||||
connect(this, &MainWindow::setProcEnv, pm3, &PM3Process::setProcEnv);
|
||||
connect(this, &MainWindow::setWorkingDir, pm3, &PM3Process::setWorkingDir);
|
||||
connect(this, QOverload<bool>::of(&MainWindow::setSerialListener), pm3, QOverload<bool>::of(&PM3Process::setSerialListener));
|
||||
|
|
Loading…
Reference in a new issue