allowing to load position only when homed

This commit is contained in:
sanjayk03-dev
2024-07-25 18:33:16 +05:30
parent f307d229e4
commit b4d8d05998

View File

@@ -782,7 +782,7 @@ module.exports = {
load_position: function (axes) { load_position: function (axes) {
try { try {
for (const axis of axes) { for (const axis of axes) {
if (this.config.axes["offset_" + axis] && this.state["offset_" + axis] == 0) { if (this.config.axes["offset_" + axis] && this.state["offset_" + axis] == 0 && this[axis].state == "HOMED") {
this.set_position(axis, -this.config.axes["offset_" + axis]); this.set_position(axis, -this.config.axes["offset_" + axis]);
} }
} }