From 4cb95037fa41bdcebc85a0fd076025f04de690c5 Mon Sep 17 00:00:00 2001 From: jlewin Date: Wed, 20 Feb 2019 13:41:36 -0800 Subject: [PATCH] Restore original feed rate after running tool change scripts --- MatterControlLib/CustomWidgets/NozzleOffsetTemplatePrinter.cs | 1 - MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MatterControlLib/CustomWidgets/NozzleOffsetTemplatePrinter.cs b/MatterControlLib/CustomWidgets/NozzleOffsetTemplatePrinter.cs index baa97079c..7c72d3662 100644 --- a/MatterControlLib/CustomWidgets/NozzleOffsetTemplatePrinter.cs +++ b/MatterControlLib/CustomWidgets/NozzleOffsetTemplatePrinter.cs @@ -198,7 +198,6 @@ namespace MatterHackers.MatterControl gcodeSketch.WriteRaw("T1"); gcodeSketch.ResetE(); - gcodeSketch.ResetSpeed(); gcodeSketch.MoveTo(rect.Left, rect.Top); diff --git a/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs b/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs index ad1f18ac1..b83d9a270 100644 --- a/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs +++ b/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs @@ -79,6 +79,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io if (gcodeToQueue.Trim().Length > 0) { + var feedRate = printer.Connection.CurrentFeedRate; if (gcodeToQueue.Contains("\n")) { string[] linesToWrite = gcodeToQueue.Split(new string[] { "\n" }, StringSplitOptions.None); @@ -96,6 +97,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io commandQueue.Enqueue(gcodeToQueue); } + commandQueue.Enqueue($"G1 F{feedRate}"); commandQueue.Enqueue(lineIn); queuedSwitch = true; }