Time estimate shown in GUI as formatted string / Write to file made by class GCode's private methods

This commit is contained in:
Enrico Turri 2017-12-14 09:18:28 +01:00
parent 20234c94ee
commit 0fe855cd6d
7 changed files with 146 additions and 141 deletions

View file

@ -434,7 +434,7 @@ sub new {
fil_mm3 => "Used Filament (mm^3)",
fil_g => "Used Filament (g)",
cost => "Cost",
time => "Estimated printing time (min)",
time => "Estimated printing time",
);
while (my $field = shift @info) {
my $label = shift @info;
@ -1428,7 +1428,7 @@ sub on_export_completed {
$self->{"print_info_cost"}->SetLabel(sprintf("%.2f" , $self->{print}->total_cost));
$self->{"print_info_fil_g"}->SetLabel(sprintf("%.2f" , $self->{print}->total_weight));
$self->{"print_info_fil_mm3"}->SetLabel(sprintf("%.2f" , $self->{print}->total_extruded_volume));
$self->{"print_info_time"}->SetLabel(sprintf("%.2f" , $self->{print}->estimated_print_time));
$self->{"print_info_time"}->SetLabel($self->{print}->estimated_print_time);
$self->{"print_info_fil_m"}->SetLabel(sprintf("%.2f" , $self->{print}->total_used_filament / 1000));
$self->{"print_info_box_show"}->(1);