This commit is contained in:
@@ -163,7 +163,7 @@ class RobotTCP(TcpDevice, Stoppable):
|
||||
|
||||
def evaluate(self, cmd, timeout=None):
|
||||
ret = self.execute('eval', cmd, timeout=timeout)
|
||||
if type(ret) is str:
|
||||
if is_string(ret):
|
||||
if ret.strip() != "": raise Exception(ret)
|
||||
|
||||
def get_var(self, name):
|
||||
|
||||
@@ -47,7 +47,7 @@ class SmartMagnet(DeviceBase):
|
||||
def get_supress(self):
|
||||
return smc_sup_det.read()
|
||||
|
||||
def check_mounted(self, idle_time =1.0, timeout = -1):
|
||||
def check_mounted(self, idle_time =1.0, timeout = -1, interval = 0.01):
|
||||
self.assert_status()
|
||||
start = time.time()
|
||||
last = None
|
||||
@@ -66,7 +66,7 @@ class SmartMagnet(DeviceBase):
|
||||
if timeout >= 0:
|
||||
if (time.time() - start) > timeout:
|
||||
raise Exception("Timeout waiting for Smart Magnet detection.")
|
||||
time.sleep(0.01)
|
||||
time.sleep(interval)
|
||||
|
||||
|
||||
def doUpdate(self):
|
||||
|
||||
Reference in New Issue
Block a user