Merge branch 'device/009a' of github.com:uunicorn/python-validity into device/009a
This commit is contained in:
commit
cb68b5c1f7
2 changed files with 4 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
|
||||
from enum import Enum
|
||||
|
||||
from hashlib import sha256
|
||||
import os.path
|
||||
from .tls import tls
|
||||
from .usb import usb
|
||||
from .db import db, subtype_to_string
|
||||
|
|
@ -219,7 +220,7 @@ class Sensor():
|
|||
factory_bits = get_factory_bits(0x0e00)
|
||||
self.factory_calibration_values = factory_bits[3][4:]
|
||||
|
||||
if load_calib_data and isfile(calib_data_path):
|
||||
if load_calib_data and os.path.isfile(calib_data_path):
|
||||
with open(calib_data_path, 'rb') as f:
|
||||
self.calib_data = f.read()
|
||||
print('Calibration data loaded from a file.')
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ class Usb():
|
|||
except:
|
||||
pass
|
||||
|
||||
def open(self, vendor=0x138a, product=0x0097):
|
||||
def open(self, vendor=0x06cb, product=0x009a):
|
||||
self.dev = ucore.find(idVendor=vendor, idProduct=product)
|
||||
self.dev.default_timeout = 15000
|
||||
self.thread = Thread(target=lambda: self.int_thread())
|
||||
|
|
|
|||
Loading…
Reference in a new issue