relayrace 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/relayrace.rb +2 -2
  2. metadata +4 -4
data/lib/relayrace.rb CHANGED
@@ -47,8 +47,7 @@ class RelayrAce
47
47
  begin
48
48
  SystemTimer.timeout_after(10) do
49
49
  @serial.write("\r\n")
50
- until @serial.getc == ':' end
51
- @serial.getc # Swallow the next ':'
50
+ 2.times { @serial.getc == ':' }
52
51
  @serial.write("#{cmd}\r\n")
53
52
  end
54
53
  rescue Timeout::Error
@@ -61,6 +60,7 @@ class RelayrAce
61
60
  private
62
61
  def open_serial_port
63
62
  @serial.close if @serial
63
+ sleep 1 # Give the OS a chance to catch up
64
64
  @serial = SerialPort.new(@port, 115200, 8, 1, SerialPort::NONE)
65
65
  @serial.extend(MonitorMixin)
66
66
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relayrace
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mat Trudel
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-22 00:00:00 -04:00
18
+ date: 2010-07-23 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency