[fluksod] pass unix time to the polish method
This commit is contained in:
parent
6b8e701d26
commit
ac11a4fa21
|
@ -90,9 +90,7 @@ function filter(M, span, offset)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function polish(M, cutoff)
|
function polish(M, now, cutoff)
|
||||||
local now = os.time()
|
|
||||||
|
|
||||||
for sensor, T in pairs(M) do
|
for sensor, T in pairs(M) do
|
||||||
local H = timestamps(T)
|
local H = timestamps(T)
|
||||||
|
|
||||||
|
|
|
@ -320,7 +320,7 @@ function publish(child)
|
||||||
end
|
end
|
||||||
|
|
||||||
while true do
|
while true do
|
||||||
measurements:polish(LAN_POLISH_CUTOFF)
|
measurements:polish(os.time(), LAN_POLISH_CUTOFF)
|
||||||
local measurements_json = measurements:json_encode()
|
local measurements_json = measurements:json_encode()
|
||||||
|
|
||||||
for sensor_id, json in pairs(measurements_json) do
|
for sensor_id, json in pairs(measurements_json) do
|
||||||
|
|
Loading…
Reference in New Issue