fixing leds
This commit is contained in:
@@ -46,6 +46,13 @@ class XVF3800:
|
||||
|
||||
def __init__(self, usb_device):
|
||||
self.dev = usb_device
|
||||
# Detach kernel driver if attached, so we can send vendor control transfers
|
||||
try:
|
||||
if self.dev.is_kernel_driver_active(0):
|
||||
self.dev.detach_kernel_driver(0)
|
||||
except Exception:
|
||||
pass
|
||||
self.dev.set_configuration()
|
||||
self.serial = usb_device.serial_number or "unknown"
|
||||
self.bus = usb_device.bus
|
||||
self.address = usb_device.address
|
||||
|
||||
Reference in New Issue
Block a user