2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-07 16:59:18 +00:00

FRM: fix a crucial bug in perl-firmata parser skipping single 0x30 bytes on fast machines

git-svn-id: https://svn.fhem.de/fhem/trunk@6169 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess 2014-06-26 21:59:33 +00:00
parent ee4be3246f
commit dd27510cbb
2 changed files with 22 additions and 19 deletions

View File

@ -15,11 +15,11 @@ Device::Firmata - Perl interface to Firmata for the arduino platform.
=head1 VERSION
Version 0.56
Version 0.59
=cut
our $VERSION = '0.56';
our $VERSION = '0.59';
our $DEBUG = 0;
@ -27,11 +27,14 @@ our $DEBUG = 0;
use strict;
use warnings;
use Device::Firmata::Constants qw/ :all /;
use Device::Firmata;
$|++;
use Time::HiRes 'sleep';
$|++;
my $led_pin = 13;
my $device = Device::Firmata->open('/dev/ttyUSB0') or die "Could not connect to Firmata Server";

View File

@ -843,8 +843,8 @@ sub poll {
# --------------------------------------------------
my $self = shift;
my $buf = $self->{io}->data_read(2048) or return;
my $messages = $self->{protocol}->message_data_receive($buf);
my $buf = $self->{io}->data_read(2048);
my $messages = $self->{protocol}->message_data_receive($buf) or return;
$self->messages_handle($messages);
return $messages;
}