From c3b2d2548dccd0df67e2cde48f9f28d670fd5de2 Mon Sep 17 00:00:00 2001 From: Aleksey Timin Date: Wed, 10 Aug 2011 03:14:50 +0600 Subject: [PATCH] Fixed issue #11 --- NEWS.md | 5 +++++ lib/rmodbus/rtu.rb | 2 +- lib/rmodbus/version.rb | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index a517051..a652712 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +2011-08-10 Release 1.0.4 +==================================== +1. Fixed issue [#11](https://github.com/flipback/rmodbus/issues/9) + + 2011-07-17 Release 1.0.3 ==================================== diff --git a/lib/rmodbus/rtu.rb b/lib/rmodbus/rtu.rb index bfa0c7c..149a3a1 100644 --- a/lib/rmodbus/rtu.rb +++ b/lib/rmodbus/rtu.rb @@ -38,7 +38,7 @@ def read_rtu_response(io) when 22 then msg += io.read(8) when 0x80..0xff then - msg += io.read(4) + msg += io.read(3) else raise ModBus::Errors::IllegalFunction, "Illegal function: #{function_code}" end diff --git a/lib/rmodbus/version.rb b/lib/rmodbus/version.rb index 1276c96..b3eb867 100644 --- a/lib/rmodbus/version.rb +++ b/lib/rmodbus/version.rb @@ -13,5 +13,5 @@ # GNU General Public License for more details. module ModBus # Package version - VERSION = '1.0.4dev' + VERSION = '1.0.4' end \ No newline at end of file