Skip to content

Commit

Permalink
fix(ExtruderPanel): restore mode after extruding/retracting (#1965)
Browse files Browse the repository at this point in the history
Co-authored-by: Stefan Dej <[email protected]>
  • Loading branch information
mryel00 and meteyou authored Aug 27, 2024
1 parent 03ca19a commit cab5ea6
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/panels/Extruder/ExtruderControlPanelControl.vue
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,21 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixi
}
sendRetract(): void {
const gcode = `M83\nG1 E-${this.feedamount} F${this.feedrate * 60}`
const gcode =
`SAVE_GCODE_STATE NAME=ui_retract\n` +
`M83\n` +
`G1 E-${this.feedamount} F${this.feedrate * 60}\n` +
`RESTORE_GCODE_STATE NAME=ui_retract`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnRetract' })
}
sendExtrude(): void {
const gcode = `M83\nG1 E${this.feedamount} F${this.feedrate * 60}`
const gcode =
`SAVE_GCODE_STATE NAME=ui_extrude\n` +
`M83\n` +
`G1 E${this.feedamount} F${this.feedrate * 60}\n` +
`RESTORE_GCODE_STATE NAME=ui_extrude`
this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' })
this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnDetract' })
}
Expand Down

0 comments on commit cab5ea6

Please sign in to comment.