diff --git a/src/components/mixins/control.ts b/src/components/mixins/control.ts index 0e669f1a4..1361396de 100644 --- a/src/components/mixins/control.ts +++ b/src/components/mixins/control.ts @@ -135,9 +135,11 @@ export default class ControlMixin extends Vue { } doSendMove(gcode: string, feedrate: number) { - gcode = 'G91' + '\n' + 'G1 ' + gcode + ' F' + feedrate * 60 - - if (this.absolute_coordinates) gcode += '\nG90' + gcode = + `SAVE_GCODE_STATE NAME=ui_retract\n` + + `G91\n` + + `G1 ${gcode} F${feedrate * 60}\n` + + `RESTORE_GCODE_STATE NAME=ui_retract` this.doSend(gcode) }