|
@@ -13,12 +13,12 @@ from bleak import BleakClient,BleakScanner
|
|
STM32_UUID = "00001101-0000-1000-8000-00805F9B34FB"
|
|
STM32_UUID = "00001101-0000-1000-8000-00805F9B34FB"
|
|
|
|
|
|
class InfoWidget(Widget):
|
|
class InfoWidget(Widget):
|
|
- def __init__(self, **kwargs):
|
|
|
|
- super(InfoWidget, self).__init__(**kwargs)
|
|
|
|
- self.size = (800,480)
|
|
|
|
- asyncio.run(self.discover_devices())
|
|
|
|
|
|
+ # def __init__(self, **kwargs):
|
|
|
|
+ # super(InfoWidget, self).__init__(**kwargs)
|
|
|
|
+
|
|
|
|
|
|
async def discover_devices(self):
|
|
async def discover_devices(self):
|
|
|
|
+ self.size = (800,480)
|
|
devices = await BleakScanner.discover()
|
|
devices = await BleakScanner.discover()
|
|
grid00 = GridLayout(cols=1,rows=2,width=self.width,height=self.height / 4)
|
|
grid00 = GridLayout(cols=1,rows=2,width=self.width,height=self.height / 4)
|
|
grid00.top = self.top
|
|
grid00.top = self.top
|
|
@@ -86,6 +86,7 @@ class InfoWidget(Widget):
|
|
class STI2021A(App):
|
|
class STI2021A(App):
|
|
def build(self):
|
|
def build(self):
|
|
info = InfoWidget()
|
|
info = InfoWidget()
|
|
|
|
+ asyncio.run(info.discover_devices())
|
|
# info.debug()
|
|
# info.debug()
|
|
return info
|
|
return info
|
|
|
|
|