make the frontend resume when an sdr device becomes present

This commit is contained in:
Jakob Ketterl
2021-03-21 00:14:18 +01:00
parent 8fa1796037
commit acee318dae
4 changed files with 25 additions and 0 deletions

View File

@ -800,6 +800,12 @@ function on_ws_recv(evt) {
return '<option value="' + profile['id'] + '">' + profile['name'] + "</option>";
}).join(""));
$('#openwebrx-sdr-profiles-listbox').val(currentprofile.toString());
// this is a bit hacky since it only makes sense if the error is actually "no sdr devices"
// the only other error condition for which the overlay is used right now is "too many users"
// so there shouldn't be a problem here
if (json['value'].keys()) {
$('#openwebrx-error-overlay').hide();
}
break;
case "features":
Modes.setFeatures(json['value']);
@ -836,6 +842,7 @@ function on_ws_recv(evt) {
var $overlay = $('#openwebrx-error-overlay');
$overlay.find('.errormessage').text(json['value']);
$overlay.show();
$("#openwebrx-panel-receiver").demodulatorPanel().stopDemodulator();
break;
case 'secondary_demod':
secondary_demod_push_data(json['value']);