Fix error where API state is requested and printer is offline
This commit is contained in:
1 parent
50cf776e70
commit
619fe9a0e7
1 file changed
+7
-6
@@ -607,12 +607,13 @@ class Printer():
|
|||||||
bedTempOffset = None
|
bedTempOffset = None
|
||||||
|
|
||||||
result = {}
|
result = {}
|
||||||
for tool in self._temp.keys():
|
if self._temp is not None:
|
||||||
result["tool%d" % tool] = {
|
for tool in self._temp.keys():
|
||||||
"actual": self._temp[tool][0],
|
result["tool%d" % tool] = {
|
||||||
"target": self._temp[tool][1],
|
"actual": self._temp[tool][0],
|
||||||
"offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0
|
"target": self._temp[tool][1],
|
||||||
}
|
"offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0
|
||||||
|
}
|
||||||
if self._bedTemp is not None:
|
if self._bedTemp is not None:
|
||||||
result["bed"] = {
|
result["bed"] = {
|
||||||
"actual": self._bedTemp[0],
|
"actual": self._bedTemp[0],
|
||||||
|
|||||||
Reference in new issue
Block a user