Simplify naming
This commit is contained in:
parent
39e78f7348
commit
1ceaa2d31a
3 changed files with 5 additions and 4 deletions
|
|
@ -124,7 +124,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
|
||||
private List<LevelingTriangle> Regions { get; set; } = new List<LevelingTriangle>();
|
||||
|
||||
public string DoApplyLeveling(string lineBeingSent, Vector3 currentDestination)
|
||||
public string ApplyLeveling(string lineBeingSent, Vector3 currentDestination)
|
||||
{
|
||||
double extruderDelta = 0;
|
||||
GCodeFile.GetFirstNumberAfter("E", lineBeingSent, ref extruderDelta);
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
gcodeAlreadyLeveled = true;
|
||||
}
|
||||
|
||||
if (lineFromChild != null
|
||||
if (lineFromChild != null
|
||||
&& LevelingActive
|
||||
&& !gcodeAlreadyLeveled)
|
||||
{
|
||||
|
|
@ -129,6 +129,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
private string GetLeveledPosition(string lineBeingSent, PrinterMove currentDestination)
|
||||
{
|
||||
PrintLevelingData levelingData = printerSettings.Helpers.GetPrintLevelingData();
|
||||
|
||||
if (levelingData != null
|
||||
&& printerSettings?.GetValue<bool>(SettingsKey.print_leveling_enabled) == true
|
||||
&& (lineBeingSent.StartsWith("G0 ") || lineBeingSent.StartsWith("G1 ")))
|
||||
|
|
@ -141,7 +142,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
currentLevelingFunctions = new LevelingFunctions(printerSettings, levelingData);
|
||||
}
|
||||
|
||||
lineBeingSent = currentLevelingFunctions.DoApplyLeveling(lineBeingSent, currentDestination.position);
|
||||
lineBeingSent = currentLevelingFunctions.ApplyLeveling(lineBeingSent, currentDestination.position);
|
||||
}
|
||||
|
||||
return lineBeingSent;
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ namespace MatterControl.Tests.MatterControl
|
|||
Assert.AreEqual(testLeveled.Y, testUnleveled.Y, .001, "We don't adjust the x or y on mesh leveling");
|
||||
Assert.AreEqual(testLeveled.Y, controlLeveled.Y, .001, "We don't adjust the x or y on mesh leveling");
|
||||
Assert.AreEqual(testLeveled.Z, controlLeveled.Z, .001);
|
||||
string outPositionString = levelingFunctions.DoApplyLeveling(GetGCodeString(testUnleveled), testUnleveled);
|
||||
string outPositionString = levelingFunctions.ApplyLeveling(GetGCodeString(testUnleveled), testUnleveled);
|
||||
Assert.AreEqual(GetGCodeString(testLeveled), outPositionString);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue