rubyserial 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rubyserial/version.rb +1 -1
- data/lib/rubyserial/windows.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 248fe3f8e44d655481dcc7f26c7367507e4741d5
|
4
|
+
data.tar.gz: df82381fdd9677680094bf844efcae566c327ffe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78bec3db3c730e71b269d7e1123ad54e895049e9d4cfdee3e2db9b6028dc73f6f0dadfae6f072d6aff0b006c7b8d00eac9d9345a4e7d6912a7270d7f2f3ca2a
|
7
|
+
data.tar.gz: 811f6208954f7e4f2c0ddd46f53af5388d5288b1f2a5a4bf0fa71085fac127de0f80439c5e43975c22055bdef4154eb19bd41895bbf89562df08c024a2f32fba
|
data/lib/rubyserial/version.rb
CHANGED
data/lib/rubyserial/windows.rb
CHANGED
@@ -16,7 +16,7 @@ class Serial
|
|
16
16
|
err = RubySerial::Win32.GetCommState @fd, dcb
|
17
17
|
if err == 0
|
18
18
|
raise RubySerial::Exception, RubySerial::Win32::ERROR_CODES[FFI.errno]
|
19
|
-
end
|
19
|
+
end
|
20
20
|
dcb[:baudrate] = baude_rate
|
21
21
|
dcb[:bytesize] = data_bits
|
22
22
|
dcb[:stopbits] = RubySerial::Win32::DCB::ONESTOPBIT
|
@@ -24,19 +24,19 @@ class Serial
|
|
24
24
|
err = RubySerial::Win32.SetCommState @fd, dcb
|
25
25
|
if err == 0
|
26
26
|
raise RubySerial::Exception, RubySerial::Win32::ERROR_CODES[FFI.errno]
|
27
|
-
end
|
27
|
+
end
|
28
28
|
end
|
29
29
|
|
30
30
|
RubySerial::Win32::CommTimeouts.new.tap do |timeouts|
|
31
|
-
timeouts[:read_interval_timeout] =
|
32
|
-
timeouts[:read_total_timeout_multiplier] =
|
31
|
+
timeouts[:read_interval_timeout] = 10
|
32
|
+
timeouts[:read_total_timeout_multiplier] = 1
|
33
33
|
timeouts[:read_total_timeout_constant] = 10
|
34
|
-
timeouts[:write_total_timeout_multiplier] =
|
34
|
+
timeouts[:write_total_timeout_multiplier] = 1
|
35
35
|
timeouts[:write_total_timeout_constant] = 10
|
36
36
|
err = RubySerial::Win32.SetCommTimeouts @fd, timeouts
|
37
37
|
if err == 0
|
38
38
|
raise RubySerial::Exception, RubySerial::Win32::ERROR_CODES[FFI.errno]
|
39
|
-
end
|
39
|
+
end
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
@@ -71,7 +71,7 @@ class Serial
|
|
71
71
|
err = RubySerial::Win32.WriteFile(@fd, buff, buff.size, count, nil)
|
72
72
|
if err == 0
|
73
73
|
raise RubySerial::Exception, RubySerial::Win32::ERROR_CODES[FFI.errno]
|
74
|
-
end
|
74
|
+
end
|
75
75
|
end
|
76
76
|
|
77
77
|
def close
|
@@ -80,7 +80,7 @@ class Serial
|
|
80
80
|
raise RubySerial::Exception, RubySerial::Win32::ERROR_CODES[FFI.errno]
|
81
81
|
else
|
82
82
|
@open = false
|
83
|
-
end
|
83
|
+
end
|
84
84
|
end
|
85
85
|
|
86
86
|
def closed?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubyserial
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Zankich
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-07-
|
13
|
+
date: 2014-07-07 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: ffi
|