openwrt: math.max converts int32 to float, use two > comparisons instead
This commit is contained in:
parent
40ce61e4a6
commit
099e00c8f6
|
@ -114,7 +114,7 @@ function buffer(child, interval)
|
||||||
prev[meter].msec = msec
|
prev[meter].msec = msec
|
||||||
end
|
end
|
||||||
|
|
||||||
if timestamp > math.max(1234567890, prev[meter].timestamp or 0) and value then
|
if timestamp > 1234567890 and timestamp > (prev[meter].timestamp or 0) and value then
|
||||||
measurements:add(meter, timestamp, value)
|
measurements:add(meter, timestamp, value)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue