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 wsopen = [];
const found = {};
const debug = true;
const debug = false;
class MQTT {
#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
// safety to prevent tool crashing
if (points === 0) {
pos.x = pos.y = pos.z = 0;
if (points === 0 || changeTool) {
points++;
if (spro.camFirstZMax) {
moveTo({