diff --git a/ComTester.py b/ComTester.py index 15dd96ea5..e8a75417b 100644 --- a/ComTester.py +++ b/ComTester.py @@ -27,6 +27,7 @@ # This is to test connection and printing. We use it with com0com # to validate MatterControl under various situations. +from time import sleep import sys import argparse import serial @@ -65,6 +66,7 @@ def main(argv): if len(line) > 0: print(line) response = getCorrectResponse(line) + sleep(0.02) print response ser.write(response) ser.close() diff --git a/PartPreviewWindow/ViewGcodeBasic.cs b/PartPreviewWindow/ViewGcodeBasic.cs index 78c6ca8bd..c934d98cb 100644 --- a/PartPreviewWindow/ViewGcodeBasic.cs +++ b/PartPreviewWindow/ViewGcodeBasic.cs @@ -334,7 +334,13 @@ namespace MatterHackers.MatterControl.PartPreviewWindow private void SetAnimationPosition() { int currentLayer = PrinterConnectionAndCommunication.Instance.CurrentlyPrintingLayer; - if (currentLayer >= 0) + if (currentLayer <= 0) + { + selectLayerSlider.Value = 0; + layerRenderRatioSlider.SecondValue = 0; + layerRenderRatioSlider.FirstValue = 0; + } + else { selectLayerSlider.Value = currentLayer-1; layerRenderRatioSlider.SecondValue = PrinterConnectionAndCommunication.Instance.RatioIntoCurrentLayer; diff --git a/PrinterCommunication/PrinterConnectionAndCommunication.cs b/PrinterCommunication/PrinterConnectionAndCommunication.cs index 939d72701..ec965a3c9 100644 --- a/PrinterCommunication/PrinterConnectionAndCommunication.cs +++ b/PrinterCommunication/PrinterConnectionAndCommunication.cs @@ -684,7 +684,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication { if (currentIndex < loadedGCode.IndexOfChangeInZ[zIndex]) { - return zIndex-1; + return zIndex; } } @@ -720,11 +720,15 @@ namespace MatterHackers.MatterControl.PrinterCommunication && currentIndex < loadedGCode.Count) { int currentLayer = CurrentlyPrintingLayer; - int startIndex = loadedGCode.IndexOfChangeInZ[currentLayer]; - int endIndex = loadedGCode.Count - 1; - if (currentLayer < loadedGCode.NumChangesInZ - 2) + int startIndex = 0; + if (currentLayer > 0) { - endIndex = loadedGCode.IndexOfChangeInZ[currentLayer + 1] - 1; + startIndex = loadedGCode.IndexOfChangeInZ[currentLayer-1]; + } + int endIndex = loadedGCode.Count - 1; + if (currentLayer < loadedGCode.NumChangesInZ - 1) + { + endIndex = loadedGCode.IndexOfChangeInZ[currentLayer]; } int deltaFromStart = Math.Max(0, currentIndex - startIndex); diff --git a/StaticData/Translations/Master.txt b/StaticData/Translations/Master.txt index 8a01f7d08..602e980e4 100644 --- a/StaticData/Translations/Master.txt +++ b/StaticData/Translations/Master.txt @@ -3029,3 +3029,9 @@ Translated:Location: 'Advanced Controls' -> 'Slice Settings' -> 'Filament' -> 'F English:Save Slice Configuration Translated:Save Slice Configuration +English:Printing: {0} +Translated:Printing: {0} + +English:Finished Print: {0} +Translated:Finished Print: {0} +