ysard / mi_remote_database

Proof of concept aiming to reproduce and query the infrared code database (IRDB) used by the Xiaomi *Mi Remote* application.
GNU Affero General Public License v3.0
52 stars 8 forks source link

Fix checking odd number of IR burst pairs #6

Closed Biswa96 closed 1 year ago

Biswa96 commented 1 year ago

Example:

>>> ir_code = [9042,4484,579,552,580,567,579,567,544,554]
>>> pattern = Pattern(ir_code, 37990, code_type="raw")
>>> pattern.to_pronto()
WARNING: Burst pairs are not complete: odd number
'0000 006D 0005 0000 0158 00AA 0016 0015 0016 0016 0016 0016 0015 0015'
>>> len(ir_code)
10
ysard commented 1 year ago

Ahah thanks it's a silly mistake :p