openwrt: fill the power entries in reverse order which works perfectly with pulse interfaces
This commit is contained in:
parent
4a7ae875ec
commit
09fd007bb2
|
@ -79,8 +79,8 @@ end
|
||||||
function fill(M)
|
function fill(M)
|
||||||
for meter, T in pairs(M) do
|
for meter, T in pairs(M) do
|
||||||
local H = timestamps(T)
|
local H = timestamps(T)
|
||||||
for i = H[1]+1, H[#H]-1 do
|
for i = H[#H]-1, H[1]+1, -1 do
|
||||||
if T[i] == nil then T[i] = T[i-1] end
|
if T[i] == nil then T[i] = T[i+1] end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue