From f10324ac81d9b820d9fb1e05d8795ea3606fc4ed Mon Sep 17 00:00:00 2001 From: NeoTheFox Date: Thu, 12 Mar 2015 20:18:17 +0300 Subject: [PATCH] Fix for marlin - do not expect Ok after every line --- mainwindow.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 69f675f..df0a060 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -541,8 +541,12 @@ void MainWindow::readSerial() QByteArray data = printer.readLine(); //Read the line emit recievedData(data); //Send data to parser thread - if(data.startsWith("ok")) readyRecieve++; - else if(data.startsWith("wa")) readyRecieve=1; + if(firmware == Marlin || firmware == OtherFirmware) readyRecieve++; + else if(firmware == Repetier) + { + if(data.startsWith("ok")) readyRecieve++; + else if(data.startsWith("wa")) readyRecieve=1; + } printMsg(QString(data)); //echo } }