Commit 64957c6f authored by Jeffrey Phillips Freeman's avatar Jeffrey Phillips Freeman 💥
Browse files

Fixed a bug where an exception was thrown if reading returned nil.

parent dd1ba05f
......@@ -30,7 +30,11 @@ module Kiss
protected
def read_interface
read_data = @serial.read(@read_bytes)
read_data.map { |c| c.ord }
if read_data
return read_data.map { |c| c.ord }
else
return nil
end
end
protected
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment