Merge branch 'temp'
This commit is contained in:
commit
2ca8a04411
1 changed files with 9 additions and 3 deletions
|
|
@ -41,6 +41,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
||||||
protected PrinterMove lastDestination = new PrinterMove();
|
protected PrinterMove lastDestination = new PrinterMove();
|
||||||
public PrinterMove LastDestination { get { return lastDestination; } }
|
public PrinterMove LastDestination { get { return lastDestination; } }
|
||||||
|
|
||||||
|
PrinterMove accumulatedRelativeMoves;
|
||||||
|
|
||||||
bool absoluteMode = true;
|
bool absoluteMode = true;
|
||||||
|
|
||||||
public RelativeToAbsoluteStream(GCodeStream internalStream)
|
public RelativeToAbsoluteStream(GCodeStream internalStream)
|
||||||
|
|
@ -52,6 +54,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
||||||
{
|
{
|
||||||
lastDestination = position;
|
lastDestination = position;
|
||||||
internalStream.SetPrinterPosition(lastDestination);
|
internalStream.SetPrinterPosition(lastDestination);
|
||||||
|
accumulatedRelativeMoves = new PrinterMove();
|
||||||
}
|
}
|
||||||
|
|
||||||
public string ProcessLine(string lineToProcess)
|
public string ProcessLine(string lineToProcess)
|
||||||
|
|
@ -80,9 +83,12 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentDestination = GetPosition(lineToProcess, PrinterMove.Zero);
|
PrinterMove relativeMove = GetPosition(lineToProcess, PrinterMove.Zero);
|
||||||
double feedRate = currentDestination.feedRate;
|
double feedRate = relativeMove.feedRate;
|
||||||
currentDestination += lastDestination;
|
accumulatedRelativeMoves += relativeMove;
|
||||||
|
|
||||||
|
currentDestination = lastDestination + accumulatedRelativeMoves;
|
||||||
|
|
||||||
currentDestination.feedRate = feedRate;
|
currentDestination.feedRate = feedRate;
|
||||||
|
|
||||||
lineToProcess = CreateMovementLine(currentDestination, lastDestination);
|
lineToProcess = CreateMovementLine(currentDestination, lastDestination);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue