Made the leveling wizard show up after connect if required
Put in a "finish setup" button Refactored some of the print leveling test code Auto close printer setup wizard on connect
This commit is contained in:
parent
338fa2559a
commit
d94ad423cf
7 changed files with 106 additions and 53 deletions
|
|
@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
public enum RuningState { InitialStartupCalibration, UserRequestedCalibration }
|
||||
|
||||
protected static readonly string initialPrinterSetupStepText = "Initial Printer Setup".Localize();
|
||||
protected static readonly string requiredPageInstructions1 = "Congratulations on setting up your new printer. Before starting your first print we need to run a simple calibration procedure.";
|
||||
protected static readonly string requiredPageInstructions1 = "Congratulations on connecting to your new printer. Before starting your first print we need to run a simple calibration procedure.";
|
||||
protected static readonly string requiredPageInstructions2 = "The next few screens will walk your through the print leveling wizard.";
|
||||
|
||||
protected static readonly string homingPageStepText = "Homing The Printer".Localize();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ using MatterHackers.VectorMath;
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
|
||||
namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
||||
{
|
||||
|
|
@ -182,5 +183,52 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasBeenRun()
|
||||
{
|
||||
switch (CurrentPrinterLevelingSystem)
|
||||
{
|
||||
case PrintLevelingData.LevelingSystem.Probe2Points:
|
||||
case PrintLevelingData.LevelingSystem.Probe3Points:
|
||||
if (SampledPosition0.z == 0
|
||||
&& SampledPosition1.z == 0
|
||||
&& SampledPosition2.z == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case PrintLevelingData.LevelingSystem.Probe7PointRadial:
|
||||
if (SampledPositions.Count != 7) // different criteria for what is not initialized
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case PrintLevelingData.LevelingSystem.Probe13PointRadial:
|
||||
if (SampledPositions.Count != 13) // different criteria for what is not initialized
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void RunLevelingWizard()
|
||||
{
|
||||
LevelWizardBase.RuningState runningState = LevelWizardBase.RuningState.UserRequestedCalibration;
|
||||
if (ActiveSliceSettings.Instance.LevelingRequiredToPrint)
|
||||
{
|
||||
// run in the first run state
|
||||
runningState = LevelWizardBase.RuningState.InitialStartupCalibration;
|
||||
}
|
||||
|
||||
LevelWizardBase.ShowPrintLevelWizard(runningState);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue