1
0
Fork 0

Fixed Bug with Mutliline-Inputs

main
Kim - DG9VH 4 years ago
parent 967d47c2bb
commit 3d87c9124b

@ -160,62 +160,66 @@ function getLastHeard(document, event) {
// 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 // 01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
// M: 2020-11-01 21:33:27.454 YSF, received network data from DG2MAS to DG-ID 0 at DG2MAS // M: 2020-11-01 21:33:27.454 YSF, received network data from DG2MAS to DG-ID 0 at DG2MAS
// M: 2020-11-01 21:33:35.025 YSF, received network end of transmission from DG2MAS to DG-ID 0, 7.7 seconds, 0% packet loss, BER: 0.0% // M: 2020-11-01 21:33:35.025 YSF, received network end of transmission from DG2MAS to DG-ID 0, 7.7 seconds, 0% packet loss, BER: 0.0%
if (event.data.indexOf("Talker Alias") < 0 && event.data.indexOf("Downlink Activate") < 0 && event.data.indexOf("network watchdog") < 0 ) { $(document).ready(function() {
$(document).ready(function() { lines = event.data.split("\n");
var rowIndexes = [], for (i = 0; i < lines.length; i++) {
timestamp = getTimestamp(event.data), var line = lines[i];
mode = getMode(event.data), if (line.indexOf("Talker Alias") < 0 && line.indexOf("Downlink Activate") < 0 && line.indexOf("network watchdog") < 0 && line.indexOf("Preamble CSBK") < 0 && line.indexOf("Data Header") < 0 && line.length > 0) {
callsign = getCallsign(event.data), var rowIndexes = [],
target = getTarget(event.data), timestamp = getTimestamp(line),
source = getSource(event.data), mode = getMode(line),
duration = getDuration(event.data), callsign = getCallsign(line),
loss = getLoss(event.data), target = getTarget(line),
ber = getBER(event.data), source = getSource(line),
addToQSO = getAddToQSO(event.data); duration = getDuration(line),
if (mode == "POCSAG") { loss = getLoss(line),
callsign = "POCSAG"; ber = getBER(line),
target = ""; addToQSO = getAddToQSO(line);
source = ""; if (mode == "POCSAG") {
duration = ""; callsign = "POCSAG";
loss = ""; target = "";
ber = ""; source = "";
addToQSO = ""; duration = "";
} loss = "";
t_lh.rows( function ( idx, data, node ) { ber = "";
if(data[2] === callsign){ addToQSO = "";
rowIndexes.push(idx);
} }
return false; t_lh.rows( function ( idx, data, node ) {
}); if(data[2] === callsign){
rowIndexes.push(idx);
}
return false;
});
if (rowIndexes[0]) { if (rowIndexes[0]) {
newData = [ newData = [
timestamp, timestamp,
mode, mode,
callsign, callsign,
target, target,
source, source,
duration, duration,
loss, loss,
ber, ber,
addToQSO addToQSO
] ]
t_lh.row(rowIndexes[0]).data( newData ).draw(); t_lh.row(rowIndexes[0]).data( newData ).draw();
} else { } else {
t_lh.row.add( [ t_lh.row.add( [
timestamp, timestamp,
mode, mode,
callsign, callsign,
target, target,
source, source,
duration, duration,
loss, loss,
ber, ber,
addToQSO addToQSO
] ).draw(); ] ).draw();
}
} }
}); }
} });
} }
function getLocalHeard(document, event) { function getLocalHeard(document, event) {
@ -242,8 +246,6 @@ function getLocalHeard(document, event) {
function getDapnetMessages(document, event) { function getDapnetMessages(document, event) {
lines = event.data.split("\n"); lines = event.data.split("\n");
//alert(line.indexOf("Sending") > 0);
$(document).ready(function() { $(document).ready(function() {
for (i = 0; i < lines.length; i++) { for (i = 0; i < lines.length; i++) {
var line = lines[i]; var line = lines[i];
@ -257,5 +259,4 @@ function getDapnetMessages(document, event) {
} }
} }
}); });
} }

Loading…
Cancel
Save