Version 2.3.4

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>

Signed-off-by: Jeroen Oudshoorn <oudshoorn.jeroen@gmail.com>
This commit is contained in:
Jeroen Oudshoorn
2023-09-08 18:16:03 +02:00
parent 3f539a5026
commit 481ae4c0d8
7 changed files with 25 additions and 17 deletions

View File

@ -85,8 +85,5 @@ class Peer(object):
def epoch(self):
return self.adv.get('epoch', 0)
def full_name(self):
return '%s@%s' % (self.name(), self.identity())
def is_closer(self, other):
return self.rssi > other.rssi

View File

@ -1,4 +1,5 @@
import _thread
# import _thread
from concurrent.futures import ThreadPoolExecutor
import logging
import time
@ -41,7 +42,9 @@ class AsyncAdvertiser(object):
def start_advertising(self):
if self._config['personality']['advertise']:
_thread.start_new_thread(self._adv_poller, ())
# _thread.start_new_thread(self._adv_poller, ())
with ThreadPoolExecutor(max_workers=4) as executor:
executor.submit(self._adv_poller)
grid.set_advertisement_data(self._advertisement)
grid.advertise(True)