Fix for when dtd distance hasn't been found (#549)

This commit is contained in:
Tim Wilkinson 2022-11-14 19:45:08 -08:00 committed by GitHub
parent 737bd10f48
commit 580bbc79fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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