JamZYM 6 mesi fa
parent
commit
c8d1b2fccb
1 ha cambiato i file con 2 aggiunte e 4 eliminazioni
  1. 2 4
      main.py

+ 2 - 4
main.py

@@ -46,10 +46,8 @@ class MainWidget(Widget):
         grid01.add_widget(TextInput(text=deviceName,width=self.grid00.width / 2,height=self.grid00.height / 2,font_size=40))
         connect_button = Button(text="Connect",width=self.grid00.width,height=self.grid00.height / 2,center_x=self.grid00.center_x,font_size=40)
         self.grid00.add_widget(connect_button)
-        while True:
-            if connect_button.state == "down":
-                self.clear_widgets(self.grid00)
-                break
+        if connect_button.state == "down":
+            self.clear_widgets(self.grid00)
 
 class STI2021A(App):
     def __init__(self):