[fluksod] allow individual sensor measurements to be flushed
This commit is contained in:
parent
90bf363645
commit
b0fd4c2753
|
@ -53,10 +53,14 @@ function add(M, meter, timestamp, value)
|
||||||
M[meter][timestamp] = value
|
M[meter][timestamp] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
function clear(M)
|
function clear(M, meter)
|
||||||
|
if meter then
|
||||||
|
M[meter] = nil
|
||||||
|
else -- clear all
|
||||||
for meter in pairs(M) do
|
for meter in pairs(M) do
|
||||||
M[meter] = nil
|
M[meter] = nil
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function filter(M, span, offset)
|
function filter(M, span, offset)
|
||||||
|
|
Loading…
Reference in New Issue