Fix H2C firmware update downloading wrong (H2D) firmware (#311)

H2C was mapped to the "h2d" firmware API key, causing it to check
the H2D firmware page and offer H2D firmware for download. H2C has
its own separate firmware track (01.01.x.x vs H2D's 01.02.x.x).

Changed H2C to use its own "h2c" API key and added the reverse
mapping. Also added missing H2C (O1C) and H2S (O1S) entries to
the printer model ID and 3MF model name maps.
This commit is contained in:
maziggy
2026-02-10 08:51:44 +01:00
parent 53e13ecbd2
commit ae63ec8a91
3 changed files with 8 additions and 2 deletions
+2 -1
View File
@@ -38,7 +38,7 @@ MODEL_TO_API_KEY = {
"A1-Mini": "a1-mini",
"A1mini": "a1-mini",
"H2D": "h2d",
"H2C": "h2d", # H2C uses same firmware as H2D
"H2C": "h2c",
"H2S": "h2s",
"P2S": "p2s",
"X1E": "x1e",
@@ -54,6 +54,7 @@ API_KEY_TO_DEV_MODEL = {
"a1": "N2S",
"a1-mini": "N1",
"h2d": "O1D",
"h2c": "O1C",
"h2s": "O1S",
"p2s": "N7",
"x1e": "C13",
+5 -1
View File
@@ -17,6 +17,8 @@ PRINTER_MODEL_MAP = {
"Bambu Lab A1 mini": "A1 Mini",
"Bambu Lab H2D": "H2D",
"Bambu Lab H2D Pro": "H2D Pro",
"Bambu Lab H2C": "H2C",
"Bambu Lab H2S": "H2S",
}
# Map from printer_model_id (internal codes in slice_info.config) to short names
@@ -37,10 +39,12 @@ PRINTER_MODEL_ID_MAP = {
"N1": "A1",
"N2S": "A1 Mini",
"A04": "A1 Mini",
# H2D series (Office/H series)
# H2 series (Office/H series)
"O1D": "H2D",
"O1E": "H2D Pro", # Some devices report O1E
"O2D": "H2D Pro", # Some devices report O2D
"O1C": "H2C",
"O1S": "H2S",
}