0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-21 18:43:48 +01:00

log fetch g-code file id and stopFetch

This commit is contained in:
Simon Voordouw 2017-07-06 18:14:23 +02:00
parent 59c71a34ba
commit c3e4ec88a8

View File

@ -72,6 +72,7 @@ local function getCurrentPrint()
end
local function stopFetch()
log:verbose(MOD_ABBR, "stopping print-fetch and removing start/endgcode")
io.popen("killall print-fetch"):close()
io.popen("rm /tmp/startcode /tmp/endcode"):close()
setCurrentPrint(nil)
@ -292,6 +293,7 @@ function M.fetch_POST(request, response)
end
setCurrentPrint(id)
log:info(MOD_ABBR, " starting fetch print. id: " .. id .. " server: " .. gcodeServer)
io.popen("print-fetch " .. socket .. " " .. gcodeServer .. " " .. id .. gcodeFiles)
response:setSuccess()