fix(printer-models): swap A1 / A1 Mini in PRINTER_MODEL_ID_MAP

N1 and N2S were flipped relative to every other registry that names
  them - firmware_check.py (N2S -> "a1"), virtual_printer/manager.py
  (both the model map and the serial-prefix map: N2S -> 039 = A1,
  N1 -> 030 = A1 Mini), and printer_manager.py A1_MODELS all agree on
  N2S = A1, N1 = A1 Mini. Only printer_models.py had it backwards, so
  any path that resolved an A1-family printer by internal code rather
  than serial prefix would silently misclassify.

  Also fixes the matching comments in LINEAR_RAIL_MODELS - cosmetic only
  (both codes were already in the frozenset) but kept the file
  self-consistent.

  New TestA1SeriesModelIds regression test pins both directions so a
  future re-flip fails loudly.
This commit is contained in:
maziggy
2026-06-10 07:29:31 +02:00
parent 4b888a7f52
commit 2bb69cb079
3 changed files with 22 additions and 4 deletions
+4 -4
View File
@@ -42,8 +42,8 @@ PRINTER_MODEL_ID_MAP = {
# A1 series
"A11": "A1",
"A12": "A1 Mini",
"N1": "A1",
"N2S": "A1 Mini",
"N1": "A1 Mini",
"N2S": "A1",
"A04": "A1 Mini",
# H2 series (Office/H series)
"O1D": "H2D",
@@ -96,8 +96,8 @@ LINEAR_RAIL_MODELS = frozenset(
"H2C",
"H2S",
# Internal codes
"N1", # A1
"N2S", # A1 Mini
"N1", # A1 Mini
"N2S", # A1
"A04", # A1 Mini (alternate)
"A11", # A1
"A12", # A1 Mini