0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2025-04-19 17:46:30 +02:00

Compare commits

..

7 Commits

Author SHA1 Message Date
Rick Companje
924285b51e update version information and releasenotes to stable 2017-07-12 10:01:53 +02:00
Rick Companje
d453818455 updated version information 2017-07-10 13:33:24 +02:00
peteruithoven
550e151153 Also closing file descriptor after removing current print file 2017-07-07 09:59:27 +02:00
Simon Voordouw
2ee6b05e61 Merge branch 'develop' of github.com:Doodle3D/Doodle3D-firmware into develop 2017-07-06 18:15:44 +02:00
Simon Voordouw
c3e4ec88a8 log fetch g-code file id and stopFetch 2017-07-06 18:14:23 +02:00
Simon Voordouw
59c71a34ba move removing current-print file to stopFetch 2017-07-06 18:14:04 +02:00
Simon Voordouw
e5de852087 close popen filehandles 2017-07-06 18:10:31 +02:00
3 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,9 @@
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-b 0.11.0

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) io.popen('rm ' .. cpfileName):close()
return true return true
end end
@ -72,8 +72,10 @@ local function getCurrentPrint()
end end
local function stopFetch() local function stopFetch()
io.popen("killall print-fetch") log:verbose(MOD_ABBR, "stopping print-fetch and removing start/endgcode")
io.popen("rm /tmp/startcode /tmp/endcode") io.popen("killall print-fetch"):close()
io.popen("rm /tmp/startcode /tmp/endcode"):close()
setCurrentPrint(nil)
end end
function M.progress(request, response) function M.progress(request, response)
@ -191,7 +193,6 @@ 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 = ""
@ -292,6 +293,7 @@ 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()