update profile dropdown box on changes

This commit is contained in:
Jakob Ketterl
2019-10-04 22:01:07 +02:00
parent 3e25f1ec42
commit b80fd9c023
3 changed files with 23 additions and 3 deletions

View File

@ -1158,6 +1158,7 @@ debug_ws_data_received=0;
debug_ws_time_start = 0;
max_clients_num=0;
client_num = 0;
var currentprofile;
var COMPRESS_FFT_PAD_N=10; //should be the same as in csdr.c
@ -1210,6 +1211,9 @@ function on_ws_recv(evt)
}
}
waterfall_clear();
currentprofile = config.profile_id;
$('#openwebrx-sdr-profiles-listbox').val(currentprofile);
break;
case "secondary_config":
window.secondary_fft_size = json.value.secondary_fft_size;
@ -1241,6 +1245,9 @@ function on_ws_recv(evt)
listbox.innerHTML = json.value.map(function(profile){
return '<option value="' + profile.id + '">' + profile.name + "</option>";
}).join("");
if (currentprofile) {
$('#openwebrx-sdr-profiles-listbox').val(currentprofile);
}
break;
case "features":
for (var feature in json.value) {