TELL: Reduce polling rate from 100 Hz to 5 Hz + increase timeout on mount

This commit is contained in:
leonarski_f committed 2025-09-15 09:59:03 +02:00
1 parent 8e64047b0a
commit 2c15b42454
1 file changed
+4 -8
+4 -8
View File
@@ -139,16 +139,12 @@ class TellClient:
time.sleep(3.0)
self._simulated_state = "Ready"
return
count = 0
# Monitors event but polls every second just n case an event is missed
while True:
if self.state != "Busy":
break
time.sleep(0.01)
count = count + 1
if count >= 100:
count = 0
self.get_state()
time.sleep(0.2)
self.get_state()
if self.state != "Ready":
raise Exception("Invalid state: " + str(self.state))
@@ -257,7 +253,7 @@ class TellClient:
while time.time() < timeisup:
if not self.is_busy():
break
time.sleep(0.01)
time.sleep(0.2)
def check_command_ok(self, timeout: float = 360.0, msg: str = ""):
self.wait_mount_complete(timeout)
@@ -294,7 +290,7 @@ class TellClient:
read_dm: bool = False, # read data matrix
auto_unmount: bool = False, # single command, if False it will raise exception
wait: bool = False, # blocking operation
timeout: float = 60.0,
timeout: float = 600.0,
):
print(address)
SampleDewarAddress.model_validate(address)