From 7a0c934af5d3221a1bc4ae3275a6e6b2e8e71bca Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 27 Feb 2021 22:44:48 +0100 Subject: [PATCH] use frequency input for the other inputs, too --- owrx/form/__init__.py | 7 ++++--- owrx/source/__init__.py | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/owrx/form/__init__.py b/owrx/form/__init__.py index f603738..0d2c201 100644 --- a/owrx/form/__init__.py +++ b/owrx/form/__init__.py @@ -322,8 +322,8 @@ class ModesInput(DropdownInput): class FrequencyInput(Input): - def __init__(self, id, label): - super().__init__(id, label) + def __init__(self, id, label, infotext=None): + super().__init__(id, label, infotext=infotext) def defaultConverter(self): return IntConverter() @@ -337,7 +337,7 @@ class FrequencyInput(Input): def render_input(self, value): append = """
- @@ -347,6 +347,7 @@ class FrequencyInput(Input):
""".format( id=self.id, + disabled="disabled" if self.disabled else "", ) return """ diff --git a/owrx/source/__init__.py b/owrx/source/__init__.py index 317fe18..f1107ac 100644 --- a/owrx/source/__init__.py +++ b/owrx/source/__init__.py @@ -494,10 +494,9 @@ class SdrDeviceDescription(object): "services", "Run background services on this device", ), - NumberInput( + FrequencyInput( "lfo_offset", "Oscilator offset", - append="Hz", infotext="Use this when the actual receiving frequency differs from the frequency to be tuned on the" + " device.
Formula: Center frequency + oscillator offset = sdr tune frequency", ), @@ -505,7 +504,7 @@ class SdrDeviceDescription(object): SchedulerInput("scheduler", "Scheduler"), FrequencyInput("center_freq", "Center frequency"), NumberInput("samp_rate", "Sample rate", append="S/s"), - NumberInput("start_freq", "Initial frequency", append="Hz"), + FrequencyInput("start_freq", "Initial frequency"), ModesInput("start_mod", "Initial modulation"), NumberInput("initial_squelch_level", "Initial squelch level", append="dBFS"), ]