mirror of
https://github.com/erjiang/huion-keys.git
synced 2026-03-23 21:54:53 +03:00
Print tablet name when device is found
This commit is contained in:
parent
13e40d0025
commit
03c646b92f
@ -29,12 +29,12 @@ def main():
|
|||||||
for device_name, device_id in TABLET_MODELS.items():
|
for device_name, device_id in TABLET_MODELS.items():
|
||||||
hidraw_path = get_tablet_hidraw(device_id)
|
hidraw_path = get_tablet_hidraw(device_id)
|
||||||
if hidraw_path is not None:
|
if hidraw_path is not None:
|
||||||
|
print("Found %s at %s" % (device_name, hidraw_path))
|
||||||
break
|
break
|
||||||
if hidraw_path is None:
|
if hidraw_path is None:
|
||||||
print("Could not find tablet hidraw device")
|
print("Could not find tablet hidraw device")
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
continue
|
continue
|
||||||
print("Found tablet at " + hidraw_path)
|
|
||||||
try:
|
try:
|
||||||
hidraw = open(hidraw_path, 'rb')
|
hidraw = open(hidraw_path, 'rb')
|
||||||
except PermissionError as e:
|
except PermissionError as e:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user