Skip to content

Commit

Permalink
fix ir limitations for NEC protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
apatrushev committed Aug 29, 2023
1 parent dd15f55 commit 3319d08
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/pyflipper/lib/ir.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ def tx(self, protocol: str, hex_address: str, hex_command: str) -> None:
assert protocol in self.PROTOCOLS, f"Available protocols: {self.PROTOCOLS}"
assert is_hexstring(hex_address), "hex_address must be hexstring"
assert is_hexstring(hex_command), "hex_command must be hexstring"
assert len(hex_address.replace(' ', '')) == 8 and len(hex_command.replace(
' ', '')) == 8, "hex_address and hex_command must be 4 bytes long each"
address = ' '.join(hex_address[i:i+2] for i in range(0, len(hex_address), 2)) if " " not in hex_address else hex_address
command = ' '.join(hex_command[i:i+2] for i in range(0, len(hex_command), 2)) if " " not in hex_command else hex_command
self._serial_wrapper.send(f"ir tx {protocol} {address} {command}")
Expand Down

0 comments on commit 3319d08

Please sign in to comment.