Don't emit temperature commands if standby temperature delta is zero

This commit is contained in:
Alessandro Ranellucci 2014-05-18 23:56:00 +02:00
parent 038076e040
commit a00f6c72ed

View File

@ -591,11 +591,13 @@ sub set_extruder {
$gcode .= $self->travel_to($standby_point); $gcode .= $self->travel_to($standby_point);
} }
my $temp = defined $self->layer && $self->layer->id == 0 if ($self->config->standby_temperature_delta != 0) {
? $self->extruder->first_layer_temperature my $temp = defined $self->layer && $self->layer->id == 0
: $self->extruder->temperature; ? $self->extruder->first_layer_temperature
# we assume that heating is always slower than cooling, so no need to block : $self->extruder->temperature;
$gcode .= $self->set_temperature($temp + $self->config->standby_temperature_delta, 0); # we assume that heating is always slower than cooling, so no need to block
$gcode .= $self->set_temperature($temp + $self->config->standby_temperature_delta, 0);
}
} }
# set the new extruder # set the new extruder
@ -612,7 +614,7 @@ sub set_extruder {
$gcode .= $self->reset_e; $gcode .= $self->reset_e;
# set the new extruder to the operating temperature # set the new extruder to the operating temperature
if ($self->config->ooze_prevention) { if ($self->config->ooze_prevention && $self->config->standby_temperature_delta != 0) {
my $temp = defined $self->layer && $self->layer->id == 0 my $temp = defined $self->layer && $self->layer->id == 0
? $self->extruder->first_layer_temperature ? $self->extruder->first_layer_temperature
: $self->extruder->temperature; : $self->extruder->temperature;