mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 11:03:48 +01:00
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
|
return
|
||||||
end
|
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())
|
log:verbose(MOD_ABBR, " clearing all gcode for " .. printer:getId())
|
||||||
response:addData('gcode_clear',true)
|
response:addData('gcode_clear',true)
|
||||||
|
Loading…
Reference in New Issue
Block a user