sub bus_free_time_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('bus free time', @bytes)
+ $self->strange_packet('bus_free_time', @bytes)
if $bytes[2] != 0xF0
|| $bytes[3] != 0xF0
|| $bytes[4] != 0xF0
sub car_programming_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('car programming', @bytes)
+ $self->strange_packet('car_programming', @bytes)
if ($bytes[0] & 0xF8) != 0 || ($bytes[0] & 0x07) > 5
|| $bytes[1] != 0xFE
|| $bytes[2] != 0xFF
sub car_lap_time_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('car lap time', @bytes)
+ $self->strange_packet('car_lap_time', @bytes)
if $bytes[0] > 5
|| $bytes[1] & 0x01
|| $bytes[2] & 0x01
sub race_setup_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('race setup')
+ $self->strange_packet('race_setup', @bytes)
if ($bytes[0] != 0x00 && $bytes[0] != 0xFF)
|| $bytes[1] & 0xF0
|| $bytes[2] & 0xF0
sub fuel_level_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('fuel level')
+ $self->strange_packet('fuel_level', @bytes)
if ($bytes[0] >> 4) > 8
|| ($bytes[0] & 0x0F) > 8
|| ($bytes[1] >> 4) > 8
sub brake_set_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('brake set')
+ $self->strange_packet('brake_set', @bytes)
if ($bytes[0] > 5)
|| ($bytes[1] != 0x00 && $bytes[1] != 0x02 && $bytes[1] != 0x04)
|| $bytes[2] != 0x83
sub qualification_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('qualification')
+ $self->strange_packet('qualification', @bytes)
if $bytes[0] & 0xF0
|| $bytes[1] & 0xF0
|| $bytes[2] & 0xF0
sub end_of_race_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('end of race')
+ $self->strange_packet('end_of_race', @bytes)
if $bytes[0] != 0xFF
|| $bytes[1] != 0xFF
|| $bytes[2] != 0xFF
sub race_start_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('race start')
+ $self->strange_packet('race_start', @bytes)
if $bytes[0] != 0x00
|| $bytes[1] != 0xAA
|| $bytes[2] != 0xAA
sub display_change_packet {
my ($self, @bytes) = @_;
- $self->strange_packet('display change')
+ $self->strange_packet('display_change', @bytes)
if $bytes[0] & 0xFE
|| $bytes[1] != 0xFF
|| $bytes[2] != 0xFF
&& $byte != 0xFE
}
- $self->strange_packet('finish line')
+ $self->strange_packet('finish_line', @bytes)
if $fail;
my $regular = 1;
|| ($byte & 0x0F) > 12
}
- $self->strange_packet('controller status')
+ $self->strange_packet('controller_status', @bytes)
if $fail;
my @ctrl_data;