1
0
Fork 0

second attempt to fix transmission lost (local RF)

main
Kim Huebel 4 years ago
parent 2744fe951b
commit bbfc1ed3da

@ -278,11 +278,15 @@ function getTarget(logline) {
} }
function getSource(logline) { function getSource(logline) {
val = logline.substring(logline.indexOf("received") + 9); if (logline.indexOf("received") > 0) {
val = val.substring(0, val.indexOf(" ")); val = logline.substring(logline.indexOf("received") + 9);
if (val == "network") val = val.substring(0, val.indexOf(" "));
val = "Net"; if (val == "network")
return val; val = "Net";
return val;
} else {
return "RF";
}
} }
function getDuration(logline) { function getDuration(logline) {
@ -400,7 +404,6 @@ function getMessage(logline) {
function getMessagesInQueue(line) { function getMessagesInQueue(line) {
messagecount = parseInt(line.substring(45)); messagecount = parseInt(line.substring(45));
logIt("messagecount: " + messagecount);
} }
function ord(str) { function ord(str) {
@ -599,10 +602,9 @@ function getLastHeard(document, event) {
lines = event.data.split("\n"); lines = event.data.split("\n");
var duration = 0; var duration = 0;
lines.forEach(function(line, index, array) { lines.forEach(function(line, index, array) {
logIt("LogLine: " + line);
if (!inDashboardBlacklist(line)) { if (!inDashboardBlacklist(line)) {
txing = false; 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 || line.indexOf("network watchdog") > 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 || line.indexOf("transmission lost") > 0)) {
if (line.indexOf("received network data") > 0 || line.indexOf("late entry") > 0 || line.indexOf("voice header") > 0 || line.indexOf("received RF header") > 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; txing = true;
if (getMode(line) == "DMR Slot 1" ) { if (getMode(line) == "DMR Slot 1" ) {
@ -613,7 +615,7 @@ function getLastHeard(document, event) {
ts2timestamp = getRawTimestamp(line); ts2timestamp = getRawTimestamp(line);
} }
} }
if (line.indexOf("network watchdog") > 0 || line.indexOf("end of voice transmission") > 0 || line.indexOf("end of transmission") > 0 || line.indexOf("voice transmission lost") > 0 ) { if (line.indexOf("network watchdog") > 0 || line.indexOf("end of voice transmission") > 0 || line.indexOf("end of transmission") > 0 || line.indexOf("transmission lost") > 0 ) {
if (getMode(line) == "DMR Slot 1" ) { if (getMode(line) == "DMR Slot 1" ) {
ts1TXing = null; ts1TXing = null;
} else { } else {
@ -642,12 +644,10 @@ function getLastHeard(document, event) {
} else { } else {
duration = Math.round(Date.parse(getRawTimestamp(line).replace(" ","T")+".000Z")/1000 - Date.parse(ts2timestamp.replace(" ","T")+".000Z")/1000); duration = Math.round(Date.parse(getRawTimestamp(line).replace(" ","T")+".000Z")/1000 - Date.parse(ts2timestamp.replace(" ","T")+".000Z")/1000);
} }
logIt("RowIndexes: " + rowIndexes);
if (rowIndexes[0]) { if (rowIndexes[0]) {
if (rowIndexes[0] == "0") { if (rowIndexes[0] == "0") {
t_lh.row(rowIndexes[0]).remove().draw(false); t_lh.row(rowIndexes[0]).remove().draw(false);
} }
logIt("RowIndex[0]: " + rowIndexes[0]);
if (t_lh.row(rowIndexes[0]).data[0] != null) { if (t_lh.row(rowIndexes[0]).data[0] != null) {
newData = [ newData = [
t_lh.row(rowIndexes[0]).data[0], t_lh.row(rowIndexes[0]).data[0],
@ -659,8 +659,7 @@ function getLastHeard(document, event) {
"", "",
"", "",
getAddToQSO(line) getAddToQSO(line)
] ];
logIt(t_lh.row(rowIndexes[0]).data[2])
$('#lastHeard').dataTable().fnUpdate(newData,rowIndexes[0],undefined,false); $('#lastHeard').dataTable().fnUpdate(newData,rowIndexes[0],undefined,false);
} else { } else {
logIt("Problem replacing watchdog! Indices: " + rowIndexes); logIt("Problem replacing watchdog! Indices: " + rowIndexes);
@ -709,6 +708,7 @@ function getLastHeard(document, event) {
} }
return false; return false;
}); });
if (rowIndexes[0] == "0") { if (rowIndexes[0] == "0") {
t_lh.row(rowIndexes[0]).remove().draw(false); t_lh.row(rowIndexes[0]).remove().draw(false);
} }
@ -743,8 +743,6 @@ function getLastHeard(document, event) {
if (rowIndexes[0]) { if (rowIndexes[0]) {
var row = t_lh.row(rowIndexes[0]).node(); var row = t_lh.row(rowIndexes[0]).node();
var temp = t_lh.row(rowIndexes[0]).data(); var temp = t_lh.row(rowIndexes[0]).data();
logIt("Temp: "+ temp);
logIt("Duration: " + duration);
temp[5] = duration; temp[5] = duration;
$('#lastHeard').dataTable().fnUpdate(temp,rowIndexes[0],undefined,false); $('#lastHeard').dataTable().fnUpdate(temp,rowIndexes[0],undefined,false);
} }

@ -1 +1 @@
var dashboard_version = "2021-04-25 11:15:42"; var dashboard_version = "2021-04-25 16:46:31";

@ -232,7 +232,7 @@ async def view_log(websocket, path):
content = conv.convert(content, full=False) content = conv.convert(content, full=False)
lines = content.split("\n") lines = content.split("\n")
for line in lines: for line in lines:
if line.find("received") > 0 or line.find("network watchdog") > 0: if line.find("received") > 0 or line.find("network watchdog") > 0 or line.find("transmission lost") > 0:
if line.find("from ") > 0 and line.find("to ") > 0: if line.find("from ") > 0 and line.find("to ") > 0:
source = line[line.index("from ") + 5:line.index("to ")].strip() source = line[line.index("from ") + 5:line.index("to ")].strip()
if source in dmrids: if source in dmrids:

Loading…
Cancel
Save