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

Fixed last_mod

This commit is contained in:
peteruithoven 2013-08-07 18:30:58 +02:00
parent b8e0acb16b
commit 395ac53497

View File

@ -164,9 +164,6 @@ function M.temperature(request, response)
-- T:204.5 E:0 W:?
if(hotend == nil) then
local hotend = tempText:match('T:([%d%.]*).*')
log:debug(" >hotend: ")
log:debug(hotend)
response:addData('hotend', hotend)
else
response:addData('hotend', hotend)
@ -178,6 +175,7 @@ function M.temperature(request, response)
-- get last modified time
local file_attr = lfs.attributes(ultipath .. '/' .. TEMPERATURE_FILE)
local last_mod = file_attr.modification
local last_mod = os.difftime (os.time(),last_mod)
response:addData('last_mod', last_mod)
end