First attempt of getting rid of network watchdogs...
This commit is contained in:
parent
d2cb6034ff
commit
a54170ffdf
1 changed files with 99 additions and 56 deletions
|
@ -236,7 +236,7 @@ function getLastHeard(document, event) {
|
|||
lines.forEach(function(line, index, array) {
|
||||
logIt(line);
|
||||
txing = false;
|
||||
if (line.indexOf("Talker Alias") < 0 && line.indexOf("Downlink Activate") < 0 && line.indexOf("Preamble CSBK") < 0 && line.indexOf("data header") < 0 && line.indexOf("0000:") < 0 && line.length > 0 && line.indexOf("received") > 0 ) {
|
||||
if (line.indexOf("Talker Alias") < 0 && line.indexOf("Downlink Activate") < 0 && line.indexOf("Preamble CSBK") < 0 && line.indexOf("data header") < 0 && line.indexOf("0000:") < 0 && line.length > 0 && (line.indexOf("received") > 0 || line.indexOf("network watchdog") > 0)) {
|
||||
if (line.indexOf("received network data") > 0 || line.indexOf("late entry") > 0 || line.indexOf("voice header") > 0 || line.indexOf("received RF header") > 0) {
|
||||
txing = true;
|
||||
if (getMode(line) == "DMR Slot 1" ) {
|
||||
|
@ -253,11 +253,53 @@ function getLastHeard(document, event) {
|
|||
} else {
|
||||
ts2TXing = null;
|
||||
}
|
||||
if (line.indexOf("network watchdog") > 0) {
|
||||
logIt("Network Watchdog!");
|
||||
var rowIndexes = [];
|
||||
t_lh.rows( function ( idx, data, node ) {
|
||||
if (getMode(line) == "DMR Slot 1" ) {
|
||||
if(data[0] == ts1timestamp){
|
||||
rowIndexes.push(idx);
|
||||
}
|
||||
return false;
|
||||
} else {
|
||||
if(data[0] == ts2timestamp){
|
||||
rowIndexes.push(idx);
|
||||
}
|
||||
}
|
||||
});
|
||||
var duration = 0;
|
||||
if (getMode(line) == "DMR Slot 1" ) {
|
||||
duration = Math.round((Date.now() - Date.parse(ts1timestamp.replace(" ","T")+".000Z"))/1000);
|
||||
} else {
|
||||
duration = Math.round((Date.now() - Date.parse(ts2timestamp.replace(" ","T")+".000Z"))/1000);
|
||||
}
|
||||
if (rowIndexes[0]) {
|
||||
if (t_lh.row(rowIndexes[0]).data[0] != null) {
|
||||
newData = [
|
||||
t_lh.row(rowIndexes[0]).data[0],
|
||||
t_lh.row(rowIndexes[0]).data[1],
|
||||
t_lh.row(rowIndexes[0]).data[2],
|
||||
t_lh.row(rowIndexes[0]).data[3],
|
||||
t_lh.row(rowIndexes[0]).data[4],
|
||||
duration,
|
||||
"",
|
||||
"",
|
||||
getAddToQSO(line)
|
||||
]
|
||||
t_lh.row(rowIndexes[0]).data( newData ).draw(false);
|
||||
} else {
|
||||
logIt("Problem replacing watchdog! Indices: " + rowIndexes);
|
||||
t_lh.row(rowIndexes[0]).remove().draw( false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
logIt("TS1: " + ts1TXing + "|" + ts1timestamp);
|
||||
logIt("TS2: " + ts2TXing + "|" + ts2timestamp);
|
||||
getCurrentTXing();
|
||||
|
||||
if (line.indexOf("network watchdog") < 0) {
|
||||
var rowIndexes = [],
|
||||
timestamp = getTimestamp(line),
|
||||
mode = getMode(line),
|
||||
|
@ -316,6 +358,7 @@ function getLastHeard(document, event) {
|
|||
] ).draw();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue