Skip to content

Commit

Permalink
Use USB S/N only if it's correct, so we can override it in EEPROM
Browse files Browse the repository at this point in the history
  • Loading branch information
TojikCZ committed Dec 13, 2023
1 parent 01ac829 commit 298d92c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion prusa/link/printer_adapter/printer_polling.py
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,11 @@ def _get_serial_number(self):
# If we're connected through USB and we know the SN, use that one
serial_port = self.model.serial_adapter.using_port
if serial_port is not None and serial_port.sn is not None:
return serial_port.sn
try:
if self._validate_serial_number(serial_port.sn):
return serial_port.sn
except RuntimeError:
pass
# Do not ask MK2.5 for its SN, it would break serial communications
if self.printer.type in MK25_PRINTERS | {None}:
return ""
Expand Down

0 comments on commit 298d92c

Please sign in to comment.