From e0dbfd342d8cc001d65cd2038ac7767dc2330313 Mon Sep 17 00:00:00 2001 From: ntruchsess Date: Thu, 26 Jun 2014 23:39:45 +0200 Subject: [PATCH] fix a crucial bug in parser skipping single 0x30 bytes --- Changes | 2 ++ lib/Device/Firmata.pm | 4 ++-- lib/Device/Firmata/Platform.pm | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index bb6ced8..697ddd1 100644 --- a/Changes +++ b/Changes @@ -37,3 +37,5 @@ Revision history for Device-Firmata 0.58 2014.06.26 - Yanick Champoux cosmetic change to POD for CPAN +0.59 2014.06.26 - Norbert Truchsess + Fix a bug in the parser incorrectly skipping single 0x30 bytes \ No newline at end of file diff --git a/lib/Device/Firmata.pm b/lib/Device/Firmata.pm index f64f598..5f34618 100644 --- a/lib/Device/Firmata.pm +++ b/lib/Device/Firmata.pm @@ -15,11 +15,11 @@ Device::Firmata - Perl interface to Firmata for the arduino platform. =head1 VERSION -Version 0.58 +Version 0.59 =cut -our $VERSION = '0.58'; +our $VERSION = '0.59'; our $DEBUG = 0; diff --git a/lib/Device/Firmata/Platform.pm b/lib/Device/Firmata/Platform.pm index 17e1269..6a93d12 100644 --- a/lib/Device/Firmata/Platform.pm +++ b/lib/Device/Firmata/Platform.pm @@ -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; }