mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37:29 -06:00
Only search for non usb device printers when using Linux or MacOS
CURA-10118
This commit is contained in:
parent
6def3dcb5e
commit
1bc764f019
1 changed files with 4 additions and 1 deletions
|
@ -9,6 +9,7 @@ from re import search
|
|||
|
||||
from PyQt6.QtCore import QObject, pyqtSignal
|
||||
|
||||
from UM.Platform import Platform
|
||||
from UM.Signal import Signal, signalemitter
|
||||
from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
|
||||
from UM.i18n import i18nCatalog
|
||||
|
@ -83,7 +84,9 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
|
|||
if container_stack.getMetaDataEntry("supports_usb_connection"):
|
||||
machine_file_formats = [file_type.strip() for file_type in container_stack.getMetaDataEntry("file_formats").split(";")]
|
||||
if "text/x-gcode" in machine_file_formats:
|
||||
port_list = self.getSerialPortList(only_list_usb=False)
|
||||
# This is a fix for connecting tty/cu printers on MacOS and Linux
|
||||
only_list_usb = False if Platform.isOSX() or Platform.isLinux() else True
|
||||
port_list = self.getSerialPortList(only_list_usb)
|
||||
self._addRemovePorts(port_list)
|
||||
time.sleep(5)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue