0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

stop print-fetch before stopping print

This commit is contained in:
Simon Voordouw 2017-06-27 17:42:19 +02:00
parent d9e84308dd
commit 0acc20f498

View File

@ -166,13 +166,14 @@ function M.stop_POST(request, response)
local printer,msg = printerUtils.createPrinterOrFail(argId, response) local printer,msg = printerUtils.createPrinterOrFail(argId, response)
if not printer or not printer:hasSocket() then return end if not printer or not printer:hasSocket() then return end
io.popen("killall print-fetch")
io.popen("rm /tmp/current-print /tmp/startcode /tmp/endcode")
if(argGcode == nil) then if(argGcode == nil) then
argGcode = "" argGcode = ""
end end
local rv,msg = printer:stopPrint(argGcode) local rv,msg = printer:stopPrint(argGcode)
io.popen("killall print-fetch")
io.popen("rm /tmp/current-print /tmp/startcode /tmp/endcode")
response:addData('id', argId) response:addData('id', argId)