Re-wrote the load filament wizard as not a macro so we have more control over it

Added it to the setup steps

issue: MatterHackers/MCCentral#4429
Put in a loading filament as part of initial setup process
This commit is contained in:
Lars Brubaker 2018-11-02 16:14:37 -07:00
parent 6469cba676
commit 775f1982bd
68 changed files with 832 additions and 492 deletions

View file

@ -40,7 +40,7 @@ using MatterHackers.VectorMath;
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
{
public class AutoProbeFeedback : LevelingWizardPage
public class AutoProbeFeedback : PrinterSetupWizardPage
{
private Vector3 lastReportedPosition;
private List<ProbePosition> probePositions;
@ -49,7 +49,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
private EventHandler unregisterEvents;
protected Vector3 probeStartPosition;
public AutoProbeFeedback(LevelingWizard context, Vector3 probeStartPosition, string headerText, List<ProbePosition> probePositions, int probePositionsBeingEditedIndex)
public AutoProbeFeedback(PrinterSetupWizard context, Vector3 probeStartPosition, string headerText, List<ProbePosition> probePositions, int probePositionsBeingEditedIndex)
: base(context, headerText, headerText)
{
this.probeStartPosition = probeStartPosition;
@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
this.probePositionsBeingEditedIndex = probePositionsBeingEditedIndex;
var spacer = new GuiWidget(15, 15);
contentRow.AddChild(spacer);
ContentRow.AddChild(spacer);
FlowLayoutWidget textFields = new FlowLayoutWidget(FlowDirection.TopToBottom);
}
@ -103,7 +103,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
probePositions[probePositionsBeingEditedIndex].position.Z = Math.Round(samples.Average(), 2);
UiThread.RunOnIdle(() => nextButton.InvokeClick());
UiThread.RunOnIdle(() => NextButton.InvokeClick());
}
}
}
@ -152,7 +152,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
printer.Connection.MoveAbsolute(adjustedProbePosition, feedRates.X);
}
nextButton.Enabled = false;
NextButton.Enabled = false;
if (printer.Connection.IsConnected
&& !(printer.Connection.PrinterIsPrinting