Skip to content

Commit

Permalink
refactor(ControlPanel): use SAVE/RESTORE STATE when moving (#1988)
Browse files Browse the repository at this point in the history
Co-authored-by: Pedro Lamas <[email protected]>
  • Loading branch information
meteyou and pedrolamas authored Nov 5, 2024
1 parent 0a72a7a commit 0bbf359
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/mixins/control.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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_movement\n` +
`G91\n` +
`G1 ${gcode} F${feedrate * 60}\n` +
`RESTORE_GCODE_STATE NAME=_ui_movement`

this.doSend(gcode)
}
Expand Down

0 comments on commit 0bbf359

Please sign in to comment.