add owrx message passing and frontend

This commit is contained in:
Jakob Ketterl 2020-01-09 15:12:51 +01:00
parent 0e528c9267
commit e0501cff0f
5 changed files with 46 additions and 8 deletions

View File

@ -355,6 +355,8 @@ class dsp(object):
# we best get the ax25 packets from the kiss socket # we best get the ax25 packets from the kiss socket
kiss = KissClient(self.direwolf_port) kiss = KissClient(self.direwolf_port)
self.output.send_output("packet_demod", kiss.read) self.output.send_output("packet_demod", kiss.read)
elif self.isPocsag():
self.output.send_output("pocsag_demod", self.secondary_process_demod.stdout.readline)
else: else:
self.output.send_output("secondary_demod", partial(self.secondary_process_demod.stdout.read, 1)) self.output.send_output("secondary_demod", partial(self.secondary_process_demod.stdout.read, 1))

View File

@ -939,13 +939,15 @@ img.openwebrx-mirror-img
} }
#openwebrx-panel-wsjt-message, #openwebrx-panel-wsjt-message,
#openwebrx-panel-packet-message #openwebrx-panel-packet-message,
#openwebrx-panel-pocsag-message
{ {
height: 180px; height: 180px;
} }
#openwebrx-panel-wsjt-message tbody, #openwebrx-panel-wsjt-message tbody,
#openwebrx-panel-packet-message tbody #openwebrx-panel-packet-message tbody,
#openwebrx-panel-pocsag-message tbody
{ {
display: block; display: block;
overflow: auto; overflow: auto;
@ -954,7 +956,8 @@ img.openwebrx-mirror-img
} }
#openwebrx-panel-wsjt-message thead tr, #openwebrx-panel-wsjt-message thead tr,
#openwebrx-panel-packet-message thead tr #openwebrx-panel-packet-message thead tr,
#openwebrx-panel-pocsag-message thead tr
{ {
display: block; display: block;
} }
@ -962,7 +965,9 @@ img.openwebrx-mirror-img
#openwebrx-panel-wsjt-message th, #openwebrx-panel-wsjt-message th,
#openwebrx-panel-wsjt-message td, #openwebrx-panel-wsjt-message td,
#openwebrx-panel-packet-message th, #openwebrx-panel-packet-message th,
#openwebrx-panel-packet-message td #openwebrx-panel-packet-message td,
#openwebrx-panel-pocsag-message th,
#openwebrx-panel-pocsag-message td
{ {
width: 50px; width: 50px;
text-align: left; text-align: left;
@ -995,6 +1000,14 @@ img.openwebrx-mirror-img
text-align: center; text-align: center;
} }
#openwebrx-panel-pocsag-message .address {
width: 100px;
}
#openwebrx-panel-pocsag-message .message {
width: 400px;
}
.aprs-symbol { .aprs-symbol {
display: inline-block; display: inline-block;
width: 15px; width: 15px;
@ -1076,6 +1089,7 @@ img.openwebrx-mirror-img
#openwebrx-panel-digimodes[data-mode="jt9"] #openwebrx-digimode-content-container, #openwebrx-panel-digimodes[data-mode="jt9"] #openwebrx-digimode-content-container,
#openwebrx-panel-digimodes[data-mode="ft4"] #openwebrx-digimode-content-container, #openwebrx-panel-digimodes[data-mode="ft4"] #openwebrx-digimode-content-container,
#openwebrx-panel-digimodes[data-mode="packet"] #openwebrx-digimode-content-container, #openwebrx-panel-digimodes[data-mode="packet"] #openwebrx-digimode-content-container,
#openwebrx-panel-digimodes[data-mode="pocsag"] #openwebrx-digimode-content-container,
#openwebrx-panel-digimodes[data-mode="ft8"] #openwebrx-digimode-select-channel, #openwebrx-panel-digimodes[data-mode="ft8"] #openwebrx-digimode-select-channel,
#openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-select-channel, #openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-select-channel,
#openwebrx-panel-digimodes[data-mode="jt65"] #openwebrx-digimode-select-channel, #openwebrx-panel-digimodes[data-mode="jt65"] #openwebrx-digimode-select-channel,
@ -1087,16 +1101,13 @@ img.openwebrx-mirror-img
display: none; display: none;
} }
#openwebrx-panel-digimodes[data-mode="pocsag"] #openwebrx-digimode-content-container {
height: 200px;
}
#openwebrx-panel-digimodes[data-mode="ft8"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="ft8"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="wspr"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="jt65"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="jt65"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="jt9"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="jt9"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="ft4"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="ft4"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="packet"] #openwebrx-digimode-canvas-container, #openwebrx-panel-digimodes[data-mode="packet"] #openwebrx-digimode-canvas-container,
#openwebrx-panel-digimodes[data-mode="pocsag"] #openwebrx-digimode-canvas-container
{ {
height: 200px; height: 200px;
margin: -10px; margin: -10px;

View File

@ -87,6 +87,13 @@
</tr></thead> </tr></thead>
<tbody></tbody> <tbody></tbody>
</table> </table>
<table class="openwebrx-panel" id="openwebrx-panel-pocsag-message" style="display: none; width: 619px;" data-panel-name="pocsag-message">
<thead><tr>
<th class="address">Address</th>
<th class="message">Message</th>
</tr></thead>
<tbody></tbody>
</table>
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-ysf" style="display: none;" data-panel-name="metadata-ysf"> <div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-ysf" style="display: none;" data-panel-name="metadata-ysf">
<div class="openwebrx-meta-frame"> <div class="openwebrx-meta-frame">
<div class="openwebrx-meta-slot"> <div class="openwebrx-meta-slot">

View File

@ -1146,6 +1146,9 @@ function on_ws_recv(evt) {
case 'log_message': case 'log_message':
divlog(json['value'], true); divlog(json['value'], true);
break; break;
case 'pocsag_data':
update_pocsag_panel(json['value']);
break
default: default:
console.warn('received message of unknown type: ' + json['type']); console.warn('received message of unknown type: ' + json['type']);
} }
@ -1389,6 +1392,17 @@ function update_packet_panel(msg) {
$b.scrollTop($b[0].scrollHeight); $b.scrollTop($b[0].scrollHeight);
} }
function update_pocsag_panel(msg) {
var $b = $('#openwebrx-panel-pocsag-message').find('tbody');
$b.append($(
'<tr>' +
'<td class="address">' + msg.address + '</td>' +
'<td class="message">' + msg.message + '</td>' +
'</tr>'
));
$b.scrollTop($b[0].scrollHeight);
}
function update_digitalvoice_panels(showing) { function update_digitalvoice_panels(showing) {
$(".openwebrx-meta-panel").each(function (_, p) { $(".openwebrx-meta-panel").each(function (_, p) {
toggle_panel(p.id, p.id === showing); toggle_panel(p.id, p.id === showing);
@ -2176,6 +2190,7 @@ function demodulator_digital_replace(subtype) {
toggle_panel("openwebrx-panel-digimodes", true); toggle_panel("openwebrx-panel-digimodes", true);
toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4'].indexOf(subtype) >= 0); toggle_panel("openwebrx-panel-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4'].indexOf(subtype) >= 0);
toggle_panel("openwebrx-panel-packet-message", subtype === "packet"); toggle_panel("openwebrx-panel-packet-message", subtype === "packet");
toggle_panel("openwebrx-panel-pocsag-message", subtype === "pocsag");
} }
function secondary_demod_create_canvas() { function secondary_demod_create_canvas() {

View File

@ -316,6 +316,9 @@ class OpenWebRxReceiverClient(Client):
def write_sdr_error(self, message): def write_sdr_error(self, message):
self.send({"type": "sdr_error", "value": message}) self.send({"type": "sdr_error", "value": message})
def write_pocsag_data(self, data):
self.send({"type": "pocsag_data", "value": data})
class MapConnection(Client): class MapConnection(Client):
def __init__(self, conn): def __init__(self, conn):