From 9c6bd6cdeaa7c8ba2ede6e159e92a8b6e99efbd9 Mon Sep 17 00:00:00 2001 From: Simon Voordouw Date: Mon, 12 Jun 2017 15:37:43 +0200 Subject: [PATCH] gcode file is done when current_line is higher or equal than total_lines --- src/script/print-fetch.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/script/print-fetch.lua b/src/script/print-fetch.lua index 4f2b0c6..3fd0eaa 100755 --- a/src/script/print-fetch.lua +++ b/src/script/print-fetch.lua @@ -44,7 +44,7 @@ do current_line = current_line + 1 line = f:read() end - if current_line > total_lines then + if current_line >= total_lines then finished = true break end @@ -60,8 +60,6 @@ do while (not accepts_new_gcode) do local current,buffer,total,bufferSize,maxBufferSize = printer:getProgress() - - print("current: " .. current .. " total:" .. total .. " buffer: " .. buffer .. " bufferSize: " .. bufferSize .. " maxBufferSize: " .. maxBufferSize) local percentageBufferSize = bufferSize / maxBufferSize if percentageBufferSize < 0.8 then