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()
|
||||
|
||||
Reference in New Issue
Block a user