]> vault307.fbx.one Git - micorpython_ir.git/blobdiff - ir_rx/sony.py
Release 0.1 Various bugfixes and improvements.
[micorpython_ir.git] / ir_rx / sony.py
index 9c9147a709d1fcb2a4419e319d5eddbfdd064d7b..1050356d710db12bb1394c067f7a13e86adc58b2 100644 (file)
@@ -37,12 +37,11 @@ class SONY_ABC(IR_RX):  # Abstract base class
             val = 0  # Data received, LSB 1st
             x = 2
             bit = 1
-            while x < nedges - 2:
+            while x <= nedges - 2:
                 if ticks_diff(self._times[x + 1], self._times[x]) > 900:
                     val |= bit
                 bit <<= 1
                 x += 2
-
             cmd = val & 0x7f  # 7 bit command
             val >>= 7
             if nedges < 42: