From 2430becc9da8f3ed981eec79d90bfea87fdacbe6 Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Fri, 10 Feb 2017 14:44:07 -0800 Subject: [PATCH] Make sure we get our position any time we create stream processors. --- PrinterCommunication/PrinterConnectionAndCommunication.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PrinterCommunication/PrinterConnectionAndCommunication.cs b/PrinterCommunication/PrinterConnectionAndCommunication.cs index 0810b3c44..55e24e98a 100644 --- a/PrinterCommunication/PrinterConnectionAndCommunication.cs +++ b/PrinterCommunication/PrinterConnectionAndCommunication.cs @@ -449,7 +449,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication case CommunicationStates.Connected: SendLineToPrinterNow("M115"); - SendLineToPrinterNow("M114"); + ReadPosition(); break; case CommunicationStates.ConnectionLost: @@ -2414,6 +2414,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication feedrateMultiplyerStream8 = new FeedRateMultiplyerStream(extrusionMultiplyerStream7); requestTemperaturesStream9 = new RequestTemperaturesStream(feedrateMultiplyerStream8); totalGCodeStream = requestTemperaturesStream9; + + // Get the current position of the printer any time we reset our streams + ReadPosition(); } private void LoadGCodeToPrint(string gcodeFilename) @@ -2835,7 +2838,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication || lineWithoutChecksum.StartsWith("G92") // is a reset of printer position || (lineWithoutChecksum.StartsWith("T") && !lineWithoutChecksum.StartsWith("T:"))) // is a switch extruder (verify this is the right time to ask this) { - SendLineToPrinterNow("M114"); + ReadPosition(); } // write data to communication