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

Need a more elegant way to filter out non-3D printers from serial ports #44

Closed
Lars-Codes opened this issue May 16, 2024 · 1 comment
Closed

Comments

@Lars-Codes
Copy link
Collaborator

On server/models/printers.py, the getConnectedPorts method is called when the user goes to Registration, clicks "Register Printer," and select device, a list of the connected serial ports appears.

Right now, in the getConnectedPorts method, we filter out non-3D printer ports with the line:
if (("original" in port.description.lower()) or ("prusa" in port.description.lower())) and (Printer.getPrinterByHwid(hwid_without_location) is None) :
We need a more elegant way to filter out non-3D printers that isn't string-matching. We'd like to expand this to more printers than just Prusa, so idk. Good luck hahaha

@ndg8743
Copy link
Collaborator

ndg8743 commented Dec 16, 2024

fixed with refactor, pull req #80

@ndg8743 ndg8743 closed this as completed Dec 16, 2024
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

2 participants