fix tool change detection

This commit is contained in:
Stewart Allen 2024-09-06 22:40:24 -04:00
commit d20e51a0dc

View file

@ -173,7 +173,7 @@ CAM.export = function(print, online) {
newpos.z = util.round(newpos.z, decimals);
// on tool change
let changeTool = out.tool != pos.t;
let changeTool = !(out.tool && pos.t) || out.tool.id !== pos.t.id;
if (changeTool) {
pos.t = out.tool;
consts.tool = pos.t.getNumber();