allow cam first Z max to work with tool changes, too

This commit is contained in:
Stewart Allen 2025-02-11 07:59:06 -05:00
commit 48f40a566b
2 changed files with 7 additions and 3 deletions

View file

@ -10,7 +10,7 @@ module.exports = async (server) => {
const mcache = {}; const mcache = {};
const wsopen = []; const wsopen = [];
const found = {}; const found = {};
const debug = true; const debug = false;
class MQTT { class MQTT {
#timer; #timer;

View file

@ -198,10 +198,14 @@ CAM.export = function(print, online) {
} }
} }
// enforce XY origin at start of print
if (points === 0 || changeTool) {
pos.x = pos.y = pos.z = 0;
}
// split first move to X,Y then Z for that new location // split first move to X,Y then Z for that new location
// safety to prevent tool crashing // safety to prevent tool crashing
if (points === 0) { if (points === 0 || changeTool) {
pos.x = pos.y = pos.z = 0;
points++; points++;
if (spro.camFirstZMax) { if (spro.camFirstZMax) {
moveTo({ moveTo({