From b022e51d94da889bd870ff8bfa30bd495506c5b7 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Fri, 17 Feb 2017 18:50:47 -0600 Subject: [PATCH] Don't reset speed on flush moves (avoid use of uninitialized variable). --- lib/Slic3r/GCode/PressureRegulator.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Slic3r/GCode/PressureRegulator.pm b/lib/Slic3r/GCode/PressureRegulator.pm index d03094ab2..725cfb83a 100644 --- a/lib/Slic3r/GCode/PressureRegulator.pm +++ b/lib/Slic3r/GCode/PressureRegulator.pm @@ -84,6 +84,8 @@ sub _discharge { $self->_extrusion_axis, $new_E, $F // $self->_unretract_speed; $gcode .= sprintf "G92 %s%.5f ; restore E\n", $self->_extrusion_axis, $self->reader->E if !$self->config->use_relative_e_distances; + $gcode .= sprintf "G1 F%.3f ; restore F\n", $oldSpeed + if $oldSpeed; $self->_advance(0); return $gcode;