hey wifilocator, use max() not min() to get the best signal pls…
This commit is contained in:
parent
e5ebddec09
commit
c4a7b2b084
1 changed files with 2 additions and 2 deletions
|
@ -77,8 +77,8 @@ class Locator:
|
||||||
for pk, space in self.spaces.items()
|
for pk, space in self.spaces.items()
|
||||||
if pk not in restrictions.spaces)
|
if pk not in restrictions.spaces)
|
||||||
|
|
||||||
# get relevant spaces
|
# get relevant spaces (they should contain the best station at least once)
|
||||||
best_station_id = min(scan_values.items(), key=operator.itemgetter(1))[0]
|
best_station_id = max(scan_values.items(), key=operator.itemgetter(1))[0]
|
||||||
spaces = tuple((pk, space, station_ids)
|
spaces = tuple((pk, space, station_ids)
|
||||||
for pk, space, station_ids in spaces
|
for pk, space, station_ids in spaces
|
||||||
if station_ids and best_station_id in station_ids)
|
if station_ids and best_station_id in station_ids)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue