Closed Wemmy0 closed 4 months ago
Only duplicates removed, nothing missing
Comparing files with python script: original projectors.ir | new projectors.ir
Original: 197
New: 196
Only empty line missing
Process finished with exit code 0
Script used:
def parse_ir_file(path):
with open(path, "r") as file:
data = file.readlines()
new = list(data)
for line in data:
if "name: " in line:
break
else:
new.remove(line)
return new
def process(ir):
data = parse_ir_file(ir)
codes = []
temp = ()
for line in data:
if "#" in line:
codes.append(temp)
temp = ()
else:
temp += (line,)
return list(set(codes))
old = process("original projectors.ir")
new = process("new projectors.ir")
print(f"Original: {len(old)}")
print(f"New: {len(new)}")
for i in old:
if i not in new:
if i:
print("#### MISSING ####")
for l in i:
print(l, end='')
else:
print("Only empty line missing")
Uploaded firmware to flipper and projectors.ir
all works as expected but significantly faster.
Power
command gone from taking 48s -> 22s (122 -> 65 codes)
@Wemmy0 unleashed developer @xMasterX saw this and told me that duplicated signals are intentional: most projectors require 2 button presses to confirm shutdown. I reverted this PR, and only kept the new codes you had added, of which one is doubled for the same reason
Ah that makes a lot of sense and explains why there where so many
What's new
Removed more duplicates from the
Projectors.ir
universal remoteFor the reviewer