mirror of https://github.com/aredn/aredn.git
Fix for when dtd distance hasn't been found (#549)
This commit is contained in:
parent
737bd10f48
commit
580bbc79fe
|
@ -600,7 +600,7 @@ function lqm()
|
||||||
-- If we have a direct dtd connection to this device, make sure we use that
|
-- If we have a direct dtd connection to this device, make sure we use that
|
||||||
local a, b, c = track.mac:match("^(..:..:..:)(..)(:..:..)$")
|
local a, b, c = track.mac:match("^(..:..:..:)(..)(:..:..)$")
|
||||||
local dtd = tracker[string.format("%s%02X%s", a, tonumber(b, 16) + 1, c)]
|
local dtd = tracker[string.format("%s%02X%s", a, tonumber(b, 16) + 1, c)]
|
||||||
if dtd and dtd.type == "DtD" and dtd.distance < dtd_distance then
|
if dtd and dtd.type == "DtD" and dtd.distance and dtd.distance < dtd_distance then
|
||||||
track.blocks.dtd = true
|
track.blocks.dtd = true
|
||||||
else
|
else
|
||||||
track.blocks.dtd = false
|
track.blocks.dtd = false
|
||||||
|
|
Loading…
Reference in New Issue