Skip to content

Commit d54a4ad

Browse files
authored
Update adafruit_irremote.py
Fix the decode_bits() method in the object wrapper to return the IRMessage returned by the decode_bits() function. Otherwise decoder.decode_bits() is returning None.
1 parent 6f101fe commit d54a4ad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

adafruit_irremote.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def decode_bits(self, pulses): # pylint: disable=no-self-use
265265
raise IRNECRepeatException()
266266
if isinstance(result, UnparseableIRMessage):
267267
raise IRDecodeException("10 pulses minimum")
268+
return result
268269

269270
def _read_pulses_non_blocking(
270271
self, input_pulses, max_pulse=10000, pulse_window=0.10

0 commit comments

Comments
 (0)