From a2f1e34d05b0d35fa44dfae690e8c6c6c59ee7e4 Mon Sep 17 00:00:00 2001 From: Patrick Gehrsitz Date: Thu, 8 Aug 2024 21:38:50 +0200 Subject: [PATCH] chore: remove unique names as they might not be necessary --- .../panels/Extruder/ExtruderControlPanelControl.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/panels/Extruder/ExtruderControlPanelControl.vue b/src/components/panels/Extruder/ExtruderControlPanelControl.vue index 35eb8b185..f18baeb6b 100644 --- a/src/components/panels/Extruder/ExtruderControlPanelControl.vue +++ b/src/components/panels/Extruder/ExtruderControlPanelControl.vue @@ -261,17 +261,15 @@ export default class ExtruderControlPanel extends Mixins(BaseMixin, ExtruderMixi this.setFeedamount({ value: this.maxExtrudeOnlyDistance }) } } - private counter: number = 0; + sendRetract(): void { - this.counter++; - const gcode = `SAVE_GCODE_STATE NAME=mainsail_ui_retract${this.counter}\nM83\nG1 E-${this.feedamount} F${this.feedrate * 60}\nRESTORE_GCODE_STATE NAME=mainsail_ui_retract${this.counter}` + const gcode = `SAVE_GCODE_STATE NAME=ui_retract\nM83\nG1 E-${this.feedamount} F${this.feedrate * 60}\nRESTORE_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 { - this.counter++; - const gcode = `SAVE_GCODE_STATE NAME=mainsail_ui_extrude${this.counter}\nM83\nG1 E${this.feedamount} F${this.feedrate * 60}\nRESTORE_GCODE_STATE NAME=mainsail_ui_extrude${this.counter}` + const gcode = `SAVE_GCODE_STATE NAME=ui_extrude\nM83\nG1 E${this.feedamount} F${this.feedrate * 60}\nRESTORE_GCODE_STATE NAME=ui_extrude` this.$store.dispatch('server/addEvent', { message: gcode, type: 'command' }) this.$socket.emit('printer.gcode.script', { script: gcode }, { loading: 'btnDetract' }) }