|
@@ -5,7 +5,7 @@ from kivy.uix.gridlayout import GridLayout
|
|
from kivy.uix.label import Label
|
|
from kivy.uix.label import Label
|
|
from kivy.uix.textinput import TextInput
|
|
from kivy.uix.textinput import TextInput
|
|
from kivy.lang import Builder
|
|
from kivy.lang import Builder
|
|
-# import asyncio
|
|
|
|
|
|
+import asyncio
|
|
# from bleak import BleakClient,BleakScanner
|
|
# from bleak import BleakClient,BleakScanner
|
|
|
|
|
|
# import json
|
|
# import json
|
|
@@ -17,7 +17,7 @@ class InfoWidget(Widget):
|
|
# super(InfoWidget, self).__init__(**kwargs)
|
|
# super(InfoWidget, self).__init__(**kwargs)
|
|
|
|
|
|
|
|
|
|
- def discover_devices(self):
|
|
|
|
|
|
+ async def discover_devices(self):
|
|
self.size = (800,480)
|
|
self.size = (800,480)
|
|
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
|
|
@@ -85,7 +85,7 @@ class InfoWidget(Widget):
|
|
class STI2021A(App):
|
|
class STI2021A(App):
|
|
def build(self):
|
|
def build(self):
|
|
info = InfoWidget()
|
|
info = InfoWidget()
|
|
- info.discover_devices()
|
|
|
|
|
|
+ asyncio.run(info.discover_devices())
|
|
# info.debug()
|
|
# info.debug()
|
|
return info
|
|
return info
|
|
|
|
|