mirror of
https://github.com/jketterl/openwebrx.git
synced 2026-04-04 14:08:38 +00:00
add dumpvdl2 basic infrastructure
This commit is contained in:
parent
f794f285f3
commit
e934a3935c
9 changed files with 102 additions and 8 deletions
|
|
@ -77,6 +77,7 @@
|
|||
<div class="openwebrx-panel openwebrx-message-panel" id="openwebrx-panel-adsb-message" style="display: none; width: 619px;" data-panel-name="adsb-message"></div>
|
||||
<div class="openwebrx-panel openwebrx-message-panel" id="openwebrx-panel-ism-message" style="display: none; width: 619px;" data-panel-name="ism-message"></div>
|
||||
<div class="openwebrx-panel openwebrx-message-panel" id="openwebrx-panel-hfdl-message" style="display: none; width: 619px;" data-panel-name="hfdl-message"></div>
|
||||
<div class="openwebrx-panel openwebrx-message-panel" id="openwebrx-panel-vdl2-message" style="display: none; width: 619px;" data-panel-name="vdl2-message"></div>
|
||||
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-m17" style="display: none;" data-panel-name="metadata-m17">
|
||||
<div class="openwebrx-meta-slot">
|
||||
<div class="openwebrx-meta-user-image">
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ DemodulatorPanel.prototype.updatePanels = function() {
|
|||
// 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);
|
||||
// these modes come with their own
|
||||
['js8', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl'].forEach(function(m) {
|
||||
['js8', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl', 'vdl2'].forEach(function(m) {
|
||||
toggle_panel('openwebrx-panel-' + m + '-message', modulation === m);
|
||||
});
|
||||
|
||||
|
|
@ -378,6 +378,6 @@ DemodulatorPanel.prototype.setTuningPrecision = function(precision) {
|
|||
$.fn.demodulatorPanel = function(){
|
||||
if (!this.data('panel')) {
|
||||
this.data('panel', new DemodulatorPanel(this));
|
||||
};
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
|
|
@ -473,10 +473,7 @@ 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>' +
|
||||
'<th class="todo">TODO</th>' +
|
||||
'</tr></thead>' +
|
||||
'<tbody></tbody>' +
|
||||
'</table>'
|
||||
|
|
@ -488,7 +485,12 @@ HfdlMessagePanel.prototype.supportsMessage = function(message) {
|
|||
};
|
||||
|
||||
HfdlMessagePanel.prototype.pushMessage = function(message) {
|
||||
console.info(message);
|
||||
var $b = $(this.el).find('tbody');
|
||||
$b.append($(
|
||||
'<tr>' +
|
||||
'<td class="todo">' + JSON.stringify(message) + '</td>' +
|
||||
'</tr>'
|
||||
));
|
||||
};
|
||||
|
||||
$.fn.hfdlMessagePanel = function() {
|
||||
|
|
@ -496,4 +498,43 @@ $.fn.hfdlMessagePanel = function() {
|
|||
this.data('panel', new HfdlMessagePanel(this));
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
|
||||
Vdl2MessagePanel = function(el) {
|
||||
MessagePanel.apply(this, el);
|
||||
this.initClearTimer();
|
||||
}
|
||||
|
||||
Vdl2MessagePanel.prototype = new MessagePanel();
|
||||
|
||||
Vdl2MessagePanel.prototype.render = function() {
|
||||
$(this.el).append($(
|
||||
'<table>' +
|
||||
'<thead><tr>' +
|
||||
'<th class="todo">TODO</th>' +
|
||||
'</tr></thead>' +
|
||||
'<tbody></tbody>' +
|
||||
'</table>'
|
||||
));
|
||||
};
|
||||
|
||||
Vdl2MessagePanel.prototype.supportsMessage = function(message) {
|
||||
return message['mode'] === 'VDL2';
|
||||
};
|
||||
|
||||
Vdl2MessagePanel.prototype.pushMessage = function(message) {
|
||||
var $b = $(this.el).find('tbody');
|
||||
$b.append($(
|
||||
'<tr>' +
|
||||
'<td class="todo">' + JSON.stringify(message) + '</td>' +
|
||||
'</tr>'
|
||||
));
|
||||
this.scrollToBottom();
|
||||
};
|
||||
|
||||
$.fn.vdl2MessagePanel = function() {
|
||||
if (!this.data('panel')) {
|
||||
this.data('panel', new Vdl2MessagePanel(this));
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
|
|
@ -859,7 +859,7 @@ function on_ws_recv(evt) {
|
|||
break;
|
||||
case 'secondary_demod':
|
||||
var value = json['value'];
|
||||
var panels = ['wsjt', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl'].map(function(id) {
|
||||
var panels = ['wsjt', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl', 'vdl2'].map(function(id) {
|
||||
return $('#openwebrx-panel-' + id + '-message')[id + 'MessagePanel']();
|
||||
});
|
||||
panels.push($('#openwebrx-panel-js8-message').js8());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue