Handle "Not SD printing"
This commit is contained in:
parent
b986c98f9c
commit
83a5f0eb1d
@ -128,6 +128,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
connect(parserWorker, &Parser::receivedError, this, &MainWindow::receivedError);
|
||||
connect(parserWorker, &Parser::receivedSDDone, this, &MainWindow::receivedSDDone);
|
||||
connect(parserWorker, &Parser::receivedSDUpdate, this, &MainWindow::updateSDStatus);
|
||||
connect(parserWorker, &Parser::receivedNotSDPrinting, this, &MainWindow::receivedNotSDPrinting);
|
||||
parserThread->start();
|
||||
parserThread->setPriority(QThread::HighestPriority);
|
||||
|
||||
@ -784,6 +785,13 @@ void MainWindow::checkSDStatus()
|
||||
emit injectCommand("M27");
|
||||
}
|
||||
|
||||
void MainWindow::receivedNotSDPrinting()
|
||||
{
|
||||
sdprinting = false;
|
||||
ui->fileBox->setDisabled(true);
|
||||
ui->filename->setText(tr("Filename: "));
|
||||
}
|
||||
|
||||
void MainWindow::on_stepspin_valueChanged(const QString &arg1)
|
||||
{
|
||||
if(arg1.toFloat() < 1) ui->stepspin->setSingleStep(0.1);
|
||||
|
||||
@ -103,6 +103,7 @@ private slots:
|
||||
void EEPROMSettingReceived(QString esetting);
|
||||
void receivedError();
|
||||
void receivedSDDone();
|
||||
void receivedNotSDPrinting();
|
||||
void parseFile(QString filename);
|
||||
void recentClicked();
|
||||
void updateFileProgress(FileProgress);
|
||||
|
||||
@ -105,7 +105,7 @@ void Parser::parse(QByteArray data)
|
||||
emit receivedSDUpdate(p);
|
||||
|
||||
}
|
||||
else if(data.startsWith("Not SD "));
|
||||
else if(data.startsWith("Not SD ")) emit receivedNotSDPrinting();
|
||||
else if(data.contains("Begin file list"))
|
||||
{
|
||||
SDFilesList.clear();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user