Initial resend handling
This commit is contained in:
parent
d0ca34ca53
commit
5fc539d300
@ -213,7 +213,7 @@ void MainWindow::xplus()
|
|||||||
|
|
||||||
void MainWindow::xminus()
|
void MainWindow::xminus()
|
||||||
{
|
{
|
||||||
QString command = "G91\n G1 X-" + ui->stepspin->text() + "\n G90";
|
QString command = "G91\nG1 X-" + ui->stepspin->text() + "\nG90";
|
||||||
sendLine(command);
|
sendLine(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,7 +224,7 @@ void MainWindow::xhome()
|
|||||||
|
|
||||||
void MainWindow::yplus()
|
void MainWindow::yplus()
|
||||||
{
|
{
|
||||||
QString command = "G91\n G1 Y" + ui->stepspin->text() + "\n G90";
|
QString command = "G91\nG1 Y" + ui->stepspin->text() + "\nG90";
|
||||||
sendLine(command);
|
sendLine(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -241,13 +241,13 @@ void MainWindow::yhome()
|
|||||||
|
|
||||||
void MainWindow::zplus()
|
void MainWindow::zplus()
|
||||||
{
|
{
|
||||||
QString command = "G91\n G1 Z" + ui->stepspin->text() + "\n G90";
|
QString command = "G91\nG1 Z" + ui->stepspin->text() + "\nG90";
|
||||||
sendLine(command);
|
sendLine(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::zminus()
|
void MainWindow::zminus()
|
||||||
{
|
{
|
||||||
QString command = "G91\n G1 Z-" + ui->stepspin->text() + "\n G90";
|
QString command = "G91\nG1 Z-" + ui->stepspin->text() + "\nG90";
|
||||||
sendLine(command);
|
sendLine(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,6 +364,12 @@ void MainWindow::readSerial()
|
|||||||
ui->bedlcd->display(btmp.toDouble());
|
ui->bedlcd->display(btmp.toDouble());
|
||||||
sinceLastTemp.restart();
|
sinceLastTemp.restart();
|
||||||
}
|
}
|
||||||
|
else if(data.startsWith("Resend"))
|
||||||
|
{
|
||||||
|
if(currentLine > 0) currentLine -= data.split(':')[1].toInt();
|
||||||
|
if(currentLine < 0) currentLine = 0;
|
||||||
|
commandDone = true;
|
||||||
|
}
|
||||||
else if(data.startsWith("ok") || data.startsWith("wait")) commandDone = true;
|
else if(data.startsWith("ok") || data.startsWith("wait")) commandDone = true;
|
||||||
printMsg(QString(data));
|
printMsg(QString(data));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user