Adding change temp object
issue: MatterHackers/MCCentral#6123 Create a temperature calibration object
This commit is contained in:
parent
eb6960b053
commit
975c9294ca
10 changed files with 297 additions and 30 deletions
|
|
@ -35,9 +35,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
{
|
||||
public class ProcessWriteRegexStream : GCodeStreamProxy
|
||||
{
|
||||
private PrinterMove currentMove = PrinterMove.Unknown;
|
||||
|
||||
public static Regex GetQuotedParts = new Regex(@"([""'])(\\?.)*?\1", RegexOptions.Compiled);
|
||||
public static Regex GetQuotedParts { get; } = new Regex(@"([""'])(\\?.)*?\1", RegexOptions.Compiled);
|
||||
|
||||
private QueuedCommandsStream queueStream;
|
||||
|
||||
|
|
@ -78,31 +76,15 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
var lineToSend = lines[0];
|
||||
|
||||
if (lineToSend != null
|
||||
&& LineIsMovement(lineToSend))
|
||||
{
|
||||
currentMove = GetPosition(lineToSend, currentMove);
|
||||
}
|
||||
|
||||
// is it a position set?
|
||||
if (lineToSend.StartsWith("G92"))
|
||||
{
|
||||
GCodeFile.GetFirstNumberAfter("X", lineToSend, ref this.currentMove.position.X);
|
||||
GCodeFile.GetFirstNumberAfter("Y", lineToSend, ref this.currentMove.position.Y);
|
||||
GCodeFile.GetFirstNumberAfter("Z", lineToSend, ref this.currentMove.position.Z);
|
||||
GCodeFile.GetFirstNumberAfter("E", lineToSend, ref this.currentMove.extrusion);
|
||||
|
||||
// tell the stream pipeline what the actual printer position is
|
||||
this.SetPrinterPosition(this.currentMove);
|
||||
}
|
||||
|
||||
return lineToSend;
|
||||
}
|
||||
|
||||
public static List<string> ProcessWriteRegEx(string lineToWrite, PrinterConfig printer)
|
||||
{
|
||||
var linesToWrite = new List<string>();
|
||||
linesToWrite.Add(lineToWrite);
|
||||
var linesToWrite = new List<string>
|
||||
{
|
||||
lineToWrite
|
||||
};
|
||||
|
||||
var addedLines = new List<string>();
|
||||
for (int i = 0; i < linesToWrite.Count; i++)
|
||||
|
|
@ -122,6 +104,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
{
|
||||
addedLines.Add(splitReplacement[j]);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -132,11 +115,5 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
|
||||
return linesToWrite;
|
||||
}
|
||||
|
||||
public override void SetPrinterPosition(PrinterMove position)
|
||||
{
|
||||
this.currentMove.CopyKnowSettings(position);
|
||||
internalStream.SetPrinterPosition(currentMove);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue