Improve camera status and production startup
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user