8000 Merge pull request #20 from cyrilchristin/samsumg-ir_tx-addr-patch · peterhinch/micropython_ir@61a0df9 · GitHub 8000
[go: up one dir, main page]

Skip to content

Commit 61a0df9

Browse files
authored
Merge pull request #20 from cyrilchristin/samsumg-ir_tx-addr-patch
Update IR_TX Samsung32 Address Format
2 parents cfb4d7a + d7ff5be commit 61a0df9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ir_tx/nec.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ def tx(self, addr, data, _): # Ignore toggle
2727
else:
2828
self.append(9000, 4500)
2929
if addr < 256: # Short address: append complement
30-
addr |= ((addr ^ 0xff) << 8)
30+
if self.samsung:
31+
addr |= addr << 8
32+
else:
33+
addr |= ((addr ^ 0xff) << 8)
3134
for _ in range(16):
3235
self._bit(addr & 1)
3336
addr >>= 1

0 commit comments

Comments
 (0)
0