restore pocsag functionality
This commit is contained in:
@ -221,7 +221,7 @@ PacketMessagePanel.prototype.pushMessage = function(msg) {
|
||||
$.fn.packetMessagePanel = function() {
|
||||
if (!this.data('panel')) {
|
||||
this.data('panel', new PacketMessagePanel(this));
|
||||
};
|
||||
}
|
||||
return this.data('panel');
|
||||
};
|
||||
|
||||
@ -232,6 +232,10 @@ PocsagMessagePanel = function(el) {
|
||||
|
||||
PocsagMessagePanel.prototype = new MessagePanel();
|
||||
|
||||
PocsagMessagePanel.prototype.supportsMessage = function(message) {
|
||||
return message['mode'] === 'Pocsag';
|
||||
};
|
||||
|
||||
PocsagMessagePanel.prototype.render = function() {
|
||||
$(this.el).append($(
|
||||
'<table>' +
|
||||
|
@ -848,7 +848,8 @@ function on_ws_recv(evt) {
|
||||
var value = json['value'];
|
||||
var panels = [
|
||||
$("#openwebrx-panel-wsjt-message").wsjtMessagePanel(),
|
||||
$('#openwebrx-panel-packet-message').packetMessagePanel()
|
||||
$('#openwebrx-panel-packet-message').packetMessagePanel(),
|
||||
$('#openwebrx-panel-pocsag-message').pocsagMessagePanel()
|
||||
];
|
||||
if (!panels.some(function(panel) {
|
||||
if (!panel.supportsMessage(value)) return false;
|
||||
@ -861,9 +862,6 @@ function on_ws_recv(evt) {
|
||||
case 'log_message':
|
||||
divlog(json['value'], true);
|
||||
break;
|
||||
case 'pocsag_data':
|
||||
$('#openwebrx-panel-pocsag-message').pocsagMessagePanel().pushMessage(json['value']);
|
||||
break;
|
||||
case 'backoff':
|
||||
divlog("Server is currently busy: " + json['reason'], true);
|
||||
var $overlay = $('#openwebrx-error-overlay');
|
||||
|
Reference in New Issue
Block a user