diff options
Diffstat (limited to 'xs/src/slic3r/Utils/Serial.cpp')
-rw-r--r-- | xs/src/slic3r/Utils/Serial.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xs/src/slic3r/Utils/Serial.cpp b/xs/src/slic3r/Utils/Serial.cpp index 183119b44..601719b50 100644 --- a/xs/src/slic3r/Utils/Serial.cpp +++ b/xs/src/slic3r/Utils/Serial.cpp @@ -231,7 +231,12 @@ std::vector<SerialPortInfo> scan_serial_ports_extended() spi.port = path; #ifdef __linux__ auto friendly_name = sysfs_tty_prop(name, "product"); - spi.friendly_name = friendly_name ? (boost::format("%1% (%2%)") % *friendly_name % path).str() : path; + if (friendly_name) { + spi.is_printer = looks_like_printer(*friendly_name); + spi.friendly_name = (boost::format("%1% (%2%)") % *friendly_name % path).str(); + } else { + spi.friendly_name = path; + } auto vid = sysfs_tty_prop_hex(name, "idVendor"); auto pid = sysfs_tty_prop_hex(name, "idProduct"); if (vid && pid) { |