fix demodulator buttons

This commit is contained in:
Jakob Ketterl 2019-05-14 23:36:37 +02:00
parent 9812d38eee
commit 5e67f036b4

View File

@ -2526,15 +2526,9 @@ function progressbar_set(obj,val,text,over)
function demodulator_buttons_update()
{
$(".openwebrx-demodulator-button").removeClass("highlighted");
if(secondary_demod) $("#openwebrx-button-dig").addClass("highlighted");
else switch(demodulators[0].subtype)
{
case "nfm":
$("#openwebrx-button-nfm").addClass("highlighted");
break;
case "am":
$("#openwebrx-button-am").addClass("highlighted");
break;
if(secondary_demod) {
$("#openwebrx-button-dig").addClass("highlighted");
} else switch(demodulators[0].subtype) {
case "lsb":
case "usb":
case "cw":
@ -2549,6 +2543,10 @@ function demodulator_buttons_update()
else $("#openwebrx-button-lsb, #openwebrx-button-usb").addClass("highlighted");
}
break;
default:
var mod = demodulators[0].subtype;
$("#openwebrx-button-" + mod).addClass("highlighted");
break;
}
}
function demodulator_analog_replace_last() { demodulator_analog_replace(last_analog_demodulator_subtype); }