diff --git a/htdocs/lib/DemodulatorPanel.js b/htdocs/lib/DemodulatorPanel.js
index 0ae61904..ae040d2d 100644
--- a/htdocs/lib/DemodulatorPanel.js
+++ b/htdocs/lib/DemodulatorPanel.js
@@ -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);
});
diff --git a/htdocs/lib/MessagePanel.js b/htdocs/lib/MessagePanel.js
index e1f71629..b2d4ae47 100644
--- a/htdocs/lib/MessagePanel.js
+++ b/htdocs/lib/MessagePanel.js
@@ -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($(
+ '
' +
+ '' +
+ '| Model | ' +
+ 'ID | ' +
+ 'Channel | ' +
+ 'Data | ' +
+ '
' +
+ '' +
+ '
'
+ ));
+};
+
+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');
};
\ No newline at end of file
diff --git a/htdocs/openwebrx.js b/htdocs/openwebrx.js
index 52a403f8..fa5ffdee 100644
--- a/htdocs/openwebrx.js
+++ b/htdocs/openwebrx.js
@@ -859,14 +859,10 @@ function on_ws_recv(evt) {
break;
case 'secondary_demod':
var value = json['value'];
- var panels = [
- $("#openwebrx-panel-wsjt-message").wsjtMessagePanel(),
- $('#openwebrx-panel-packet-message').packetMessagePanel(),
- $('#openwebrx-panel-pocsag-message').pocsagMessagePanel(),
- $('#openwebrx-panel-adsb-message').adsbMessagePanel(),
- $('#openwebrx-panel-ism-message').ismMessagePanel(),
- $("#openwebrx-panel-js8-message").js8()
- ];
+ var panels = ['wsjt', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl'].map(function(id) {
+ return $('#openwebrx-panel-' + id + '-message')[id + 'MessagePanel']();
+ });
+ panels.push($('#openwebrx-panel-js8-message').js8());
if (!panels.some(function(panel) {
if (!panel.supportsMessage(value)) return false;
panel.pushMessage(value);
@@ -1467,11 +1463,9 @@ function secondary_demod_init() {
.mousedown(secondary_demod_canvas_container_mousedown)
.mouseenter(secondary_demod_canvas_container_mousein)
.mouseleave(secondary_demod_canvas_container_mouseleave);
- $('#openwebrx-panel-wsjt-message').wsjtMessagePanel();
- $('#openwebrx-panel-packet-message').packetMessagePanel();
- $('#openwebrx-panel-pocsag-message').pocsagMessagePanel();
- $('#openwebrx-panel-adsb-message').adsbMessagePanel();
- $('#openwebrx-panel-ism-message').ismMessagePanel();
+ ['wsjt', 'packet', 'pocsag', 'adsb', 'ism', 'hfdl'].forEach(function(id){
+ $('#openwebrx-panel-' + id + '-message')[id + 'MessagePanel']();
+ })
$('#openwebrx-panel-js8-message').js8();
}
diff --git a/owrx/dsp.py b/owrx/dsp.py
index 8645e622..175703c2 100644
--- a/owrx/dsp.py
+++ b/owrx/dsp.py
@@ -624,6 +624,9 @@ class DspManager(SdrSourceEventClient, ClientDemodulatorSecondaryDspEventClient)
elif mod == "ism":
from csdr.chain.rtl433 import Rtl433
return Rtl433()
+ elif mod == "hfdl":
+ from csdr.chain.dumphfdl import DumpHFDL
+ return DumpHFDL()
def setSecondaryDemodulator(self, mod):
demodulator = self._getSecondaryDemodulator(mod)
diff --git a/owrx/feature.py b/owrx/feature.py
index 772fc320..da1e6319 100644
--- a/owrx/feature.py
+++ b/owrx/feature.py
@@ -86,6 +86,7 @@ class FeatureDetector(object):
"drm": ["dream"],
"dump1090": ["dump1090"],
"ism": ["rtl_433"],
+ "dumphfdl": ["dumphfdl"],
}
def feature_availability(self):
@@ -602,3 +603,9 @@ class FeatureDetector(object):
Debian and Ubuntu based systems should be able to install the package `rtl-433` from the package manager.
"""
return self.command_is_runnable("rtl_433 -h")
+
+ def has_dumphfdl(self):
+ """
+ TODO
+ """
+ return self.command_is_runnable("dumphfdl --version")
diff --git a/owrx/hfdl/dumphfdl.py b/owrx/hfdl/dumphfdl.py
new file mode 100644
index 00000000..406dd845
--- /dev/null
+++ b/owrx/hfdl/dumphfdl.py
@@ -0,0 +1,18 @@
+from pycsdr.modules import ExecModule
+from pycsdr.types import Format
+
+
+class DumpHFDLModule(ExecModule):
+ def __init__(self):
+ super().__init__(
+ Format.COMPLEX_FLOAT,
+ Format.CHAR,
+ [
+ "dumphfdl",
+ "--iq-file", "-",
+ "--sample-format", "CF32",
+ "--sample-rate", "12000",
+ "--output", "decoded:json:file:path=-",
+ "0",
+ ]
+ )
diff --git a/owrx/ism/rtl433.py b/owrx/ism/rtl433.py
index 4f83e3bd..5ca46ef2 100644
--- a/owrx/ism/rtl433.py
+++ b/owrx/ism/rtl433.py
@@ -1,11 +1,5 @@
from pycsdr.modules import ExecModule
from pycsdr.types import Format
-from csdr.module import LineBasedModule
-import json
-
-import logging
-
-logger = logging.getLogger(__name__)
class Rtl433Module(ExecModule):
@@ -17,12 +11,3 @@ class Rtl433Module(ExecModule):
)
-class JsonParser(LineBasedModule):
- def process(self, line):
- try:
- msg = json.loads(line.decode())
- msg["mode"] = "ISM"
- logger.debug(msg)
- return msg
- except json.JSONDecodeError:
- logger.exception("error parsing rtl433 json")
diff --git a/owrx/modes.py b/owrx/modes.py
index 9261aab3..f6ba8ab3 100644
--- a/owrx/modes.py
+++ b/owrx/modes.py
@@ -181,6 +181,14 @@ class Modes(object):
bandpass=None,
requirements=["ism"],
squelch=False,
+ ),
+ DigitalMode(
+ "hfdl",
+ "HFDL",
+ underlying=["empty"],
+ bandpass=Bandpass(0, 3000),
+ requirements=["dumphfdl"],
+ squelch=False,
)
]