add an input for wsjt_decoding_depths
This commit is contained in:
@ -147,8 +147,10 @@ class CompiledAssetsController(GzipMixin, ModificationAwareController):
|
||||
"lib/Header.js",
|
||||
"lib/settings/Input.js",
|
||||
"lib/settings/SdrDevice.js",
|
||||
"lib/settings/MapInput.js",
|
||||
"lib/settings/ImageUpload.js",
|
||||
"lib/settings/BookmarkTable.js",
|
||||
"lib/settings/WsjtDecodingDepthsInput.js",
|
||||
"settings.js",
|
||||
],
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
from owrx.controllers.settings import SettingsFormController, Section
|
||||
from owrx.form import CheckboxInput, NumberInput, DropdownInput, Js8ProfileCheckboxInput, MultiCheckboxInput, Option
|
||||
from owrx.form.wfm import WfmTauValues
|
||||
from owrx.form.wsjt import Q65ModeMatrix
|
||||
from owrx.form.wsjt import Q65ModeMatrix, WsjtDecodingDepthsInput
|
||||
from owrx.wsjt import Fst4Profile, Fst4wProfile
|
||||
|
||||
|
||||
@ -55,6 +55,10 @@ class DecodingSettingsController(SettingsFormController):
|
||||
"Default WSJT decoding depth",
|
||||
infotext="A higher decoding depth will allow more results, but will also consume more cpu",
|
||||
),
|
||||
WsjtDecodingDepthsInput(
|
||||
"wsjt_decoding_depths",
|
||||
"Individual decoding depths",
|
||||
),
|
||||
NumberInput(
|
||||
"js8_decoding_depth",
|
||||
"Js8Call decoding depth",
|
||||
|
@ -1,5 +1,8 @@
|
||||
from owrx.form import Input
|
||||
from owrx.wsjt import Q65Mode, Q65Interval
|
||||
from owrx.modes import Modes
|
||||
import json
|
||||
import html
|
||||
|
||||
|
||||
class Q65ModeMatrix(Input):
|
||||
@ -50,3 +53,17 @@ class Q65ModeMatrix(Input):
|
||||
if in_response(mode, interval)
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
class WsjtDecodingDepthsInput(Input):
|
||||
def render_input(self, value):
|
||||
return """
|
||||
<input type="hidden" class="{classes}" id="{id}" name="{id}" value="{value}">
|
||||
""".format(
|
||||
id=self.id,
|
||||
classes=self.input_classes(),
|
||||
value=html.escape(json.dumps(value)),
|
||||
)
|
||||
|
||||
def input_classes(self):
|
||||
return super().input_classes() + " wsjt-decoding-depths"
|
||||
|
Reference in New Issue
Block a user