repeat is hex

darcs-hash:20060624234310-28bda-14a724547ba30575d24d7a982a8100cbb712baf3.gz
This commit is contained in:
hans 2006-06-24 17:43:10 -06:00
parent f2e4c1294a
commit 052f32a3f7

View file

@ -14,13 +14,13 @@ module LIRC
def initialize(str) def initialize(str)
code, repeat, @name, @remote = str.split(' ', 4) code, repeat, @name, @remote = str.split(' ', 4)
@code = code.hex @code = code.hex
@repeat = repeat.to_i @repeat = repeat.hex
end end
def repeat? def repeat?
@repeat > 0 @repeat > 0
end end
def to_s def to_s
sprintf("%016x %02d %s %s", @code, @repeat, @name, @remote) sprintf("%016x %02x %s %s", @code, @repeat, @name, @remote)
end end
end end
end end