From 043d498fb6ce8f590924ed1377c1f283fb49a74a Mon Sep 17 00:00:00 2001 From: NeoTheFox Date: Sun, 1 Mar 2015 16:39:08 +0300 Subject: [PATCH] Reverted serial buffer check to more primitive due to overkill safety --- mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index b6c5f8f..222e563 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -425,14 +425,14 @@ void MainWindow::on_sendBtn_clicked() void MainWindow::sendNext() { - if(injectingCommand && commandDone && printer.bytesToWrite() < 150) + if(injectingCommand && commandDone && printer.isWritable()) { sendLine(userCommand); commandDone=false; injectingCommand=false; return; } - else if(sending && !paused && printer.bytesToWrite() < 150 && commandDone) + else if(sending && !paused && commandDone && printer.isWritable()) { if(currentLine >= gcode.size()) //check if we are at the end of array {