implement tuning precision dropdown

This commit is contained in:
Jakob Ketterl 2021-03-24 23:43:19 +01:00
parent 19496d46a3
commit 383c08ed48
1 changed files with 4 additions and 5 deletions

View File

@ -9,7 +9,7 @@ from owrx.form import (
DropdownInput, DropdownInput,
Option, Option,
) )
from owrx.form.converter import WaterfallColorsConverter from owrx.form.converter import WaterfallColorsConverter, IntConverter
from owrx.form.receiverid import ReceiverKeysConverter from owrx.form.receiverid import ReceiverKeysConverter
from owrx.form.gfx import AvatarInput, TopPhotoInput from owrx.form.gfx import AvatarInput, TopPhotoInput
from owrx.form.device import WaterfallLevelsInput from owrx.form.device import WaterfallLevelsInput
@ -126,12 +126,11 @@ class GeneralSettingsController(SettingsFormController):
), ),
Section( Section(
"Display settings", "Display settings",
# TODO: custom input for this? DropdownInput(
NumberInput(
"tuning_precision", "tuning_precision",
"Tuning precision", "Tuning precision",
infotext="Specifies the precision of the frequency tuning display as an exponent of 10, in Hertz. " options=[Option(str(i), "{} Hz".format(10 ** i)) for i in range(0, 6)],
+ "Setting this to 1 means 10Hz precision, 2 means 100Hz precision, etc.", converter=IntConverter()
), ),
), ),
Section( Section(