ft8 messages panel

This commit is contained in:
Jakob Ketterl 2019-07-06 21:04:18 +02:00
parent fa2d82ac13
commit d8a7dfbdbd
3 changed files with 54 additions and 1 deletions

View File

@ -159,7 +159,7 @@
<span style="font-size: 15pt; font-weight: bold;">Under construction</span>
<br />We're working on the code right now, so the application might fail.
</div>
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" data-panel-name="digimodes" data-panel-pos="left" data-panel-order="2" data-panel-size="619,210">
<div class="openwebrx-panel" id="openwebrx-panel-digimodes" data-panel-name="digimodes" data-panel-pos="left" data-panel-order="3" data-panel-size="619,210">
<div id="openwebrx-digimode-canvas-container">
<div id="openwebrx-digimode-select-channel"></div>
</div>
@ -170,6 +170,16 @@
</div>
</div>
</div>
<table class="openwebrx-panel" id="openwebrx-panel-wsjt-message" data-panel-name="wsjt-message" data-panel-pos="left" data-panel-order="2" data-panel-size="619,200">
<thead><tr>
<th>UTC</th>
<th>dB</th>
<th>DT</th>
<th>Freq</th>
<th class="message">Message</th>
</tr></thead>
<tbody></tbody>
</table>
<div class="openwebrx-panel openwebrx-meta-panel" id="openwebrx-panel-metadata-ysf" data-panel-name="metadata-ysf" data-panel-pos="left" data-panel-order="2" data-panel-size="145,220">
<div class="openwebrx-meta-frame">
<div class="openwebrx-meta-slot">

View File

@ -1018,3 +1018,30 @@ img.openwebrx-mirror-img
background-size: contain;
display: inline-block;
}
#openwebrx-panel-wsjt-message {
height: 180px;
}
#openwebrx-panel-wsjt-message tbody {
display: block;
overflow: auto;
height: 150px;
width: 100%;
}
#openwebrx-panel-wsjt-message thead tr {
display: block;
}
#openwebrx-panel-wsjt-message th,
#openwebrx-panel-wsjt-message td {
width: 50px;
text-align: left;
}
#openwebrx-panel-wsjt-message .message {
width: 400px;
}

View File

@ -1245,6 +1245,22 @@ function on_ws_recv(evt)
case "metadata":
update_metadata(json.value);
break;
case "wsjt_message":
var msg = json.value;
var $b = $('#openwebrx-panel-wsjt-message tbody');
var t = new Date(msg['timestamp'] * 1000);
var pad = function(i) { return ('' + i).padStart(2, "0"); }
$b.append($(
'<tr>' +
'<td>' + pad(t.getHours()) + pad(t.getMinutes()) + pad(t.getSeconds()) + '</td>' +
'<td>' + msg['db'] + '</td>' +
'<td>' + msg['dt'] + '</td>' +
'<td>' + msg['freq'] + '</td>' +
'<td class="message">' + msg['msg'] + '</td>' +
'</tr>'
));
$b.scrollTop($b[0].scrollHeight);
break;
default:
console.warn('received message of unknown type: ' + json.type);
}