1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-13 05:06:30 +04:00

[IR] universal remote additions (#3922)

* multiple new additions
  Hisense K321UW, Soniq E55V13A, Soniq E32W13B and 2 others
* updated with proper names
  Viano STV65UHD4K
  Hisense K321UW
  Hisense EN2B27
  Soniq E55V13A
  Soniq E32W13B
* format tv.ir
* Update tv.ir
* new universal ac additions
  Maytag M6X06F2A
  Panasonic CS-E9HKR
* new universal audio additions
  Sony MHC_GSX75
  Elac EA101EQ-G
  Philips FW750C
  Pioneer VSX-D1-S
* remove final # audio.ir
* Scripts: update deprecated methods use in python scripts
* Scripts: add comment reading support to fff, preserve comments in infrared cleanup script
* Scripts: improved infrared files cleanup script
* Scripts: add missing new line at the end of file in infrared file cleanup script
* Infrared: cleanup universal remotes

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
jay candel
2024-10-03 00:28:24 +08:00
committed by GitHub
parent 09a7cc2b46
commit 3c93761d1d
8 changed files with 345 additions and 190 deletions

View File

@@ -32,6 +32,16 @@ class FlipperFormatFile:
raise Exception("Unexpected line: not `key:value`")
return data[0].strip(), data[1].strip()
def readComment(self):
if self.cursor == len(self.lines):
raise EOFError()
line = self.lines[self.cursor].strip()
if line.startswith("#"):
self.cursor += 1
return line[1:].strip()
else:
return None
def readKey(self, key: str):
k, v = self.readKeyValue()
if k != key:
@@ -67,7 +77,7 @@ class FlipperFormatFile:
self.writeLine("")
def writeComment(self, text: str):
if text:
if text and len(text):
self.writeLine(f"# {text}")
else:
self.writeLine("#")
@@ -104,3 +114,4 @@ class FlipperFormatFile:
def save(self, filename: str):
with open(filename, "w", newline="\n") as file:
file.write("\n".join(self.lines))
file.write("\n")