diff --git a/PrinterControls/ManualPrinterControls.cs b/PrinterControls/ManualPrinterControls.cs index d1f528bb9..723361e41 100644 --- a/PrinterControls/ManualPrinterControls.cs +++ b/PrinterControls/ManualPrinterControls.cs @@ -674,6 +674,8 @@ namespace MatterHackers.MatterControl terminalControlsContainer.HAnchor = Agg.UI.HAnchor.ParentLeftRight; terminalControlsContainer.Height = 68; + OutputScrollWindow.HookupPrinterOutput(); + { FlowLayoutWidget buttonBar = new FlowLayoutWidget(); buttonBar.HAnchor |= HAnchor.ParentLeftRight; diff --git a/PrinterControls/OutputScrollWindow.cs b/PrinterControls/OutputScrollWindow.cs index b7692fdf3..c1030732a 100644 --- a/PrinterControls/OutputScrollWindow.cs +++ b/PrinterControls/OutputScrollWindow.cs @@ -50,6 +50,11 @@ namespace MatterHackers.MatterControl RGBA_Bytes textColor = ActiveTheme.Instance.PrimaryTextColor; TextImageButtonFactory controlButtonFactory = new TextImageButtonFactory(); + public static void HookupPrinterOutput() + { + //throw new NotImplementedException(); + } + static OutputScrollWindow connectionWindow = null; static bool terminalWindowIsOpen = false; public static void Show() @@ -73,6 +78,7 @@ namespace MatterHackers.MatterControl } } + // private as you can't make one private OutputScrollWindow() : base(400, 300) { diff --git a/PrinterControls/PrintLeveling.cs b/PrinterControls/PrintLeveling.cs index 89bfe5b0b..1e118182b 100644 --- a/PrinterControls/PrintLeveling.cs +++ b/PrinterControls/PrintLeveling.cs @@ -80,7 +80,9 @@ namespace MatterHackers.MatterControl public string ApplyLeveling(Vector3 currentDestination, PrinterMachineInstruction.MovementTypes movementMode, string lineBeingSent, bool addLFCR, bool includeSpaces) { - if (lineBeingSent.StartsWith("G0") || lineBeingSent.StartsWith("G1")) + if ((lineBeingSent.StartsWith("G0") || lineBeingSent.StartsWith("G1")) + && lineBeingSent.Length > 2 + && lineBeingSent[2] == ' ') { double extruderDelta = 0; GCodeFile.GetFirstNumberAfter("E", lineBeingSent, ref extruderDelta); @@ -136,7 +138,7 @@ namespace MatterHackers.MatterControl foreach (PrinterMachineInstruction instruction in unleveledGCode.GCodeCommandQueue) { Vector3 currentDestination = instruction.Position; - instruction.Line = ApplyLeveling(currentDestination, instruction.movementType, instruction.Line, false, false); + instruction.Line = ApplyLeveling(currentDestination, instruction.movementType, instruction.Line, false, true); } } }