Alwyas apply disable_fan_first_layers, even if cooling is disabled, since fan_always_on is applied in that case as well. Update descriptive text and have it appear in case of disabled auto cooling. #1166

This commit is contained in:
Alessandro Ranellucci 2013-05-10 15:09:27 +02:00
parent 993fcd9182
commit bac5093de4
3 changed files with 15 additions and 8 deletions

View file

@ -826,8 +826,8 @@ END
# cooling options
'cooling' => {
label => 'Enable cooling',
tooltip => 'This flag enables all the cooling features.',
label => 'Enable auto cooling',
tooltip => 'This flag enables the automatic cooling logic that adjusts print speed and fan speed according to layer printing time.',
cli => 'cooling!',
type => 'bool',
default => 1,

View file

@ -61,8 +61,8 @@ sub flush {
$1 . sprintf("%.${dec}f", $new_speed < $self->min_print_speed ? $self->min_print_speed : $new_speed)
/gexm;
}
$fan_speed = 0 if $self->layer_id < $self->config->disable_fan_first_layers;
}
$fan_speed = 0 if $self->layer_id < $self->config->disable_fan_first_layers;
$gcode = $self->gcodegen->set_fan($fan_speed) . $gcode;
# bridge fan speed

View file

@ -600,6 +600,15 @@ sub _update_description {
my $config = $self->config;
my $msg = "";
my $fan_other_layers = $config->fan_always_on
? sprintf "will always run at %d%%%s.", $config->min_fan_speed,
($config->disable_fan_first_layers > 1
? " except for the first " . $config->disable_fan_first_layers . " layers"
: $config->disable_fan_first_layers == 1
? " except for the first layer"
: "")
: "will be turned off.";
if ($config->cooling) {
$msg = sprintf "If estimated layer time is below ~%ds, fan will run at 100%% and print speed will be reduced so that no less than %ds are spent on that layer (however, speed will never be reduced below %dmm/s).",
$config->slowdown_below_layer_time, $config->slowdown_below_layer_time, $config->min_print_speed;
@ -607,11 +616,9 @@ sub _update_description {
$msg .= sprintf "\nIf estimated layer time is greater, but still below ~%ds, fan will run at a proportionally decreasing speed between %d%% and %d%%.",
$config->fan_below_layer_time, $config->max_fan_speed, $config->min_fan_speed;
}
if ($config->fan_always_on) {
$msg .= sprintf "\nDuring the other layers, fan will always run at %d%%.", $config->min_fan_speed;
} else {
$msg .= "\nDuring the other layers, fan will be turned off."
}
$msg .= "\nDuring the other layers, fan $fan_other_layers"
} else {
$msg = "Fan $fan_other_layers";
}
$self->{description_line}->SetText($msg);
}