Make sure we read position at the correct time.

This commit is contained in:
Lars Brubaker 2017-06-14 18:01:38 -07:00
parent 64e72512a6
commit 5ad34b70cd

View file

@ -1715,9 +1715,9 @@ namespace MatterHackers.MatterControl.PrinterCommunication
}
}
public void ReadPosition()
public void ReadPosition(bool forceToTopOfQueue = false)
{
SendLineToPrinterNow("M114", true);
SendLineToPrinterNow("M114", forceToTopOfQueue);
PositionReadQueued = true;
}
@ -2893,7 +2893,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)
{
ReadPosition();
ReadPosition(true);
}
// write data to communication