Added number of toolchanges into 'Sliced info' statistics

This commit is contained in:
Lukas Matena 2018-09-12 09:28:26 +02:00
parent 961d894218
commit 712fef0669
7 changed files with 27 additions and 7 deletions

View file

@ -1646,14 +1646,15 @@ sub print_info_box_show {
$grid_sizer->AddGrowableCol(1, 1);
$grid_sizer->AddGrowableCol(3, 1);
$print_info_sizer->Add($grid_sizer, 0, wxEXPAND);
my $is_wipe_tower = $self->{print}->total_wipe_tower_filament > 0;
my @info = (
L("Used Filament (m)")
=> $self->{print}->total_wipe_tower_filament > 0 ?
=> $is_wipe_tower ?
sprintf("%.2f (%.2f %s + %.2f %s)" , $self->{print}->total_used_filament / 1000,
($self->{print}->total_used_filament - $self->{print}->total_wipe_tower_filament) / 1000,
L("objects"),
$self->{print}->total_wipe_tower_filament / 1000,
L("wipe_tower")) :
L("wipe tower")) :
sprintf("%.2f" , $self->{print}->total_used_filament / 1000),
L("Used Filament (mm³)")
@ -1661,18 +1662,21 @@ sub print_info_box_show {
L("Used Filament (g)"),
=> sprintf("%.2f" , $self->{print}->total_weight),
L("Cost"),
=> $self->{print}->total_wipe_tower_cost > 0 ?
=> $is_wipe_tower ?
sprintf("%.2f (%.2f %s + %.2f %s)" , $self->{print}->total_cost,
($self->{print}->total_cost - $self->{print}->total_wipe_tower_cost),
L("objects"),
$self->{print}->total_wipe_tower_cost,
L("wipe_tower")) :
L("wipe tower")) :
sprintf("%.2f" , $self->{print}->total_cost),
L("Estimated printing time (normal mode)")
=> $self->{print}->estimated_normal_print_time,
L("Estimated printing time (silent mode)")
=> $self->{print}->estimated_silent_print_time
);
# if there is a wipe tower, insert number of toolchanges info into the array:
splice (@info, 8, 0, L("Number of tool changes") => sprintf("%.d", $self->{print}->m_wipe_tower_number_of_toolchanges)) if ($is_wipe_tower);
while ( my $label = shift @info) {
my $value = shift @info;
next if $value eq "N/A";