0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2025-04-20 10:06:30 +02:00

Compare commits

..

No commits in common. "master" and "0.11.0-b" have entirely different histories.

3 changed files with 5 additions and 11 deletions

View File

@ -1,9 +1,5 @@
Changelog
# 0.11.0 (12 jul 2017)
# 0.11.0-c (10 jul 2017)
- fix: Also closing file descriptor after removing current print file (commit 550e151)
# 0.11.0-b (6 jul 2017)
- show id of current print in d3dapi/info/status when printing in 'fetch' mode.
- code reuse and cleanup for control, kill and status

View File

@ -1 +1 @@
0.11.0
0.11.0-b

View File

@ -51,7 +51,7 @@ end
local function setCurrentPrint(id)
local cpfileName = "/tmp/current-print"
if id == nil then
io.popen('rm ' .. cpfileName):close()
io.popen('rm ' .. cpfileName)
return true
end
@ -72,10 +72,8 @@ 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)
io.popen("killall print-fetch")
io.popen("rm /tmp/startcode /tmp/endcode")
end
function M.progress(request, response)
@ -193,6 +191,7 @@ function M.stop_POST(request, response)
if not printer or not printer:hasSocket() then return end
stopFetch()
setCurrentPrint(nil)
if(argGcode == nil) then
argGcode = ""
@ -293,7 +292,6 @@ 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()