0
0
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:
Simon Voordouw 2017-06-22 14:31:32 +02:00
parent 9571af19ac
commit ae46535275

View File

@ -34,6 +34,11 @@ log("gcode server: " .. gcodeServer)
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 total_lines = tonumber(info["lines"])
local started = false