mirror of
https://github.com/RfidResearchGroup/ChameleonUltra.git
synced 2026-05-12 11:22:59 -07:00
Merge pull request #36 from doegox/phil_fix_serialble
Catch exception when using virtual serial over BLE
This commit is contained in:
@@ -78,7 +78,11 @@ class ChameleonCom:
|
||||
finally:
|
||||
if error is not None:
|
||||
raise OpenFailException(error)
|
||||
self.serial_instance.dtr = 1 # must make dtr enable
|
||||
try:
|
||||
self.serial_instance.dtr = 1 # must make dtr enable
|
||||
except Exception as e:
|
||||
# not all serial support dtr, e.g. virtual serial over BLE
|
||||
pass
|
||||
self.serial_instance.timeout = 0 # noblock
|
||||
# clear variable
|
||||
self.send_data_queue.queue.clear()
|
||||
|
||||
Reference in New Issue
Block a user