marek 1 개월 전
부모
커밋
23892e01f1
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      apps/getData.py

+ 2 - 1
apps/getData.py

@@ -67,7 +67,8 @@ async def ble_task():
                 await client.start_notify(HUMIDITY_UUID, notification_handler)
                 await client.start_notify(ALTITUDE_UUID, notification_handler)
 
-                await asyncio.sleep(1)
+                while (client.is_connected):
+                    await asyncio.sleep(1)
         except Exception:
             outdoorConnected = 0
             print("exception while connecting or getting data")