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 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) # 0.11.0-b (6 jul 2017)
- show id of current print in d3dapi/info/status when printing in 'fetch' mode. - show id of current print in d3dapi/info/status when printing in 'fetch' mode.
- code reuse and cleanup for control, kill and status - 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 function setCurrentPrint(id)
local cpfileName = "/tmp/current-print" local cpfileName = "/tmp/current-print"
if id == nil then if id == nil then
io.popen('rm ' .. cpfileName):close() io.popen('rm ' .. cpfileName)
return true return true
end end
@ -72,10 +72,8 @@ local function getCurrentPrint()
end end
local function stopFetch() local function stopFetch()
log:verbose(MOD_ABBR, "stopping print-fetch and removing start/endgcode") io.popen("killall print-fetch")
io.popen("killall print-fetch"):close() io.popen("rm /tmp/startcode /tmp/endcode")
io.popen("rm /tmp/startcode /tmp/endcode"):close()
setCurrentPrint(nil)
end end
function M.progress(request, response) 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 if not printer or not printer:hasSocket() then return end
stopFetch() stopFetch()
setCurrentPrint(nil)
if(argGcode == nil) then if(argGcode == nil) then
argGcode = "" argGcode = ""
@ -293,7 +292,6 @@ function M.fetch_POST(request, response)
end end
setCurrentPrint(id) setCurrentPrint(id)
log:info(MOD_ABBR, " starting fetch print. id: " .. id .. " server: " .. gcodeServer)
io.popen("print-fetch " .. socket .. " " .. gcodeServer .. " " .. id .. gcodeFiles) io.popen("print-fetch " .. socket .. " " .. gcodeServer .. " " .. id .. gcodeFiles)
response:setSuccess() response:setSuccess()