Bugfix: an awful _BRIDGE_FAN_END string was sometimes left in the output. #245
This commit is contained in:
parent
2ff3ab1faf
commit
c7006fed26
2 changed files with 6 additions and 8 deletions
|
@ -307,7 +307,7 @@ sub _Gx {
|
||||||
my $append_bridge_off = 0;
|
my $append_bridge_off = 0;
|
||||||
if ($speed ne $self->last_speed) {
|
if ($speed ne $self->last_speed) {
|
||||||
if ($speed eq 'bridge') {
|
if ($speed eq 'bridge') {
|
||||||
$gcode = "_BRIDGE_FAN_START\n$gcode";
|
$gcode = ";_BRIDGE_FAN_START\n$gcode";
|
||||||
} elsif ($self->last_speed eq 'bridge') {
|
} elsif ($self->last_speed eq 'bridge') {
|
||||||
$append_bridge_off = 1;
|
$append_bridge_off = 1;
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ sub _Gx {
|
||||||
|
|
||||||
$gcode .= sprintf " ; %s", $comment if $comment && $Slic3r::gcode_comments;
|
$gcode .= sprintf " ; %s", $comment if $comment && $Slic3r::gcode_comments;
|
||||||
if ($append_bridge_off) {
|
if ($append_bridge_off) {
|
||||||
$gcode .= "\n_BRIDGE_FAN_END";
|
$gcode .= "\n;_BRIDGE_FAN_END";
|
||||||
}
|
}
|
||||||
return "$gcode\n";
|
return "$gcode\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -629,9 +629,7 @@ sub export_gcode {
|
||||||
}
|
}
|
||||||
|
|
||||||
# go to layer
|
# go to layer
|
||||||
print $fh $extruder->change_layer($layer);
|
my $layer_gcode = $extruder->change_layer($layer);
|
||||||
|
|
||||||
my $layer_gcode = "";
|
|
||||||
$extruder->elapsed_time(0);
|
$extruder->elapsed_time(0);
|
||||||
|
|
||||||
# extrude skirts
|
# extrude skirts
|
||||||
|
@ -701,10 +699,10 @@ sub export_gcode {
|
||||||
|
|
||||||
# bridge fan speed
|
# bridge fan speed
|
||||||
if (!$Slic3r::cooling || $Slic3r::bridge_fan_speed == 0 || $layer->id < $Slic3r::disable_fan_first_layers) {
|
if (!$Slic3r::cooling || $Slic3r::bridge_fan_speed == 0 || $layer->id < $Slic3r::disable_fan_first_layers) {
|
||||||
$layer_gcode =~ s/^_BRIDGE_FAN_(?:START|END)\n//gm;
|
$layer_gcode =~ s/^;_BRIDGE_FAN_(?:START|END)\n//gm;
|
||||||
} else {
|
} else {
|
||||||
$layer_gcode =~ s/^_BRIDGE_FAN_START\n/ $extruder->set_fan($Slic3r::bridge_fan_speed, 1) /gmex;
|
$layer_gcode =~ s/^;_BRIDGE_FAN_START\n/ $extruder->set_fan($Slic3r::bridge_fan_speed, 1) /gmex;
|
||||||
$layer_gcode =~ s/^_BRIDGE_FAN_END\n/ $extruder->set_fan($fan_speed, 1) /gmex;
|
$layer_gcode =~ s/^;_BRIDGE_FAN_END\n/ $extruder->set_fan($fan_speed, 1) /gmex;
|
||||||
}
|
}
|
||||||
|
|
||||||
print $fh $layer_gcode;
|
print $fh $layer_gcode;
|
||||||
|
|
Loading…
Reference in a new issue