Restore original feed rate after running tool change scripts

This commit is contained in:
jlewin 2019-02-20 13:41:36 -08:00
parent 294c0d43ce
commit 4cb95037fa
2 changed files with 2 additions and 1 deletions

View file

@ -198,7 +198,6 @@ namespace MatterHackers.MatterControl
gcodeSketch.WriteRaw("T1");
gcodeSketch.ResetE();
gcodeSketch.ResetSpeed();
gcodeSketch.MoveTo(rect.Left, rect.Top);

View file

@ -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;
}