From 79f999922bd35169bc39fd93c2e318c5e42a3576 Mon Sep 17 00:00:00 2001 From: Pedro Lamas Date: Wed, 7 Aug 2024 13:53:33 +0100 Subject: [PATCH] refactor: trim extra spaces from sent commands Signed-off-by: Pedro Lamas --- src/components/widgets/toolhead/ToolheadControlBarsAxis.vue | 4 ++-- src/components/widgets/toolhead/ToolheadControlCircle.vue | 4 ++-- src/components/widgets/toolhead/ToolheadControlCross.vue | 4 ++-- src/components/widgets/toolhead/ToolheadPosition.vue | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/widgets/toolhead/ToolheadControlBarsAxis.vue b/src/components/widgets/toolhead/ToolheadControlBarsAxis.vue index 487ec51f4b..5075c242f3 100644 --- a/src/components/widgets/toolhead/ToolheadControlBarsAxis.vue +++ b/src/components/widgets/toolhead/ToolheadControlBarsAxis.vue @@ -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 () { diff --git a/src/components/widgets/toolhead/ToolheadControlCircle.vue b/src/components/widgets/toolhead/ToolheadControlCircle.vue index b54394b078..020fedbc0e 100644 --- a/src/components/widgets/toolhead/ToolheadControlCircle.vue +++ b/src/components/widgets/toolhead/ToolheadControlCircle.vue @@ -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`) } } diff --git a/src/components/widgets/toolhead/ToolheadControlCross.vue b/src/components/widgets/toolhead/ToolheadControlCross.vue index 0f3b980882..4f4e6e159e 100644 --- a/src/components/widgets/toolhead/ToolheadControlCross.vue +++ b/src/components/widgets/toolhead/ToolheadControlCross.vue @@ -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`) } } } diff --git a/src/components/widgets/toolhead/ToolheadPosition.vue b/src/components/widgets/toolhead/ToolheadPosition.vue index 506b79680a..7e976b87e6 100644 --- a/src/components/widgets/toolhead/ToolheadPosition.vue +++ b/src/components/widgets/toolhead/ToolheadPosition.vue @@ -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}`) } } }