Merge pull request #419 from C-o-r-E/devel
Fix error where API state is requested and printer is offline
This commit is contained in:
commit
b266dc24d7
1 changed files with 7 additions and 6 deletions
|
|
@ -607,12 +607,13 @@ class Printer():
|
|||
bedTempOffset = None
|
||||
|
||||
result = {}
|
||||
for tool in self._temp.keys():
|
||||
result["tool%d" % tool] = {
|
||||
"actual": self._temp[tool][0],
|
||||
"target": self._temp[tool][1],
|
||||
"offset": tempOffset[tool] if tool in tempOffset.keys() and tempOffset[tool] is not None else 0
|
||||
}
|
||||
if self._temp is not None:
|
||||
for tool in self._temp.keys():
|
||||
result["tool%d" % tool] = {
|
||||
"actual": self._temp[tool][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:
|
||||
result["bed"] = {
|
||||
"actual": self._bedTemp[0],
|
||||
|
|
|
|||
Loading…
Reference in a new issue