mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 02:53:49 +01:00
remove total lines
This commit is contained in:
parent
aec8343bc0
commit
6b4e4e934c
@ -18,6 +18,10 @@ JSON = (loadfile "/usr/share/lua/wifibox/util/JSON.lua")()
|
||||
local p3d = require("print3d")
|
||||
|
||||
local printer = p3d.getPrinter(arg[1])
|
||||
if printer == nil then
|
||||
log("error connecting to printer")
|
||||
return
|
||||
end
|
||||
|
||||
local remote = arg[2]
|
||||
|
||||
@ -26,6 +30,7 @@ local finished = false
|
||||
local id = arg[3]
|
||||
|
||||
log("gcode file id: " .. id)
|
||||
log("gcode server: " .. remote)
|
||||
|
||||
local info = JSON:decode(io.popen("wget -qO - " .. remote .. "/info/" .. id):read("*a"))
|
||||
|
||||
@ -63,7 +68,7 @@ do
|
||||
local f = io.popen("wget -qO - " .. remote .. "/fetch/" .. id .. "/" .. current_line)
|
||||
local line = f:read()
|
||||
while line ~= nil do
|
||||
printer:appendGcode(line, total_lines)
|
||||
printer:appendGcode(line)
|
||||
current_line = current_line + 1
|
||||
line = f:read()
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user