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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7545501e17cf33c467220f9394c81d1ee1b87317
4
- data.tar.gz: c54f8c6507f97a920511a776833e839d8ed3159e
3
+ metadata.gz: 248fe3f8e44d655481dcc7f26c7367507e4741d5
4
+ data.tar.gz: df82381fdd9677680094bf844efcae566c327ffe
5
5
  SHA512:
6
- metadata.gz: 221758cfcacf249417fb5dda43625e158e2eb900b2f563507bd48e205ab84765f4f8eccd25c8e29e8f8688c40a6ad85c01d3fb7a8a6fc0f649d9c0b550ccd6df
7
- data.tar.gz: 34d53d0383d1f8bb468296874f7fc3a5bfe6eb26a9b64d8fe6e2b3da08b61d24b9789a62da4d381df4969588347f6f31e317c936b3de01841f563d3eb29fb496
6
+ metadata.gz: c78bec3db3c730e71b269d7e1123ad54e895049e9d4cfdee3e2db9b6028dc73f6f0dadfae6f072d6aff0b006c7b8d00eac9d9345a4e7d6912a7270d7f2f3ca2a
7
+ data.tar.gz: 811f6208954f7e4f2c0ddd46f53af5388d5288b1f2a5a4bf0fa71085fac127de0f80439c5e43975c22055bdef4154eb19bd41895bbf89562df08c024a2f32fba
@@ -1,5 +1,5 @@
1
1
  module RubySerial
2
2
  unless const_defined?('VERSION')
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -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] = 50
32
- timeouts[:read_total_timeout_multiplier] = 50
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] = 50
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.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-03 00:00:00.000000000 Z
13
+ date: 2014-07-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: ffi