0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 02:53:49 +01:00

check if printer is idle before fetching

This commit is contained in:
Simon Voordouw 2017-06-19 16:13:07 +02:00
parent a5bf23c95c
commit a9c2f6096c

View File

@ -203,6 +203,12 @@ function M.fetch_POST(request, response)
return
end
local state = printer:getState()
if state ~= "idle" then
response:setError("printer is not idle")
return
end
log:verbose(MOD_ABBR, " clearing all gcode for " .. printer:getId())
response:addData('gcode_clear',true)