Make sure we ask for position after auto bed level.
Make sure we always show the known position of the printer when we re-build the display.
This commit is contained in:
parent
5b13fc9c5a
commit
d49739f490
4 changed files with 19 additions and 9 deletions
|
|
@ -83,8 +83,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
List<string> lines = new List<string>();
|
||||
lines.Add(lineBeingSent);
|
||||
if (lineBeingSent.StartsWith("G28"))
|
||||
{
|
||||
if (lineBeingSent.StartsWith("G28")
|
||||
|| lineBeingSent.StartsWith("G29"))
|
||||
{
|
||||
lines.Add("M114");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
List<string> lines = new List<string>();
|
||||
lines.Add(lineBeingSent);
|
||||
if (lineBeingSent.StartsWith("G28"))
|
||||
if (lineBeingSent.StartsWith("G28")
|
||||
|| lineBeingSent.StartsWith("G29"))
|
||||
{
|
||||
lines.Add("M114");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -292,8 +292,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
List<string> lines = new List<string>();
|
||||
lines.Add(lineBeingSent);
|
||||
if (lineBeingSent.StartsWith("G28"))
|
||||
{
|
||||
if (lineBeingSent.StartsWith("G28")
|
||||
|| lineBeingSent.StartsWith("G29"))
|
||||
{
|
||||
lines.Add("M114");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -258,14 +258,13 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
hwDestinationBar.AddChild(yPosition);
|
||||
hwDestinationBar.AddChild(zPosition);
|
||||
|
||||
SetDestinationPositionText(xPosition, yPosition, zPosition);
|
||||
|
||||
reportDestinationChanged = new LimitCallingFrequency(1, () =>
|
||||
{
|
||||
UiThread.RunOnIdle(() =>
|
||||
{
|
||||
Vector3 destinationPosition = PrinterConnectionAndCommunication.Instance.CurrentDestination;
|
||||
xPosition.Text = "X: {0:0.00}".FormatWith(destinationPosition.x);
|
||||
yPosition.Text = "Y: {0:0.00}".FormatWith(destinationPosition.y);
|
||||
zPosition.Text = "Z: {0:0.00}".FormatWith(destinationPosition.z);
|
||||
SetDestinationPositionText(xPosition, yPosition, zPosition);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -277,6 +276,14 @@ namespace MatterHackers.MatterControl.PrinterControls
|
|||
return hwDestinationBar;
|
||||
}
|
||||
|
||||
private static void SetDestinationPositionText(TextWidget xPosition, TextWidget yPosition, TextWidget zPosition)
|
||||
{
|
||||
Vector3 destinationPosition = PrinterConnectionAndCommunication.Instance.CurrentDestination;
|
||||
xPosition.Text = "X: {0:0.00}".FormatWith(destinationPosition.x);
|
||||
yPosition.Text = "Y: {0:0.00}".FormatWith(destinationPosition.y);
|
||||
zPosition.Text = "Z: {0:0.00}".FormatWith(destinationPosition.z);
|
||||
}
|
||||
|
||||
private void homeAll_Click(object sender, EventArgs mouseEvent)
|
||||
{
|
||||
PrinterConnectionAndCommunication.Instance.HomeAxis(PrinterConnectionAndCommunication.Axis.XYZ);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue