Explorar el Código

HMS: regenerate the catalog with Bambu Studio 02.09 (adds the H3C)

The catalog came from a Bambu Studio commit that predates the H3C
(serial prefix 32X), so 1321 hms[] codes and 665 print_error codes showed
with no description, including every AMS 3H / PrintTool rack fault
(module 0x2A), e.g. "Please pull the filament back through AMS 3H slot 1"
during an unload.

Regenerated with scripts/generate_hms_catalog.py from the resources/hms
of the Bambu Studio v02.09.01.70 release AppImage. It isn't a git
checkout, hence bambu_studio_commit "unknown". The other model files are
the same versions as before. No code was removed or lost its text. Two
print_error codes (0500803C, 0300401F) change wording only on models
that don't list them and so fall back to the shared text, which is now
Bambu's generic wording.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dalton Clift hace 3 días
padre
commit
6481f81ac2
Se han modificado 2 ficheros con 636 adiciones y 2 borrados
  1. 610 2
      backend/app/data/hms_catalog.json
  2. 26 0
      backend/tests/unit/test_h3c_hms_texts.py

La diferencia del archivo ha sido suprimido porque es demasiado grande
+ 610 - 2
backend/app/data/hms_catalog.json


+ 26 - 0
backend/tests/unit/test_h3c_hms_texts.py

@@ -0,0 +1,26 @@
+"""H3C (serial prefix 32X) fault texts, from Bambu Studio 02.09's hms_en_32X.json.
+
+The catalog was generated from Bambu Studio before the H3C, so its faults --
+module 0x2A is the AMS 3H / PrintTool rack -- showed with no description.
+"""
+
+from backend.app.services.hms_errors import _CATALOG, describe_fault
+
+H3C = "32X"
+
+
+def test_the_catalog_has_the_h3c_model_file():
+    assert H3C in _CATALOG["_source"]["model_file_versions"]
+
+
+def test_unload_prompts_seen_on_the_printer_have_text():
+    # Shown during an unload from bambuddy on 2026-11-07 (slot 1, PrintTool 1).
+    assert describe_fault("2A00200000020004", H3C).startswith("Please pull the filament back through AMS 3H slot 1")
+    assert describe_fault("2A00700000020013", H3C).startswith("Filament of AMS-3H failed to unload from PrintTool 1")
+    assert describe_fault("2A00C003", H3C).startswith("Please pull the filament out of the PrintTool for AMS 3H slot 1")
+    assert describe_fault("2A00801D", H3C).startswith("Failed to unload filament. PrintTool 1 has been placed back")
+
+
+def test_the_h3c_keeps_its_own_wording_where_it_differs():
+    # The H3C has one nozzle on its toolhead: no "left and right" here.
+    assert describe_fault("0500803C", H3C).startswith("The current nozzle setting does not match")

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio