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:
parent
993fcd9182
commit
bac5093de4
3 changed files with 15 additions and 8 deletions
|
@ -826,8 +826,8 @@ END
|
||||||
|
|
||||||
# cooling options
|
# cooling options
|
||||||
'cooling' => {
|
'cooling' => {
|
||||||
label => 'Enable cooling',
|
label => 'Enable auto cooling',
|
||||||
tooltip => 'This flag enables all the cooling features.',
|
tooltip => 'This flag enables the automatic cooling logic that adjusts print speed and fan speed according to layer printing time.',
|
||||||
cli => 'cooling!',
|
cli => 'cooling!',
|
||||||
type => 'bool',
|
type => 'bool',
|
||||||
default => 1,
|
default => 1,
|
||||||
|
|
|
@ -61,8 +61,8 @@ sub flush {
|
||||||
$1 . sprintf("%.${dec}f", $new_speed < $self->min_print_speed ? $self->min_print_speed : $new_speed)
|
$1 . sprintf("%.${dec}f", $new_speed < $self->min_print_speed ? $self->min_print_speed : $new_speed)
|
||||||
/gexm;
|
/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;
|
$gcode = $self->gcodegen->set_fan($fan_speed) . $gcode;
|
||||||
|
|
||||||
# bridge fan speed
|
# bridge fan speed
|
||||||
|
|
|
@ -600,6 +600,15 @@ sub _update_description {
|
||||||
my $config = $self->config;
|
my $config = $self->config;
|
||||||
|
|
||||||
my $msg = "";
|
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) {
|
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).",
|
$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;
|
$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%%.",
|
$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;
|
$config->fan_below_layer_time, $config->max_fan_speed, $config->min_fan_speed;
|
||||||
}
|
}
|
||||||
if ($config->fan_always_on) {
|
$msg .= "\nDuring the other layers, fan $fan_other_layers"
|
||||||
$msg .= sprintf "\nDuring the other layers, fan will always run at %d%%.", $config->min_fan_speed;
|
} else {
|
||||||
} else {
|
$msg = "Fan $fan_other_layers";
|
||||||
$msg .= "\nDuring the other layers, fan will be turned off."
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
$self->{description_line}->SetText($msg);
|
$self->{description_line}->SetText($msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue