0
0
mirror of https://github.com/Doodle3D/doodle3d-firmware.git synced 2024-12-22 11:03:48 +01:00

updated release notes and sketch api

This commit is contained in:
Rick Companje 2014-12-19 16:10:42 +01:00
parent 4b1476100a
commit b840938cbc
2 changed files with 59 additions and 0 deletions

View File

@ -1,4 +1,11 @@
Changelog Changelog
# 0.10.5
- Added the PhotoGuide feature which is kind of a manual Scan & Trace. Use a photo as a background image and create your doodle on top of it.
- Added support for the '3Dison plus' printer.
- Added a File Manager for downloading, uploading and deleting sketches (can be opened via the Settings Panel)
- Improved the way sketches are loaded
- Fixed scrolling issue in Settings Panel
# 0.10.4-photoguide3 (10th oct 2014) # 0.10.4-photoguide3 (10th oct 2014)
# 0.10.4-photoguide2 (9th oct 2014) # 0.10.4-photoguide2 (9th oct 2014)
# 0.10.4-photoguide (9th oct 2014) # 0.10.4-photoguide (9th oct 2014)

View File

@ -169,4 +169,56 @@ function M.clear_POST(request, response)
end end
end end
-- remove single sketch
-- function M.delete_POST(request, response)
-- local argId = tonumber(request:get("id")) --to number will raise exception in case of illegal input
-- local filename = M.SKETCH_DIR .. '/' .. constructSketchFilename(argId)
-- local rv = os.execute("rm -f " .. filename)
-- if rv == 0 then response:setSuccess()
-- else response:setFail("could not remove " .. filename)
-- end
-- end
-- recreate directory sequence by renaming files
function M.index_POST(request, response)
local list = {}
local index = 1
for item in lfs.dir(M.SKETCH_DIR) do
if item ~= '.' and item ~= '..' then
local idx = item:match('^(%d+)\.'..SKETCH_FILE_EXTENSION..'$')
if idx and idx:len() == NUMBER_PAD_WIDTH then
local src = M.SKETCH_DIR .. '/' .. item
local dst = M.SKETCH_DIR .. '/' .. constructSketchFilename(index)
if src ~= dst then
table.insert(list, src .. ' ' .. dst)
local rv = os.execute("mv " .. src .. ' ' .. dst)
end
index = index + 1
end
end
end
response:addData('list',list)
response:setSuccess()
end
-- list files by fileID (not by index)
function M.list_GET(request, response)
response:addData("list",createSketchList())
response:setSuccess()
end
-- remove single sketch by fileID (not by index)
function M.delete_POST(request, response)
local argId = tonumber(request:get("id")) --to number will raise exception in case of illegal input
local filename = M.SKETCH_DIR .. '/' .. constructSketchFilename(argId)
local rv = os.execute("rm -f " .. filename)
if rv == 0 then response:setSuccess()
else response:setFail("could not remove " .. filename)
end
end
return M return M