advertising via bluetooth is done

This commit is contained in:
2026-05-15 17:14:33 +10:00
parent 00ac34431d
commit 46ae344c0c
5 changed files with 50 additions and 28 deletions

View File

@@ -3,29 +3,11 @@ import uuid
from sx1262 import SX1262
import uasyncio as asyncio
from queue import Queue
from machine import Pin
led = Pin(25, Pin.OUT)
class Queue:
def __init__(self):
self.items = []
self.waiters = []
async def put(self, item):
self.items.append(item)
if self.waiters:
waiter = self.waiters.pop(0)
waiter.set()
async def get(self):
while not self.items:
event = asyncio.Event()
self.waiters.append(event)
await event.wait()
return self.items.pop(0)
class FixedDeque:
def __init__(self, maxlen):
self.maxlen = maxlen