X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;f=SCX%2FReader.pm;h=59f7ca3df85f403cf64b2883078824d194b4c756;hb=cd3dd2cbdb007c774c2485a7e14cf12b75249dfd;hp=ff5894d459f115dcac243179bc483e730201ade2;hpb=e85448fbe0a0384457115dc91638aa773fd9c5c0;p=slotcarman.git diff --git a/SCX/Reader.pm b/SCX/Reader.pm index ff5894d..59f7ca3 100644 --- a/SCX/Reader.pm +++ b/SCX/Reader.pm @@ -442,7 +442,8 @@ sub controller_status_packet { my $byte = $bytes[$car]; if ($byte == 0xAA) { - $self->track->car($car)->set_throttle(undef); + $self->track->car($car)->set_throttle(undef, undef, + $self->{last_read_time}); next; } @@ -450,10 +451,9 @@ 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, $backbutton, $self->{last_read_time}); $self->track->car($car)->set_light($light); - $self->track->car($car)->set_backbutton($backbutton); } return $msg;