Skip to content

Bugfix: Add a dispose_resources call to release a USB connection #53

@DmitriiCM

Description

@DmitriiCM

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().

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions