Add possibility to set frequency tolerance (initial for jt4 only)

Signed-off-by: Dawid SQ6EMM <sq6emm@hamradio.pl>
This commit is contained in:
Dawid SQ6EMM 2025-02-24 16:52:47 +01:00
parent 14087c23ae
commit f8fb1788ee
3 changed files with 15 additions and 1 deletions

View file

@ -152,6 +152,7 @@ defaultConfig = PropertyLayer(
decoding_queue_workers=2,
decoding_queue_length=10,
wsjt_decoding_depth=3,
wsjt_frequency_tolerance=20,
wsjt_decoding_depths=PropertyLayer(jt65=1),
fst4_enabled_intervals=[15, 30],
fst4w_enabled_intervals=[120, 300],

View file

@ -70,6 +70,11 @@ class DecodingSettingsController(SettingsFormController):
"Default WSJT decoding depth",
infotext="A higher decoding depth will allow more results, but will also consume more cpu",
),
NumberInput(
"wsjt_frequency_tolerance",
"Default WSJT frequency tolerance",
infotext="A higher frequency tolerance will allow more decodes, but will also consume more cpu",
),
WsjtDecodingDepthsInput(
"wsjt_decoding_depths",
"Individual decoding depths",

View file

@ -29,6 +29,14 @@ class WsjtProfile(AudioChopperProfile, metaclass=ABCMeta):
# default when no setting is provided
return 3
def frequency_tolerance(self):
pm = Config.get()
if "wsjt_frequency_tolerance" in pm:
return pm["wsjt_frequency_tolerance"]
# default when no setting is provided
return 20
def getTimestampFormat(self):
if self.getInterval() < 60:
return "%H%M%S"
@ -222,7 +230,7 @@ class JT4Profile(WsjtProfile):
return self.submode
def decoder_commandline(self, file):
return ["jt9", "-4", "-b", str(self.submode), "-d", str(self.decoding_depth()), file]
return ["jt9", "-4", "-b", str(self.submode), "-d", str(self.decoding_depth()), "-F", str(self.frequency_tolerance()), file]
def getMode(self):
return "JT4"