mirror of
https://github.com/Doodle3D/doodle3d-firmware.git
synced 2024-12-22 19:13:49 +01:00
Fixed last_mod
This commit is contained in:
parent
b8e0acb16b
commit
395ac53497
@ -164,9 +164,6 @@ function M.temperature(request, response)
|
|||||||
-- T:204.5 E:0 W:?
|
-- T:204.5 E:0 W:?
|
||||||
if(hotend == nil) then
|
if(hotend == nil) then
|
||||||
local hotend = tempText:match('T:([%d%.]*).*')
|
local hotend = tempText:match('T:([%d%.]*).*')
|
||||||
log:debug(" >hotend: ")
|
|
||||||
log:debug(hotend)
|
|
||||||
|
|
||||||
response:addData('hotend', hotend)
|
response:addData('hotend', hotend)
|
||||||
else
|
else
|
||||||
response:addData('hotend', hotend)
|
response:addData('hotend', hotend)
|
||||||
@ -178,6 +175,7 @@ function M.temperature(request, response)
|
|||||||
-- get last modified time
|
-- get last modified time
|
||||||
local file_attr = lfs.attributes(ultipath .. '/' .. TEMPERATURE_FILE)
|
local file_attr = lfs.attributes(ultipath .. '/' .. TEMPERATURE_FILE)
|
||||||
local last_mod = file_attr.modification
|
local last_mod = file_attr.modification
|
||||||
|
local last_mod = os.difftime (os.time(),last_mod)
|
||||||
response:addData('last_mod', last_mod)
|
response:addData('last_mod', last_mod)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user