Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB ports always probed when 'finesse.hardware.serial_device' module loaded #656

Open
alexdewar opened this issue Oct 17, 2024 · 1 comment

Comments

@alexdewar
Copy link
Collaborator

The reason for this is that the list of USB serial ports is passed as a class parameter for SerialDevice. While this is fairly harmless, it is a bit of a code smell. It's daft that we probe USB ports even when just generating documentation, for example.

@alexdewar
Copy link
Collaborator Author

One possible solution for this it to allow device parameters to be specified as Callables, to be lazily evaluated later. (The downside of this approach is that I think if we do this, we'll have to wait until an instance of the device class is created before evaluating the function, rather than just doing it as the program loads.)

It makes sense to wait until we've done #640 before tackling this, as that will also likely involve modifying the way we deal with serial devices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant