From 26c12e1e38570c0a923c0fa16282490bb69b6e8a Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Sat, 19 Nov 2022 23:37:27 -0500 Subject: [PATCH] Adding UI for the tuning step selection. --- htdocs/css/openwebrx.css | 20 ++++++++++++++++---- htdocs/index.html | 16 ++++++++++++++++ htdocs/openwebrx.js | 8 +++++++- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/htdocs/css/openwebrx.css b/htdocs/css/openwebrx.css index cbbacdb..cf6f749 100644 --- a/htdocs/css/openwebrx.css +++ b/htdocs/css/openwebrx.css @@ -667,16 +667,24 @@ img.openwebrx-mirror-img text-align: center; } +.openwebrx-panel-listbox +{ + position: relative; + top: 0px; + width: 95px; + height: 24px; +} + .openwebrx-panel-slider { - position: relative; - top: -2px; - width: 95px; + position: relative; + top: -2px; + width: 95px; } .openwebrx-panel-line { - padding-top: 5px; + padding-top: 5px; } .openwebrx-panel-flex-line { @@ -861,6 +869,10 @@ img.openwebrx-mirror-img height: 27px; } +#openwebrx-tuning-step-listbox { + font-size: 10pt; +} + #openwebrx-cursor-blink { animation: cursor-blink 1s infinite; diff --git a/htdocs/index.html b/htdocs/index.html index 8e121c5..21c07e1 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -206,6 +206,22 @@ +
+ +
+
diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js index 938915d..9a15c13 100644 --- a/htdocs/openwebrx.js +++ b/htdocs/openwebrx.js @@ -834,8 +834,10 @@ function on_ws_recv(evt) { if ('tuning_precision' in config) $('#openwebrx-panel-receiver').demodulatorPanel().setTuningPrecision(config['tuning_precision']); - if ('tuning_step' in config) + if ('tuning_step' in config) { tuning_step = config['tuning_step']; + $('#openwebrx-tuning-step-listbox').val(tuning_step); + } break; case "secondary_config": @@ -1624,6 +1626,10 @@ function sdr_profile_changed() { ws.send(JSON.stringify({type: "selectprofile", params: {profile: value}})); } +function tuning_step_changed() { + tuning_step = parseInt($('#openwebrx-tuning-step-listbox').val()); +} + function nr_changed() { ws.send(JSON.stringify({ "type": "connectionproperties",