✨ Enable custom temps reported by printer on API & socket (#4388)
This commit is contained in:
1 parent
7b5c1268ae
commit
24568082fa
2 files changed
+10
-4
No files matched your search
@@ -853,6 +853,12 @@ class Printer(PrinterInterface, comm.MachineComPrintCallback):
|
||||
if "chamber" in offsets and offsets["chamber"] is not None
|
||||
else 0,
|
||||
}
|
||||
if self._custom is not None:
|
||||
for custom_key in self._custom.keys():
|
||||
result[custom_key] = {
|
||||
"actual": self._custom[custom_key][0],
|
||||
"target": self._custom[custom_key][1],
|
||||
}
|
||||
|
||||
return result
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ Groups will be as follows:
|
||||
"""
|
||||
|
||||
regex_temp = re.compile(
|
||||
r"(?P<tool>B|C|T(?P<toolnum>\d*)):\s*(?P<actual>%s)(\s*\/?\s*(?P<target>%s))?"
|
||||
r"(?P<tool>B|C|T(?P<toolnum>\d*)|([\w]+)):\s*(?P<actual>%s)(\s*\/?\s*(?P<target>%s))?"
|
||||
% (regex_float_pattern, regex_float_pattern)
|
||||
)
|
||||
"""Regex matching temperature entries in line.
|
||||
@@ -6207,10 +6207,10 @@ def parse_temperature_line(line, current):
|
||||
maxToolNum = toolNumber
|
||||
|
||||
try:
|
||||
actual = float(match.group(3))
|
||||
actual = float(match.group(4))
|
||||
target = None
|
||||
if match.group(4) and match.group(5):
|
||||
target = float(match.group(5))
|
||||
if match.group(4) and match.group(6):
|
||||
target = float(match.group(6))
|
||||
|
||||
result[tool] = (actual, target)
|
||||
except ValueError:
|
||||
|
||||
Reference in new issue
Block a user