Fixing minor issues.

This commit is contained in:
Marat Fayzullin 2023-05-28 22:56:30 -04:00
parent 363083318c
commit dcdba777b9
1 changed files with 4 additions and 2 deletions

View File

@ -5,16 +5,18 @@ from csdr.module import PopenModule
class Rtl433Module(PopenModule):
def __init__(self, sampleRate: int = 48000, jsonOutput: bool = False):
self.sampleRate = sampleRate
self.jsonOutput = jsonOutput
super().__init__()
def getCommand(self):
return [
"rtl_433", "-r", "cs16:-", "-s", str(self.sampleRate),
"-F", "json" if jsonOutput else "kv",
"-F", "json" if self.jsonOutput else "kv",
# These need 48kHz, 24kHz is not enough for them
# "-R", "-80", "-R", "-149", "-R", "-154", "-R", "-160",
# "-R", "-161", "-R", "-167", "-R", "-178",
"-R", "64", "-A",
# "-R", "64",
"-A",
]
def getInputFormat(self) -> Format: