ping pong loop working!
This commit is contained in:
@@ -19,14 +19,9 @@ class Connection:
|
|||||||
# start lora handler
|
# start lora handler
|
||||||
self.lora = LoRaHandler()
|
self.lora = LoRaHandler()
|
||||||
|
|
||||||
async def advertising_loop(self):
|
|
||||||
while True:
|
|
||||||
self.lora.advertise()
|
|
||||||
await asyncio.sleep(5)
|
|
||||||
|
|
||||||
async def start(self):
|
async def start(self):
|
||||||
print("Starting connection...")
|
print("Starting connection...")
|
||||||
asyncio.create_task(self.advertising_loop())
|
self.lora.advertise()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
msg: LoRaMessage = await self.lora.message_queue.get()
|
msg: LoRaMessage = await self.lora.message_queue.get()
|
||||||
|
|||||||
Reference in New Issue
Block a user