From 2198c00d00415b34e7a6e046f896eea481e96edd Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sat, 25 Apr 2020 17:33:30 +0200 Subject: [PATCH] add js8 settings to web configuration --- owrx/controllers/settings.py | 14 ++++++++++++-- owrx/form/__init__.py | 11 +++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/owrx/controllers/settings.py b/owrx/controllers/settings.py index 527253f..8243d09 100644 --- a/owrx/controllers/settings.py +++ b/owrx/controllers/settings.py @@ -11,6 +11,7 @@ from owrx.form import ( DropdownInput, Option, ServicesCheckboxInput, + Js8ProfileCheckboxInput, ) import logging @@ -145,14 +146,23 @@ class SettingsController(AdminController): ), ), Section( - "WSJT-X settings", + "Decoding settings", NumberInput("decoding_queue_workers", "Number of decoding workers"), NumberInput("decoding_queue_length", "Maximum length of decoding job queue"), NumberInput( "wsjt_decoding_depth", - "WSJT decoding depth", + "Default WSJT decoding depth", infotext="A higher decoding depth will allow more results, but will also consume more cpu", ), + NumberInput( + "js8_decoding_depth", + "Js8Call decoding depth", + infotext="A higher decoding depth will allow more results, but will also consume more cpu", + ), + Js8ProfileCheckboxInput( + "js8_enabled_profiles", + "Js8Call enabled modes" + ), ), Section( "Background decoding", diff --git a/owrx/form/__init__.py b/owrx/form/__init__.py index 2861683..fb7160e 100644 --- a/owrx/form/__init__.py +++ b/owrx/form/__init__.py @@ -201,6 +201,17 @@ class ServicesCheckboxInput(MultiCheckboxInput): super().__init__(id, label, services, infotext) +class Js8ProfileCheckboxInput(MultiCheckboxInput): + def __init__(self, id, label, infotext=None): + profiles = [ + Option("normal", "Normal (15s, 50Hz, ~16WPM)"), + Option("slow", "Slow (30s, 25Hz, ~8WPM"), + Option("fast", "Fast (10s, 80Hz, ~24WPM"), + Option("turbo", "Turbo (6s, 160Hz, ~40WPM"), + ] + super().__init__(id, label, profiles, infotext) + + class DropdownInput(Input): def __init__(self, id, label, options, infotext=None): super().__init__(id, label, infotext=infotext)