check if printer is idle before fetching
This commit is contained in:
parent
a5bf23c95c
commit
a9c2f6096c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue