Improve camera status and production startup

This commit is contained in:
2026-06-22 13:54:07 +08:00
parent 55f646053d
commit 7dadcb8bcc
5 changed files with 72 additions and 30 deletions
+5 -1
View File
@@ -51,6 +51,10 @@ class ArmClient:
self._sock.close()
self._sock = None
def is_connected(self) -> bool:
"""返回当前 TCP 连接是否仍由客户端持有。"""
return self._sock is not None
def reconnect(self) -> bool:
self.close()
time.sleep(1)
@@ -167,4 +171,4 @@ class ArmClient:
return self
def __exit__(self, *args):
self.close()
self.close()