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

@ -1146,6 +1146,9 @@ function on_ws_recv(evt) {
case 'log_message':
divlog(json['value'], true);
break;
case 'pocsag_data':
update_pocsag_panel(json['value']);
break
default:
console.warn('received message of unknown type: ' + json['type']);
}
@ -1389,6 +1392,17 @@ function update_packet_panel(msg) {
$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) {
$(".openwebrx-meta-panel").each(function (_, p) {
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-wsjt-message", ['ft8', 'wspr', 'jt65', 'jt9', 'ft4'].indexOf(subtype) >= 0);
toggle_panel("openwebrx-panel-packet-message", subtype === "packet");
toggle_panel("openwebrx-panel-pocsag-message", subtype === "pocsag");
}
function secondary_demod_create_canvas() {