filter out peer_ids with no distance in locate_range
This commit is contained in:
parent
fd291858dd
commit
a74efc3706
1 changed files with 1 additions and 1 deletions
|
@ -242,7 +242,7 @@ class Locator:
|
|||
return norm
|
||||
|
||||
def locate_range(self, scan_data: ScanData, permissions=None, orig_addr=None):
|
||||
peer_ids = tuple(i for i in scan_data if i < len(self.xyz))
|
||||
peer_ids = tuple(i for i, item in scan_data.items() if i < len(self.xyz) and item.distance)
|
||||
|
||||
if len(peer_ids) < 3:
|
||||
# can't get a good result from just two beacons
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue