radiacode icon indicating copy to clipboard operation
radiacode copied to clipboard

Bugfix: Add a dispose_resources call to release a USB connection

Open DmitriiCM opened this issue 4 months ago • 0 comments

It would be nice to have a close method that will correctly close an opened USB device.

Now, I have to do this manually:

import usb.util

rc = RadiaCode()
fw_version = rc.fw_version()
print(f"Device connected:, firmware {fw_version[1]}")


...

usb.util.dispose_resources(rc._connection._device)

Instead, it would be nice to have a method like rc.close().

DmitriiCM avatar May 30 '25 13:05 DmitriiCM