diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js
index ae040d2d..8292338a 100644
--- a/htdocs/lib/DemodulatorPanel.js
+++ b/htdocs/lib/DemodulatorPanel.js
@@ -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');
};
\ No newline at end of file
diff --git a/htdocs/lib/MessagePanel.js b/htdocs/lib/MessagePanel.js
index b2d4ae47..f9023d29 100644
--- a/htdocs/lib/MessagePanel.js
+++ b/htdocs/lib/MessagePanel.js
@@ -473,10 +473,7 @@ HfdlMessagePanel.prototype.render = function() {
$(this.el).append($(
'
' +
'' +
- '| Model | ' +
- 'ID | ' +
- 'Channel | ' +
- 'Data | ' +
+ 'TODO | ' +
'
' +
'' +
'
'
@@ -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($(
+ '
' +
+ '| ' + JSON.stringify(message) + ' | ' +
+ '
'
+ ));
};
$.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($(
+ '
' +
+ '' +
+ '| TODO | ' +
+ '
' +
+ '' +
+ '
'
+ ));
+};
+
+Vdl2MessagePanel.prototype.supportsMessage = function(message) {
+ return message['mode'] === 'VDL2';
+};
+
+Vdl2MessagePanel.prototype.pushMessage = function(message) {
+ var $b = $(this.el).find('tbody');
+ $b.append($(
+ '
' +
+ '| ' + JSON.stringify(message) + ' | ' +
+ '
'
+ ));
+ this.scrollToBottom();
+};
+
+$.fn.vdl2MessagePanel = function() {
+ if (!this.data('panel')) {
+ this.data('panel', new Vdl2MessagePanel(this));
+ }
+ return this.data('panel');
};
\ No newline at end of file
diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js
index fa5ffdee..a2df2d8f 100644
--- a/htdocs/openwebrx.js
+++ b/htdocs/openwebrx.js
@@ -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());
diff --git a/owrx/dsp.py b/owrx/dsp.py
index 175703c2..5dd59410 100644
--- a/owrx/dsp.py
+++ b/owrx/dsp.py
@@ -627,6 +627,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
elif mod == "hfdl":
from csdr.chain.dumphfdl import DumpHFDL
return DumpHFDL()
+ elif mod == "vdl2":
+ from csdr.chain.dumpvdl2 import DumpVDL2
+ return DumpVDL2()
def setSecondaryDemodulator(self, mod):
demodulator = self._getSecondaryDemodulator(mod)
diff --git a/owrx/feature.py b/owrx/feature.py
index da1e6319..bf755713 100644
--- a/owrx/feature.py
+++ b/owrx/feature.py
@@ -87,6 +87,7 @@ class FeatureDetector(object):
"dump1090": ["dump1090"],
"ism": ["rtl_433"],
"dumphfdl": ["dumphfdl"],
+ "dumpvdl2": ["dumpvdl2"],
}
def feature_availability(self):
@@ -609,3 +610,9 @@ class FeatureDetector(object):
TODO
"""
return self.command_is_runnable("dumphfdl --version")
+
+ def has_dumpvdl2(self):
+ """
+ TODO
+ """
+ return self.command_is_runnable("dumpvdl2 --version")
diff --git a/owrx/modes.py b/owrx/modes.py
index f6ba8ab3..b1ab983e 100644
--- a/owrx/modes.py
+++ b/owrx/modes.py
@@ -189,6 +189,14 @@ class Modes(object):
bandpass=Bandpass(0, 3000),
requirements=["dumphfdl"],
squelch=False,
+ ),
+ DigitalMode(
+ "vdl2",
+ "VDL2",
+ underlying=["empty"],
+ bandpass=Bandpass(-12500, 12500),
+ requirements=["dumpvdl2"],
+ squelch=False,
)
]
diff --git a/owrx/vdl2/dumpvdl2.py b/owrx/vdl2/dumpvdl2.py
new file mode 100644
index 00000000..9f08dc1f
--- /dev/null
+++ b/owrx/vdl2/dumpvdl2.py
@@ -0,0 +1,17 @@
+from pycsdr.modules import ExecModule
+from pycsdr.types import Format
+
+
+class DumpVDL2Module(ExecModule):
+ def __init__(self):
+ super().__init__(
+ Format.COMPLEX_SHORT,
+ Format.CHAR,
+ [
+ "dumpvdl2",
+ "--iq-file", "-",
+ "--oversample", "1",
+ "--sample-format", "S16_LE",
+ "--output", "decoded:json:file:path=-",
+ ]
+ )