Making matter slice and cure layer changes both be detected.

This commit is contained in:
Lars Brubaker 2016-07-15 18:06:51 -07:00
parent c584814e56
commit 040da9da1e
4 changed files with 5 additions and 4 deletions

View file

@ -70,7 +70,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
string processedLine = offsetStream.ReadLine();
if (processedLine != null
&& layerCount < 1
&& processedLine.StartsWith("; LAYER:"))
&& GCodeFile.IsLayerChange(processedLine))
{
layerCount++;
if (layerCount == 1)

View file

@ -33,6 +33,7 @@ using System.Collections.Generic;
using System;
using MatterHackers.MatterControl.SlicerConfiguration;
using System.Linq;
using MatterHackers.GCodeVisualizer;
namespace MatterHackers.MatterControl.PrinterCommunication.Io
{
@ -140,7 +141,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
}
}
if (lineToSend.StartsWith("; LAYER:"))
if (GCodeFile.IsLayerChange(lineToSend))
{
string layerNumber = lineToSend.Split(':')[1];
if (PauseOnLayer(layerNumber))

View file

@ -201,7 +201,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
return null;
}
if (!lineToSend.StartsWith("; LAYER:"))
if (!GCodeFile.IsLayerChange(lineToSend))
{
// have not seen the end of this layer so keep printing slow
if (LineIsMovement(lineToSend))