Fix variable typos in rfrecv related methods.

bug/bundler_fix
Leon Jacobs 2017-03-22 15:44:22 +02:00
parent df181c1792
commit c58e9acadd
No known key found for this signature in database
GPG Key ID: AE1F25096C0CB06B
2 changed files with 2 additions and 1 deletions

View File

@ -135,6 +135,7 @@ module RFTransceiver
def rfrecv(timeout = -1, blocksize = -1) def rfrecv(timeout = -1, blocksize = -1)
return "" if not is_rf? return "" if not is_rf?
self.index ||= 0 self.index ||= 0
opts = {}
opts["timeout"] = timeout if not timeout == -1 opts["timeout"] = timeout if not timeout == -1
opts["blocksize"] = blocksize if not blocksize == -1 opts["blocksize"] = blocksize if not blocksize == -1
client.rftransceiver.rfrecv(self.index, opts) client.rftransceiver.rfrecv(self.index, opts)

View File

@ -106,7 +106,7 @@ class RFTransceiver < Extension
end end
if opt.has_key? "blocksize" if opt.has_key? "blocksize"
request += "&" if not first request += "&" if not first
request += "blocksize=#{blocksize}" request += "blocksize=#{opt['blocksize']}"
end end
end end
data = client.send_request(request) data = client.send_request(request)