This commit is contained in:
@@ -21,14 +21,17 @@ class BarcodeReader(DeviceBase):
|
||||
try:
|
||||
self.setState(State.Busy)
|
||||
microscan.flush()
|
||||
ret = microscan.waitString(int(timeout * 1000))
|
||||
ret = microscan.waitString(int(timeout * 1000))
|
||||
if ret is not None:
|
||||
ret = ret.strip()
|
||||
self.setCache(ret, None)
|
||||
return ret
|
||||
except:
|
||||
self.setCache(None, None)
|
||||
return None
|
||||
finally:
|
||||
self.setState(State.Ready)
|
||||
if self.state == State.Busy:
|
||||
self.setState(State.Ready)
|
||||
|
||||
def doUpdate(self):
|
||||
self.get()
|
||||
|
||||
@@ -602,7 +602,7 @@ class RobotTCP(TcpDevice, Stoppable):
|
||||
"mode": self.working_mode,
|
||||
"status": self.status,
|
||||
"open": self.tool_open,
|
||||
"pos": self.get_current_point_cached() if self.state==State.Ready else None #TODO: make it calculated in robot by possiung funtion
|
||||
"pos": self.get_current_point_cached() if self.state==State.Ready else None #TODO: make it calculated in robot by polling funtion
|
||||
}, None)
|
||||
if self.cartesian_motors_enabled:
|
||||
for m in self.cartesian_motors:
|
||||
|
||||
Reference in New Issue
Block a user