add option to limit device z axis movement speed

This commit is contained in:
Stewart Allen 2021-06-29 09:15:55 -04:00
commit 8210f97b71
4 changed files with 15 additions and 4 deletions

View file

@ -24,6 +24,7 @@
gcodeTrack = device.gcodeTrack,
gcodeExt = device.gcodeExt,
gcodeInt = device.gcodeInt,
zMoveMax = device.deviceZMax || 0,
tool = 0,
fwRetract = device.fwRetract,
isDanger = settings.controller.danger,
@ -321,6 +322,9 @@
o.append(" E").append(newpos.e.toFixed(decimals));
}
}
if (zMoveMax && emit.z) {
rate = Math.min(zMoveMax, rate) * 60;
}
if (rate && rate != pos.f) {
o.append(" F").append(Math.round(rate));
pos.f = rate