keep more parameters on the server side

This commit is contained in:
Jakob Ketterl
2020-04-26 18:45:41 +02:00
parent 449b3b3986
commit 26321ab68b
6 changed files with 106 additions and 123 deletions

View File

@ -15,9 +15,8 @@ var Modes = {
},
updateModePanel:function() {
var available = this.modes.filter(function(m){ return m.isAvailable(); });
var normalModes = available.filter(function(m){ return !m.digimode; });
var digiModes = available.filter(function(m){ return m.digimode; });
var normalModes = available.filter(function(m){ return m.type === 'analog'; });
var digiModes = available.filter(function(m){ return m.type === 'digimode'; });
var html = []
@ -63,8 +62,14 @@ var Modes = {
var Mode = function(json){
this.modulation = json.modulation;
this.name = json.name;
this.digimode = json.digimode;
this.type = json.type;
this.requirements = json.requirements;
if (json.bandpass) {
this.bandpass = json.bandpass;
}
if (this.type === 'digimode') {
this.underlying = json.underlying;
}
};
Mode.prototype.isAvailable = function(){