mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2025-02-01 13:55:09 +01:00
exit if gcode file info could not be retrieved
This commit is contained in:
parent
9571af19ac
commit
ae46535275
@ -34,6 +34,11 @@ log("gcode server: " .. gcodeServer)
|
|||||||
|
|
||||||
local info = JSON:decode(io.popen("wget -qO - " .. gcodeServer .. "/info/" .. id):read("*a"))
|
local info = JSON:decode(io.popen("wget -qO - " .. gcodeServer .. "/info/" .. id):read("*a"))
|
||||||
|
|
||||||
|
if info == nil then
|
||||||
|
log("could not retrieve file info")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local current_line = 0
|
local current_line = 0
|
||||||
local total_lines = tonumber(info["lines"])
|
local total_lines = tonumber(info["lines"])
|
||||||
local started = false
|
local started = false
|
||||||
|
Loading…
x
Reference in New Issue
Block a user