Permalink
Browse files

Removed unneeded reset method

  • Loading branch information...
1 parent f9672b4 commit 2e98c743077e3bb51923b6e3bade36bfc41a6302 @ndbroadbent committed Jul 1, 2010
Showing with 1 addition and 9 deletions.
  1. +1 −9 octopus.rb
View
@@ -9,15 +9,6 @@ class Octopus
attr_accessor :port, :baud, :tag_length
def initialize(port = "/dev/ttyUSB0", baud = 9600, tag_length = 14)
@port, @baud, @tag_length = port, baud, tag_length
- # Resets the reader output to 'RS232 interface' on startup
- self.reset
- end
-
- def reset
- # Sends the 'setup' string to reset the reader.
- SerialPort.open @port, @baud do |sp|
- sp.write "55AA0102C455AA\n"
- end
end
def read
@@ -32,6 +23,7 @@ def read
elsif !v.empty?
tag_id += v.strip
end
+ tag_id.gsub!("~", "").gsub!("\n", "")
return tag_id if tag_id.size >= @tag_length
end
end

0 comments on commit 2e98c74

Please sign in to comment.