Skip to content

Commit

Permalink
refactor: trim extra spaces from sent commands
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Aug 7, 2024
1 parent 7d0a890 commit 79f9999
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/components/widgets/toolhead/ToolheadControlBarsAxis.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export default class ToolheadControlBarsAxis extends Mixins(StateMixin, Toolhead
sendMoveGcode (distance: number) {
this.sendGcode(`G91
G1 ${this.axis}${distance} F${this.rate * 60}
G90`)
G1 ${this.axis}${distance} F${this.rate * 60}
G90`)
}
sendHomeGcode () {
Expand Down
4 changes: 2 additions & 2 deletions src/components/widgets/toolhead/ToolheadControlCircle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,8 @@ export default class ToolheadControlCircle extends Mixins(StateMixin, ToolheadMi
this.sendGcode(`FORCE_MOVE STEPPER=stepper_${axis.toLowerCase()} DISTANCE=${distance} VELOCITY=${rate} ACCEL=${accel}`)
} else {
this.sendGcode(`G91
G1 ${axis}${distance} F${rate * 60}
G90`)
G1 ${axis}${distance} F${rate * 60}
G90`)
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/widgets/toolhead/ToolheadControlCross.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ export default class ToolheadControlCross extends Mixins(StateMixin, ToolheadMix
this.sendGcode(`FORCE_MOVE STEPPER=stepper_${axis.toLowerCase()} DISTANCE=${distance} VELOCITY=${rate} ACCEL=${accel}`)
} else {
this.sendGcode(`G91
G1 ${axis}${distance} F${rate * 60}
G90`)
G1 ${axis}${distance} F${rate * 60}
G90`)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/toolhead/ToolheadPosition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export default class ToolheadPosition extends Mixins(StateMixin, ToolheadMixin)
this.sendGcode(`FORCE_MOVE STEPPER=stepper_${axis.toLowerCase()} DISTANCE=${pos} VELOCITY=${rate} ACCEL=${accel}`)
} else {
this.sendGcode(`G90
G1 ${axis}${pos} F${rate * 60}`)
G1 ${axis}${pos} F${rate * 60}`)
}
}
}
Expand Down

0 comments on commit 79f9999

Please sign in to comment.