Reverted serial buffer check to more primitive due to overkill safety

This commit is contained in:
NeoTheFox 2015-03-01 16:39:08 +03:00
parent b60379192c
commit 043d498fb6

View File

@ -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
{