Going back to the old leveling method.
This commit is contained in:
parent
387f4297bc
commit
47968f566f
13 changed files with 46 additions and 150 deletions
|
|
@ -41,7 +41,6 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
public class PrintLevelingStream : GCodeStreamProxy
|
||||
{
|
||||
bool activePrinting;
|
||||
bool hadZHome = false;
|
||||
protected PrinterMove lastDestination = new PrinterMove();
|
||||
public PrintLevelingStream(GCodeStream internalStream, bool activePrinting)
|
||||
: base(internalStream)
|
||||
|
|
@ -52,30 +51,8 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
|
|||
public PrinterMove LastDestination { get { return lastDestination; } }
|
||||
public override string ReadLine()
|
||||
{
|
||||
if (hadZHome)
|
||||
{
|
||||
hadZHome = false;
|
||||
// only add this when exporting to gcode
|
||||
if (!activePrinting)
|
||||
{
|
||||
// return the correct G92
|
||||
double zOffset = ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.z_offset_after_home);
|
||||
if (zOffset != 0)
|
||||
{
|
||||
double newHomePosition = ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.printer_z_after_home) + zOffset;
|
||||
return $"G92 Z{newHomePosition}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string lineFromChild = base.ReadLine();
|
||||
|
||||
if (lineFromChild != null
|
||||
&& LineIsZHoming(lineFromChild))
|
||||
{
|
||||
hadZHome = true;
|
||||
}
|
||||
|
||||
if (lineFromChild != null
|
||||
&& PrinterConnectionAndCommunication.Instance.ActivePrinter.GetValue<bool>(SettingsKey.print_leveling_enabled))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue