From 43d809f2b7f9da2158bccf84db8b58684feff9fc Mon Sep 17 00:00:00 2001 From: jlewin Date: Wed, 20 Feb 2019 18:13:40 -0800 Subject: [PATCH] Guard for unknown state --- .../PrinterCommunication/Io/ToolChangeStream.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs b/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs index db1a157b7..00e075b66 100644 --- a/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs +++ b/MatterControlLib/PrinterCommunication/Io/ToolChangeStream.cs @@ -97,7 +97,11 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io commandQueue.Enqueue(gcodeToQueue); } - commandQueue.Enqueue($"G1 F{feedRate}"); + if (feedRate != double.PositiveInfinity) + { + commandQueue.Enqueue($"G1 F{feedRate}"); + } + commandQueue.Enqueue(lineIn); queuedSwitch = true; }