mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-09-30 03:01:21 +02:00
Add H2D Pro printer model support
- Add H2D Pro option to printer model dropdowns (add/edit modals) - Support both O1E and O2D internal codes for H2D Pro compatibility - Add O2D to RTSP-capable and chamber temp supported models - Add H2DPRO variant to firmware check mapping - Add H2D Pro and X1E to bug report issue template Closes #192
This commit is contained in:
@@ -46,12 +46,14 @@ body:
|
||||
options:
|
||||
- X1 Carbon
|
||||
- X1
|
||||
- X1E
|
||||
- P1S
|
||||
- P1P
|
||||
- P2S
|
||||
- A1
|
||||
- A1 Mini
|
||||
- H2D
|
||||
- H2D Pro
|
||||
- H2C
|
||||
- H2S
|
||||
- Multiple printers
|
||||
|
||||
@@ -74,7 +74,7 @@ def supports_rtsp(model: str | None) -> bool:
|
||||
- O1D: H2D
|
||||
- O1C: H2C
|
||||
- O1S: H2S
|
||||
- O1E: H2D Pro
|
||||
- O1E, O2D: H2D Pro
|
||||
- N7: P2S
|
||||
"""
|
||||
if model:
|
||||
@@ -83,7 +83,7 @@ def supports_rtsp(model: str | None) -> bool:
|
||||
if model_upper.startswith(("X1", "H2", "P2")):
|
||||
return True
|
||||
# Internal codes for RTSP models
|
||||
if model_upper in ("BL-P001", "C13", "O1D", "O1C", "O1S", "O1E", "N7"):
|
||||
if model_upper in ("BL-P001", "C13", "O1D", "O1C", "O1S", "O1E", "O2D", "N7"):
|
||||
return True
|
||||
# A1/P1 and unknown models use chamber image protocol
|
||||
return False
|
||||
|
||||
@@ -44,6 +44,7 @@ MODEL_TO_API_KEY = {
|
||||
"X1E": "x1e",
|
||||
"H2D Pro": "h2d-pro",
|
||||
"H2D-Pro": "h2d-pro",
|
||||
"H2DPRO": "h2d-pro",
|
||||
}
|
||||
|
||||
# Reverse mapping: API key to model codes
|
||||
|
||||
@@ -29,6 +29,7 @@ CHAMBER_TEMP_SUPPORTED_MODELS = frozenset(
|
||||
"O1C", # H2C
|
||||
"O1S", # H2S
|
||||
"O1E", # H2D Pro
|
||||
"O2D", # H2D Pro (alternate code)
|
||||
"N7", # P2S
|
||||
]
|
||||
)
|
||||
|
||||
@@ -39,7 +39,8 @@ PRINTER_MODEL_ID_MAP = {
|
||||
"A04": "A1 Mini",
|
||||
# H2D series (Office/H series)
|
||||
"O1D": "H2D",
|
||||
"O2D": "H2D Pro",
|
||||
"O1E": "H2D Pro", # Some devices report O1E
|
||||
"O2D": "H2D Pro", # Some devices report O2D
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3550,6 +3550,8 @@ function AddPrinterModal({
|
||||
const modelMap: Record<string, string> = {
|
||||
// H2 Series
|
||||
'O1D': 'H2D',
|
||||
'O1E': 'H2D Pro', // Some devices report O1E
|
||||
'O2D': 'H2D Pro', // Some devices report O2D
|
||||
'O1C': 'H2C',
|
||||
'O1S': 'H2S',
|
||||
// X1 Series
|
||||
@@ -3573,6 +3575,7 @@ function AddPrinterModal({
|
||||
'A1': 'A1',
|
||||
'A1 Mini': 'A1 Mini',
|
||||
'H2D': 'H2D',
|
||||
'H2D Pro': 'H2D Pro',
|
||||
'H2C': 'H2C',
|
||||
'H2S': 'H2S',
|
||||
};
|
||||
@@ -3773,6 +3776,7 @@ function AddPrinterModal({
|
||||
<optgroup label="H2 Series">
|
||||
<option value="H2C">H2C</option>
|
||||
<option value="H2D">H2D</option>
|
||||
<option value="H2D Pro">H2D Pro</option>
|
||||
<option value="H2S">H2S</option>
|
||||
</optgroup>
|
||||
<optgroup label="X1 Series">
|
||||
@@ -4132,6 +4136,7 @@ function EditPrinterModal({
|
||||
<optgroup label="H2 Series">
|
||||
<option value="H2C">H2C</option>
|
||||
<option value="H2D">H2D</option>
|
||||
<option value="H2D Pro">H2D Pro</option>
|
||||
<option value="H2S">H2S</option>
|
||||
</optgroup>
|
||||
<optgroup label="X1 Series">
|
||||
|
||||
Reference in New Issue
Block a user