mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-04-05 06:25:19 +00:00
add some basic infrastructure for hfdl
This commit is contained in:
parent
7eb277ce97
commit
f794f285f3
12 changed files with 118 additions and 31 deletions
|
|
@ -164,8 +164,10 @@ DemodulatorPanel.prototype.updatePanels = function() {
|
|||
$('#openwebrx-panel-digimodes').attr('data-mode', modulation);
|
||||
var mode = Modes.findByModulation(modulation);
|
||||
toggle_panel("openwebrx-panel-digimodes", modulation && (!mode || mode.secondaryFft));
|
||||
// WSJT-X modes share the same panel
|
||||
toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4', 'fst4', 'fst4w', "q65", "msk144"].indexOf(modulation) >= 0);
|
||||
['js8', 'packet', 'pocsag', 'adsb', 'ism'].forEach(function(m) {
|
||||
// these modes come with their own
|
||||
['js8', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl'].forEach(function(m) {
|
||||
toggle_panel('openwebrx-panel-' + m + '-message', modulation === m);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -460,4 +460,40 @@ $.fn.ismMessagePanel = function() {
|
|||
this.data('panel', new IsmMessagePanel(this));
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
|
||||
HfdlMessagePanel = function(el) {
|
||||
MessagePanel.call(this, el);
|
||||
this.initClearTimer();
|
||||
}
|
||||
|
||||
HfdlMessagePanel.prototype = new MessagePanel();
|
||||
|
||||
HfdlMessagePanel.prototype.render = function() {
|
||||
$(this.el).append($(
|
||||
'<table>' +
|
||||
'<thead><tr>' +
|
||||
'<th class="model">Model</th>' +
|
||||
'<th class="id">ID</th>' +
|
||||
'<th class="channel">Channel</th>' +
|
||||
'<th class="data">Data</th>' +
|
||||
'</tr></thead>' +
|
||||
'<tbody></tbody>' +
|
||||
'</table>'
|
||||
));
|
||||
};
|
||||
|
||||
HfdlMessagePanel.prototype.supportsMessage = function(message) {
|
||||
return message['mode'] === 'HFDL';
|
||||
};
|
||||
|
||||
HfdlMessagePanel.prototype.pushMessage = function(message) {
|
||||
console.info(message);
|
||||
};
|
||||
|
||||
$.fn.hfdlMessagePanel = function() {
|
||||
if (!this.data('panel')) {
|
||||
this.data('panel', new HfdlMessagePanel(this));
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue