Merge pull request #2182 from kantlivelong/invalid_tool_temp_fix
Handle non-[existent/functioning] tools
This commit is contained in:
commit
0ff0da4a7b
2 changed files with 4 additions and 1 deletions
|
|
@ -210,6 +210,9 @@ $(function() {
|
|||
if (lastData.hasOwnProperty("tool" + i)) {
|
||||
tools[i]["actual"](lastData["tool" + i].actual);
|
||||
tools[i]["target"](lastData["tool" + i].target);
|
||||
} else {
|
||||
tools[i]["actual"](0);
|
||||
tools[i]["target"](0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2604,7 +2604,7 @@ class MachineCom(object):
|
|||
if not match and support_r:
|
||||
match = regexes_parameters["floatR"].search(cmd)
|
||||
|
||||
if match:
|
||||
if match and self.last_temperature.tools.get(toolNum) is not None:
|
||||
try:
|
||||
target = float(match.group("value"))
|
||||
self.last_temperature.set_tool(toolNum, target=target)
|
||||
|
|
|
|||
Loading…
Reference in a new issue