gcode file is done when current_line is higher or equal than total_lines

This commit is contained in:
Simon Voordouw 2017-06-12 15:37:43 +02:00
parent 2f91065ff7
commit 9c6bd6cdea
1 changed files with 1 additions and 3 deletions

View File

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