Made line chopping only happen when printing.

This commit is contained in:
Lars Brubaker 2017-06-23 17:00:44 -07:00
parent 831851b3a2
commit 007f7468f0
4 changed files with 8 additions and 5 deletions

View file

@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
private OffsetStream offsetStream;
private EventHandler unregisterEvents;
public BabyStepsStream(GCodeStream internalStream)
public BabyStepsStream(GCodeStream internalStream, double startingMaxLength = 1)
: base(null)
{
ActiveSliceSettings.SettingChanged.RegisterEvent((s, e) =>
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication.Io
}, ref unregisterEvents);
maxLengthStream = new MaxLengthStream(internalStream, 1);
maxLengthStream = new MaxLengthStream(internalStream, startingMaxLength);
offsetStream = new OffsetStream(maxLengthStream, new Vector3(0, 0, ActiveSliceSettings.Instance.GetValue<double>(SettingsKey.baby_step_z_offset)));
base.internalStream = offsetStream;
}

View file

@ -2118,7 +2118,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
// If the serial port isn't available (i.e. the specified port name wasn't found in GetPortNames()) or the serial
// port is already opened in another instance or process, then report the connection problem back to the user
connectionFailureMessage = (serialPortIsAlreadyOpen ?
this.ComPort + " in use".Localize() :
this.ComPort + " " + "in use".Localize() :
"Port not found".Localize());
OnConnectionFailed(null);
@ -2298,7 +2298,7 @@ namespace MatterHackers.MatterControl.PrinterCommunication
relativeToAbsoluteStream3 = new RelativeToAbsoluteStream(queuedCommandStream2);
printLevelingStream4 = new PrintLevelingStream(relativeToAbsoluteStream3, true);
waitForTempStream5 = new WaitForTempStream(printLevelingStream4);
babyStepsStream6 = new BabyStepsStream(waitForTempStream5);
babyStepsStream6 = new BabyStepsStream(waitForTempStream5, gcodeFilename == null ? 2000 : 1);
if (activePrintTask != null)
{
// make sure we are in the position we were when we stopped printing

View file

@ -4249,3 +4249,6 @@ Translated:Start Threshold:
English:End Threshold:
Translated:End Threshold:
English:Firmware Version: {0}
Translated:Firmware Version: {0}

@ -1 +1 @@
Subproject commit b6d5406f869a83f8b6ddc6c47cc8b290bdb2e892
Subproject commit 706ded619b4dd739dcedba938cbd647bb06bf977