Skip to content

Commit

Permalink
chore: remove unique names as they might not be necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
mryel00 committed Aug 8, 2024
1 parent a449a0b commit a2f1e34
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' })
}
Expand Down

0 comments on commit a2f1e34

Please sign in to comment.