diff --git a/src/components/mixins/control.ts b/src/components/mixins/control.ts index 616ff1846..5c9527428 100644 --- a/src/components/mixins/control.ts +++ b/src/components/mixins/control.ts @@ -112,10 +112,10 @@ export default class ControlMixin extends Vue { }) } - get existsClientAxisMoveMacro() { + get existsClientLinearMoveMacro() { const macros = this.$store.state.printer?.gcode?.commands ?? {} - return '_CLIENT_AXIS_MOVE' in macros + return '_CLIENT_LINEAR_MOVE' in macros } doHome() { @@ -160,7 +160,7 @@ export default class ControlMixin extends Vue { `G1 ${gcode} F${feedrate * 60}\n` + `RESTORE_GCODE_STATE NAME=_ui_movement` - if (this.existsClientAxisMoveMacro) { + if (this.existsClientLinearMoveMacro) { gcode = gcode .split(' ') .map((part) => { @@ -171,7 +171,7 @@ export default class ControlMixin extends Vue { }) .join(' ') - command = `_CLIENT_AXIS_MOVE ${gcode} F=${feedrate * 60}` + command = `_CLIENT_LINEAR_MOVE ${gcode} F=${feedrate * 60}` } this.doSend(command) diff --git a/src/components/panels/Extruder/ExtruderControlPanelControl.vue b/src/components/panels/Extruder/ExtruderControlPanelControl.vue index 90a306c02..e43b27372 100644 --- a/src/components/panels/Extruder/ExtruderControlPanelControl.vue +++ b/src/components/panels/Extruder/ExtruderControlPanelControl.vue @@ -250,10 +250,10 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixi return this.feedamount * this.extrudeFactor > this.maxExtrudeOnlyDistance } - get existsHelperMacro(): boolean { + get existsClientLinearMoveMacro() { const macros = this.$store.state.printer?.gcode?.commands ?? {} - return '_CLIENT_EXTRUDER_MOVE' in macros + return '_CLIENT_LINEAR_MOVE' in macros } @Watch('maxExtrudeOnlyDistance', { immediate: true }) @@ -283,8 +283,8 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixi `G1 E${length} F${this.feedrate * 60}\n` + `RESTORE_GCODE_STATE NAME=_ui_extrude` - if (this.existsHelperMacro) { - gcode = `_CLIENT_EXTRUDER_MOVE E=${length} F=${this.feedrate * 60}` + if (this.existsClientLinearMoveMacro) { + gcode = `_CLIENT_LINEAR_MOVE E=${length} F=${this.feedrate * 60}` } this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' }) diff --git a/src/components/panels/ToolheadControls/MoveToControl.vue b/src/components/panels/ToolheadControls/MoveToControl.vue index 7ace348a3..d55fdb9fa 100644 --- a/src/components/panels/ToolheadControls/MoveToControl.vue +++ b/src/components/panels/ToolheadControls/MoveToControl.vue @@ -165,14 +165,14 @@ export default class MoveToControl extends Mixins(BaseMixin, ControlMixin) { sendCmd(): void { let gcode: string[] = [] - if (!this.existsClientAxisMoveMacro) { + if (!this.existsClientLinearMoveMacro) { gcode.push('SAVE_GCODE_STATE NAME=_ui_movement') gcode.push('G90') } if (this.input.z.pos !== this.gcodePositions.z) { - if (this.existsClientAxisMoveMacro) - gcode.push(`_CLIENT_AXIS_MOVE Z=${this.input.z.pos} F=${this.feedrateZ * 60} ABSOLUTE=1`) + if (this.existsClientLinearMoveMacro) + gcode.push(`_CLIENT_LINEAR_MOVE Z=${this.input.z.pos} F=${this.feedrateZ * 60} ABSOLUTE=1`) else gcode.push(`G1 Z${this.input.z.pos} F${this.feedrateZ * 60}`) } @@ -180,11 +180,11 @@ export default class MoveToControl extends Mixins(BaseMixin, ControlMixin) { let xPos = '' let yPos = '' - if (this.existsClientAxisMoveMacro) { + if (this.existsClientLinearMoveMacro) { if (this.input.x.pos !== this.gcodePositions.x) xPos = ` X=${this.input.x.pos}` if (this.input.y.pos !== this.gcodePositions.y) yPos = ` Y=${this.input.y.pos}` - gcode.push(`_CLIENT_AXIS_MOVE${xPos}${yPos} F=${this.feedrateXY * 60} ABSOLUTE=1`) + gcode.push(`_CLIENT_LINEAR_MOVE${xPos}${yPos} F=${this.feedrateXY * 60} ABSOLUTE=1`) } else { if (this.input.x.pos !== this.gcodePositions.x) xPos = ` X${this.input.x.pos}` if (this.input.y.pos !== this.gcodePositions.y) yPos = ` Y${this.input.y.pos}` @@ -193,7 +193,7 @@ export default class MoveToControl extends Mixins(BaseMixin, ControlMixin) { } } - if (!this.existsClientAxisMoveMacro) { + if (!this.existsClientLinearMoveMacro) { gcode.push('RESTORE_GCODE_STATE NAME=_ui_movement') }