]> www.fi.muni.cz Git - slotcarman.git/commitdiff
Timekeeping and GUI development.
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 8 Dec 2010 22:26:56 +0000 (23:26 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 8 Dec 2010 22:26:56 +0000 (23:26 +0100)
SCX/Car.pm
SCX/GUI.pm
SCX/Reader.pm
SCX/Track.pm
gui.pl
protocol.txt
slotcarman.glade

index c6e2aaaa5d974d96f24c712e8ad279dadac9528d..9f58b5b720f79edd614fc7c853914838403f200f 100644 (file)
@@ -18,6 +18,7 @@ sub new {
                avg_lap  => 0,
                car_img  => $args->{car_img},
                id       => $args->{id},
+               order    => $args->{id},
                track    => $args->{track},
        };
 
@@ -42,17 +43,20 @@ sub same {
 }
 
 sub set_throttle {
-       my ($self, $val) = @_;
+       my ($self, $val, $time) = @_;
 
        return if $self->same('throttle', $val);
 
        if ($self->track->{start_in_progress} && $val) {
                $self->{early_start} = 1;
-               $self->gui->set_driver('Early start!');
+               $self->gui->set_name($self->{order}, 'Early start!');
        }
 
-       if ($self->{in_pit_lane} && defined $val && $val > 3) {
-               $self->leave_pit_lane;
+       if ($self->{in_pit_lane} && defined $val) {
+               $self->{last_finish_time} = $time;
+               if ($val > 3) {
+                       $self->leave_pit_lane;
+               }
        }
 
        $self->gui->set_throttle($self->{order}, $val);
@@ -84,28 +88,40 @@ sub set_model {
 sub set_lap {
        my ($self, $lap_nr) = @_;
 
+       if (!$lap_nr) {
+               $self->{avg_lap} = undef;
+               $self->{lap} = $lap_nr;
+               $self->gui->set_avg_lap($self->{order}, undef);
+               $self->gui->set_lap($self->{order}, $lap_nr);
+               return;
+       }
+               
        return if $self->same('lap', $lap_nr);
-       $self->gui->set_lap($self->{order}, defined $lap_nr ? $lap_nr : '--');
+       $self->gui->set_lap($self->{order}, $lap_nr);
        if ($self->track->{race_running} && $self->{lap} > 1) {
                my $now = $self->{last_finish_time};
                my $avg = ($now - $self->track->{race_running_since})
                        / ($self->{lap} - 1);
                $self->{avg_lap} = $avg;
-               $self->gui->set_avg_lap($self->{order}, $avg);
-       } else {
-               $self->gui->set_avg_lap($self->{order}, undef);
+               $self->gui->set_avg_lap($self->{order}, $self->{avg_lap});
        }
 }
 
 sub set_laptime {
        my ($self, $lap_time) = @_;
 
+       if (!defined $lap_time) {
+               $self->gui->set_best_lap($self->{order}, undef);
+               $self->{best_lap} = undef;
+       }
+
        return if $self->same('laptime', $lap_time);
 
        $self->gui->set_laptime($self->{order}, $lap_time);
 
        if (defined $lap_time) {
                if ($lap_time > 1.0 && !$self->{in_pit_lane}
+                       && $self->track->{race_running}
                        && (!defined $self->{best_lap}
                                || $self->{best_lap} > $lap_time
                        )) {
@@ -117,9 +133,6 @@ sub set_laptime {
                        $self->gui->set_best_lap($self->{order}, $lap_time,
                                $global);
                }
-       } else {
-               $self->gui->set_best_lap($self->{order}, $lap_time);
-               $self->{best_lap} = undef;
        }
 }
 
@@ -136,7 +149,7 @@ sub enter_pit_lane {
        return if $self->{in_pit_lane};
 
        $self->{in_pit_lane} = 1;
-       $self->gui->enter_pit_lane;
+       $self->gui->enter_pit_lane($self->{order});
 }
 
 sub leave_pit_lane {
@@ -145,7 +158,7 @@ sub leave_pit_lane {
        return if !$self->{in_pit_lane};
 
        $self->{in_pit_lane} = 0;
-       $self->gui->leave_pit_lane;
+       $self->gui->leave_pit_lane($self->{order});
 }
 
 sub set_order {
@@ -154,13 +167,16 @@ sub set_order {
        $self->{order} = $pos;
        
        $self->gui->set_name($self->{order}, $self->{driver});
-       $self->gui->set_car_icon($self->{order}, $self->{car_icon});
+       $self->gui->set_car_icon($self->{order}, $self->{car_img});
        $self->gui->set_throttle($self->{order}, $self->{throttle});
        $self->gui->set_lap($self->{order}, $self->{lap});
        $self->gui->set_laptime($self->{order}, $self->{laptime});
        $self->gui->set_best_lap($self->{order}, $self->{best_lap});
        $self->gui->set_avg_lap($self->{order}, $self->{avg_lap});
        $self->gui->set_fuel($self->{order}, $self->{fuel});
+       $self->gui->set_car_id($self->{order}, $self->{id} + 1);
+       $self->gui->set_distance($self->{order},
+               $self->{time_diff}, $self->{lap_diff});
        if ($self->{in_pit_lane}) {
                $self->gui->enter_pit_lane;
        }
@@ -173,28 +189,65 @@ sub reset {
        $self->set_laptime(undef);
        $self->{in_pit_lane} = 0;
        $self->{early_start} = undef;
+       $self->{last_finish_time} = undef;
+       $self->{first_finish_time} = undef;
+       $self->{time_diff} = undef;
+       $self->{lap_diff} = undef;
 }
 
 sub finish_line {
        my ($self, $time, $regular) = @_;
 
-       return undef
-               if defined $self->{last_finish_time}
-               && $time - $self->{last_finish_time} < 2;
+       if (defined $self->{last_finish_time} 
+               && $time - $self->{last_finish_time} < 2) {
+
+               $self->{last_finish_time} = $time;
+               if ($regular && $self->{in_pit_lane}) {
+                       $self->leave_pit_lane;
+               }
+               return undef;
+       }
 
        if ($regular) {
-               if (defined $self->{last_finish_time}) {
-                       $self->set_laptime($time - $self->{last_finish_time});
+               if (defined $self->{first_finish_time}) {
+                       $self->set_laptime($time - $self->{first_finish_time});
                }
        } else {
                $self->enter_pit_lane;
        }
 
-       $self->{last_finish_time} = $time;
-       $self->set_lap(++$self->{lap});
+       $self->{first_finish_time} = $self->{last_finish_time} = $time;
+
+       if ($self->track->{race_running}) {
+               $self->set_lap($self->{lap} + 1);
+       }
 
        return 1;
 }
 
+sub recalc_distance {
+       my ($self, $lap_first, $time_first) = @_;
+
+       return if !defined $lap_first || !defined $self->{lap}
+               || !defined $time_first || !defined $self->{first_finish_time};
+
+       my $time;
+
+       if ($self->{lap} == $lap_first) {
+               if ($self->{first_finish_time} == $time_first) {
+                       $time = $self->{first_finish_time}
+                               - $self->track->{race_running_since};
+               } else {
+                       $self->{time_diff} = $self->{first_finish_time}
+                               - $time_first;
+               }
+       } else {
+               $self->{lap_diff} = $lap_first - $self->{lap};
+       }
+
+       $self->gui->set_distance($self->{order}, $time,
+               $self->{lap_diff}, $self->{time_diff});
+}
+
 1;
 
index c073560dce160881098a93395c3ba8b7756a6010..2f1aa5af7b08349f5038afd1c2f59167fb2d3f1f 100755 (executable)
@@ -113,9 +113,9 @@ sub load_all_images {
        $self->{fuel_images} = [
                        load_image_set('img/fuel%d.svg', 8, int(0.6 * $h))
        ];
-       $self->{car_images} = load_image_dir('img/SCXCars', $h),
-       $self->{semaphore_images} => [
-                       load_image_set('img/semaphore%d.svg', 5, 2 * $h)
+       $self->{car_images} = load_image_dir('img/SCXCars', $h);
+       $self->{semaphore_images} = [
+                       load_image_set('img/semaphore%d.svg', 5, 1.5 * $h)
        ];
 };
 
@@ -214,9 +214,27 @@ sub set_car_icon {
 sub set_lap {
        my ($self, $row, $text) = @_;
 
+       $text = '--' if !defined $text;
+
        $self->set_label('label_lap', $row, $text, 'lap');
 }
 
+sub set_distance {
+       my ($self, $row, $time, $lap_diff, $time_diff) = @_;
+
+       my $text = '--';
+
+       if (defined $time) {
+               $text = format_race_time($time);
+       } elsif (defined $time_diff) {
+               $text = '−' . format_lap_time($time_diff);
+       } elsif (defined $lap_diff) {
+               $text = '−' . $lap_diff . ' laps';
+       }
+
+       $self->set_label('label_distance', $row, $text);
+}
+
 sub set_laptime {
        my ($self, $row, $text) = @_;
 
@@ -241,6 +259,12 @@ sub set_name {
        $self->set_label('label_name', $row, $text);
 }
 
+sub set_car_id {
+       my ($self, $row, $text) = @_;
+
+       $self->set_label('label_car_id', $row, $text);
+}
+
 sub enter_pit_lane {
        my ($self, $row) = @_;
        $self->set_label('label_laptime', $row, 'PIT');
@@ -299,8 +323,8 @@ sub format_race_time {
        $seconds -= 60 * $mins;
 
        return $hours
-               ? sprintf('%d:%02d:%05.2f', $hours, $mins, $seconds)
-               : sprintf('%d:%05.2f', $mins, $seconds);
+               ? sprintf('%d:%02d:%04.1f', $hours, $mins, $seconds)
+               : sprintf('%d:%04.1f', $mins, $seconds);
 }
 
 sub format_lap_time {
index 7498e0a179c430aa082ff0da3cf37f6e4b9ecc0a..ff5894d459f115dcac243179bc483e730201ade2 100644 (file)
@@ -276,9 +276,9 @@ sub race_setup_packet {
 
        $self->track->race_setup($bytes[0] == 0x00
                ? 0
-               : $bytes[1] & 0x0F * 256
-                       + $bytes[2] & 0x0F * 16
-                       + $bytes[3] & 0x0F);
+               : ($bytes[1] & 0x0F) * 256
+                       + ($bytes[2] & 0x0F) * 16
+                       + ($bytes[3] & 0x0F));
 
        return $msg;
 }
@@ -409,16 +409,11 @@ sub finish_line_packet {
                push @cars_finished, $i if $byte == 0xE7;
        }
 
-       my $processed;
-       for my $car (@cars_finished) {
-               $processed ||= $self->track->car($car)->finish_line(
-                       $self->{last_read_time}, $regular
-               );
-       }
-
-       if ($processed) {
-               $self->track->recalc_order;
-       }
+       $self->track->finish_line(
+               $self->{last_read_time},
+               $regular,
+               @cars_finished
+       );
 
        return $msg;
 }
@@ -455,7 +450,8 @@ sub controller_status_packet {
                my $backbutton = !($byte & 0x10);
                my $throttle = $byte & 0x0f;
 
-               $self->track->car($car)->set_throttle($throttle);
+               $self->track->car($car)->set_throttle($throttle,
+                       $self->{last_read_time});
                $self->track->car($car)->set_light($light);
                $self->track->car($car)->set_backbutton($backbutton);
        }
index 09db4b708690c753f4b2e9f549fb893c8c1745ce..2feed611c7b5394d482e1e6db8db0cbbf3cf398d 100644 (file)
@@ -39,7 +39,8 @@ sub car { return shift->{cars}->[shift]; }
 sub race_start {
        my ($self) = @_;
 
-       return if $self->{race_running} || $self->{start_in_progress};
+       return if $self->{race_running} || $self->{start_in_progress}
+               || $self->{qualification_running};
        $self->{race_running} = 0;
        $self->{start_in_progress} = 1;
        $self->{semaphore} = 0;
@@ -64,14 +65,13 @@ sub semaphore_step {
                $self->{race_running_since} = gettimeofday;
                $self->{start_in_progress} = undef;
                $self->{gui}->show_semaphore(0);
-               Glib::Timeout->add(3*$SEMAPHORE_STEP, \&semaphore_step, $self);
+               Glib::Timeout->add($SEMAPHORE_STEP, \&semaphore_step, $self);
        } else {
                $self->{gui}->show_semaphore(undef);
                $self->{semaphore} = undef;
        }
        return FALSE;
 }
-
 sub race_end {
        my ($self) = @_;
 
@@ -81,13 +81,14 @@ sub race_end {
 sub race_setup {
        my ($self, $rounds) = @_;
 
+       $self->{round} = 0;
        if ($rounds) {
-               $self->{gui}->rounds('0/' . $rounds);
                $self->{race_rounds} = $rounds;
        } else {
-               $self->{gui}->rounds('0');
                $self->{race_rounds} = 0;
        }
+
+       $self->print_rounds;
        $self->{best_lap} = undef;
 
        $self->{gui}->show_semaphore(undef);
@@ -96,18 +97,44 @@ sub race_setup {
 
        $self->{gui}->time(undef);
        $self->{gui}->best_lap(undef);
+}
+
+sub reset {
+       my ($self) = @_;
+
+       $self->{race_running} = 0;
+       $self->{start_in_progress} = 0;
+       $self->{best_lap} = undef;
+       $self->{round} = 0;
+
+       $self->print_rounds;
+       $self->{gui}->best_lap(undef);
+       $self->{gui}->time(undef);
 
        for my $car (0..5) {
                $self->car($car)->reset;
-               $self->car($car)->set_order($car);
        }
 }
 
+sub print_rounds {
+       my ($self) = @_;
+
+       $self->{gui}->rounds($self->{qualification_running}
+               ? 'Qualification'
+               : $self->{race_rounds}
+               ? $self->{round} . '/' . $self->{race_rounds}
+               : $self->{round}
+       );
+}
+
 sub check_best_lap {
        my ($self, $time, $who) = @_;
 
        return if !defined $time || $time == 0;
 
+#      print "Check_best_lap $time $who vs ",
+#              defined $self->{best_lap} ? $self->{best_lap} : 'undef',
+#              "\n";
        if (!defined $self->{best_lap}
                || $time < $self->{best_lap}) {
                $self->{best_lap} = $time;
@@ -127,7 +154,7 @@ sub qualification_start {
        }
 
        $self->{qualification_running} = 1;
-       $self->{gui}->lap('Qualification');
+       $self->{gui}->rounds('Qualification');
        $self->{gui}->time(undef);
        $self->{gui}->best_lap(undef);
 }
@@ -136,14 +163,64 @@ sub packet_received {
        my ($self, $time) = @_;
 
        if ($self->{race_running}) {
-               $self->gui->time($time - $self->{race_running_since});
+               $self->{gui}->time($time - $self->{race_running_since});
        }
 }
 
 sub recalc_order {
-       my ($self) = @_;
+       my ($self, $now) = @_;
+
+       return if !$self->{race_running};
+
+       my @laps;
+       my @times;
+       for my $id (0..5) {
+               $laps[$id]  = $self->car($id)->{lap} // -1;
+               $times[$id] = $self->car($id)->{first_finish_time} // $now;
+       }
+
+       my @new_order = sort {
+               $laps[$b] <=> $laps[$a]
+               ||
+               $times[$a] <=> $times[$b]
+               ||
+               $a <=> $b;
+       } (0..5);
+
+       my $lap_max = $laps[$new_order[0]];
+       if (defined $lap_max && $lap_max != $self->{round}
+               && (!$self->{race_rounds}
+                       || $lap_max <= $self->{race_rounds})) {
+               $self->{round} = $lap_max;
+               $self->print_rounds;
+       }
 
-       # FIXME: Implement me
+       for my $id (0..5) {
+               my $car = $new_order[$id];
+               if ($self->car($car)->{order} != $id) {
+                       $self->car($car)->set_order($id);
+               }
+       }
+       return ($new_order[0], $lap_max, $times[$new_order[0]]);
+}
+
+sub finish_line {
+       my ($self, $time, $regular, @cars) = @_;
+
+       my @processed;
+       for my $car (@cars) {
+               push @processed, $car
+                        if $self->car($car)->finish_line($time, $regular);
+        }
+
+        if (@processed) {
+                my ($first_car, $lap_max, $time_min)
+                       = $self->recalc_order($time);
+
+               for my $car (@processed) {
+                       $self->car($car)->recalc_distance($lap_max, $time_min);
+               }
+       }
 }
 
 1;
diff --git a/gui.pl b/gui.pl
index 6d3295ee0fa8dcecf48960206d8b38dfdfb74c15..acdb94fd23154bae49e3f1d6ed7027c925068058 100755 (executable)
--- a/gui.pl
+++ b/gui.pl
@@ -10,7 +10,7 @@ use SCX::GUI;
 use SCX::Track;
 use SCX::Reader;
 
-my $gui = SCX::GUI->new({ img_height => 80 });
+my $gui = SCX::GUI->new({ img_height => 100 });
 my $track = SCX::Track->new({ gui => $gui });
 
 my $reader;
@@ -22,6 +22,10 @@ eval {
        });
 };
 
+if ($@) {
+       print STDERR "Demo mode only: $@";
+}
+
 $track->car(0)->set_model('F1 Ferrari');
 $track->car(1)->set_model('F1 McLaren');
 $track->car(2)->set_model('F1 Williams');
index 80c377858797182bd092541ea1176ad7eba67fb5..f9bca11e6a6a41b17efddadca0a426affaacf04f 100644 (file)
@@ -228,6 +228,7 @@ Example:
 55 EE 02 00 E7 01 00 00 CF # Car 2 drives through pit lane
 55 EE 82 FF E7 FF FF Ff 90 # Car 2 enters pit lane too fast
 55 EE F0 F0 E7 AA AA AA B1 # Car 2 enters pit lane
+55 EE 83 78 E7 14 50 AA 04 # Car 2 enters pit lane too fast?
 
 
 
index cccbcf67256bf873b292d53e7e4435df3b0d1f59..2f002d74f5ef9f93c9cbd0b9915152e5000e2333 100644 (file)
             <property name="n_rows">13</property>
             <property name="n_columns">8</property>
             <child>
-              <object class="GtkLabel" id="label_pos1">
+              <object class="GtkLabel" id="label_car_id1">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;1&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label_pos2">
+              <object class="GtkLabel" id="label_car_id2">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;2&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label_pos3">
+              <object class="GtkLabel" id="label_car_id3">
                 <property name="visible">True</property>
                 <property name="yalign">0.50999999046325684</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;3&lt;/span&gt;</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label_pos4">
+              <object class="GtkLabel" id="label_car_id4">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;4&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label_pos5">
+              <object class="GtkLabel" id="label_car_id5">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;5&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
               </packing>
             </child>
             <child>
-              <object class="GtkLabel" id="label_pos6">
+              <object class="GtkLabel" id="label_car_id6">
                 <property name="visible">True</property>
                 <property name="label" translatable="yes">&lt;span weight="ultrabold" size="large"&gt;6&lt;/span&gt;</property>
                 <property name="use_markup">True</property>
                 <property name="y_options">GTK_EXPAND | GTK_SHRINK | GTK_FILL</property>
               </packing>
             </child>
-            <child>
-              <object class="GtkLabel" id="label_lap1">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="use_markup">True</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">2</property>
-                <property name="bottom_attach">3</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label_lap2">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">4</property>
-                <property name="bottom_attach">5</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label_lap3">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">6</property>
-                <property name="bottom_attach">7</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label_lap4">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">8</property>
-                <property name="bottom_attach">9</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label_lap5">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">10</property>
-                <property name="bottom_attach">11</property>
-              </packing>
-            </child>
-            <child>
-              <object class="GtkLabel" id="label_lap6">
-                <property name="visible">True</property>
-                <property name="label" translatable="yes">label</property>
-                <property name="justify">right</property>
-                <property name="width_chars">12</property>
-              </object>
-              <packing>
-                <property name="left_attach">4</property>
-                <property name="right_attach">5</property>
-                <property name="top_attach">12</property>
-                <property name="bottom_attach">13</property>
-              </packing>
-            </child>
             <child>
               <object class="GtkLabel" id="label_name2">
                 <property name="visible">True</property>
               </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status1">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status2">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status3">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">6</property>
+                <property name="bottom_attach">7</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status4">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">8</property>
+                <property name="bottom_attach">9</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status5">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">10</property>
+                <property name="bottom_attach">11</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkImage" id="image_status6">
+                <property name="visible">True</property>
+                <property name="stock">gtk-missing-image</property>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="right_attach">2</property>
+                <property name="top_attach">12</property>
+                <property name="bottom_attach">13</property>
+              </packing>
             </child>
             <child>
-              <placeholder/>
+              <object class="GtkLabel" id="label4">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">Id</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox8">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance1">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">2</property>
+                <property name="bottom_attach">3</property>
+              </packing>
             </child>
             <child>
               <placeholder/>
             <child>
               <placeholder/>
             </child>
+            <child>
+              <object class="GtkVBox" id="vbox9">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance2">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">4</property>
+                <property name="bottom_attach">5</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox10">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap3">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance3">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">6</property>
+                <property name="bottom_attach">7</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox11">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap4">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance4">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">8</property>
+                <property name="bottom_attach">9</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox12">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap5">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance5">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">10</property>
+                <property name="bottom_attach">11</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkVBox" id="vbox13">
+                <property name="visible">True</property>
+                <child>
+                  <object class="GtkLabel" id="label_lap6">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                  </object>
+                  <packing>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkLabel" id="label_distance6">
+                    <property name="visible">True</property>
+                    <property name="label" translatable="yes">label</property>
+                    <property name="width_chars">24</property>
+                  </object>
+                  <packing>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">4</property>
+                <property name="right_attach">5</property>
+                <property name="top_attach">12</property>
+                <property name="bottom_attach">13</property>
+              </packing>
+            </child>
           </object>
           <packing>
             <property name="position">3</property>