Made a global baby step for all extruders
will calibrate extruder relative offsets separately
This commit is contained in:
parent
3e802d5dd4
commit
8b4fd20889
10 changed files with 30 additions and 140 deletions
|
|
@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
{
|
||||
public class PrintLevelingWizard : PrinterSetupWizard
|
||||
{
|
||||
double[] babySteppingValues = new double[4];
|
||||
double babySteppingValue;
|
||||
private LevelingPlan levelingPlan;
|
||||
|
||||
public PrintLevelingWizard(PrinterConfig printer)
|
||||
|
|
@ -51,12 +51,10 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.Initialize();
|
||||
|
||||
// remember the current baby stepping values
|
||||
babySteppingValues[0] = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset);
|
||||
babySteppingValues[1] = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset_1);
|
||||
babySteppingValue = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset);
|
||||
|
||||
// clear them while we measure the offsets
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, "0");
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset_1, "0");
|
||||
|
||||
pages = this.GetPages();
|
||||
pages.MoveNext();
|
||||
|
|
@ -122,8 +120,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
printer.Connection.AllowLeveling = true;
|
||||
|
||||
// set the baby stepping back to the last known good value
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, babySteppingValues[0].ToString());
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset_1, babySteppingValues[1].ToString());
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, babySteppingValue.ToString());
|
||||
|
||||
this.WindowHasBeenClosed = true;
|
||||
|
||||
|
|
@ -350,8 +347,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
if (!printer.Settings.GetValue<bool>(SettingsKey.use_z_probe))
|
||||
{
|
||||
// clear the baby stepping so we don't save the old values
|
||||
babySteppingValues[0] = 0;
|
||||
babySteppingValues[1] = 0;
|
||||
babySteppingValue = 0;
|
||||
}
|
||||
|
||||
yield return new LastPageInstructions(
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
{
|
||||
public class ProbeCalibrationWizard : PrinterSetupWizard
|
||||
{
|
||||
double[] babySteppingValues = new double[4];
|
||||
double babySteppingValue;
|
||||
|
||||
public ProbeCalibrationWizard(PrinterConfig printer)
|
||||
: base(printer)
|
||||
|
|
@ -49,12 +49,10 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
printer.Connection.AllowLeveling = false;
|
||||
|
||||
// remember the current baby stepping values
|
||||
babySteppingValues[0] = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset);
|
||||
babySteppingValues[1] = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset_1);
|
||||
babySteppingValue = printer.Settings.GetValue<double>(SettingsKey.baby_step_z_offset);
|
||||
|
||||
// clear them while we measure the offsets
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, "0");
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset_1, "0");
|
||||
|
||||
pages = this.GetPages();
|
||||
pages.MoveNext();
|
||||
|
|
@ -72,8 +70,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
printer.Connection.AllowLeveling = true;
|
||||
|
||||
// set the baby stepping back to the last known good value
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, babySteppingValues[0].ToString());
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset_1, babySteppingValues[1].ToString());
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, babySteppingValue.ToString());
|
||||
|
||||
// make sure we raise the probe on close
|
||||
if (printer.Settings.GetValue<bool>(SettingsKey.has_z_probe)
|
||||
|
|
@ -279,8 +276,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
}
|
||||
|
||||
// clear the baby stepping so we don't save the old values
|
||||
babySteppingValues[0] = 0;
|
||||
babySteppingValues[1] = 0;
|
||||
babySteppingValue = 0;
|
||||
|
||||
yield return new CalibrateProbeLastPageInstructions(
|
||||
this,
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
// Invoke setter forcing persistence of leveling data
|
||||
printer.Settings.Helpers.PrintLevelingData = levelingData;
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset, "0");
|
||||
printer.Settings.SetValue(SettingsKey.baby_step_z_offset_1, "0");
|
||||
printer.Connection.AllowLeveling = true;
|
||||
printer.Settings.Helpers.DoPrintLeveling(true);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue