+ ($bytes[3] & 0x0F);
$self->log_cmd('race_setup', $rounds);
- $self->track->race_setup($rounds);
+ $self->track->race_setup($rounds, $self->{last_read_time});
return $msg;
}
if $bytes[0] & 0xF0
|| $bytes[1] & 0xF0
|| $bytes[2] & 0xF0
- || $bytes[3] > 5
+ || $bytes[3] > 6
|| $bytes[4] != 0xFF
|| $bytes[5] != 0xFF;
- $self->log_cmd('qualification_start');
- $self->track->qualification_start;
+ my $rounds = ($bytes[0] & 0x0F) * 256
+ + ($bytes[1] & 0x0F) * 16
+ + ($bytes[2] & 0x0F);
+ my $cars = $bytes[3];
+ $self->log_cmd('qualification_start', $rounds, $cars);
+ $self->track->qualification_setup($rounds, $cars,
+ $self->{last_read_time});
return $msg;
}
|| $bytes[5] != 0xAA;
$self->log_cmd('race_start');
- $self->track->race_start;
+ $self->track->race_start($self->{last_read_time});
return $msg;
}