X-Git-Url: https://vault307.fbx.one/gitweb/micorpython_ir.git/blobdiff_plain/3b6cfaf15ad930c34b0d7f87c6a841ea651ccccb..c1fd11d742e67a6863c8f09c4a181772e371d136:/ir_rx/sony.py?ds=sidebyside diff --git a/ir_rx/sony.py b/ir_rx/sony.py index 9c9147a..1050356 100644 --- a/ir_rx/sony.py +++ b/ir_rx/sony.py @@ -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: