Fixing problem with transmissions ending without beginning :-)
This commit is contained in:
parent
6113d838ad
commit
7f2953de4e
2 changed files with 13 additions and 3 deletions
|
@ -5,6 +5,7 @@ var ts2TXing = null;
|
||||||
var ts1timestamp = "";
|
var ts1timestamp = "";
|
||||||
var ts2timestamp = "";
|
var ts2timestamp = "";
|
||||||
var talkgroups = [];
|
var talkgroups = [];
|
||||||
|
var BreakException = {};
|
||||||
// Setting config-defaults if not set
|
// Setting config-defaults if not set
|
||||||
qrz = typeof(qrz) == 'undefined' ? 1 : qrz;
|
qrz = typeof(qrz) == 'undefined' ? 1 : qrz;
|
||||||
debug = typeof(debug) == 'undefined' ? 0 : debug;
|
debug = typeof(debug) == 'undefined' ? 0 : debug;
|
||||||
|
@ -221,7 +222,7 @@ function resolveTarget(mode, timeslot, target) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//if (retval.length > 0) {
|
|
||||||
if (retval != null && retval != "") {
|
if (retval != null && retval != "") {
|
||||||
logIt("Retval: " + retval);
|
logIt("Retval: " + retval);
|
||||||
if (retval[0][4] != "") {
|
if (retval[0][4] != "") {
|
||||||
|
@ -667,6 +668,11 @@ function getLastHeard(document, event) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (rowIndexes.length == 0) {
|
||||||
|
throw BreakException;
|
||||||
|
}
|
||||||
|
|
||||||
if (getMode(line) == "DMR Slot 1" ) {
|
if (getMode(line) == "DMR Slot 1" ) {
|
||||||
duration = Math.round(Date.parse(getRawTimestamp(line).replace(" ","T")+".000Z")/1000 - Date.parse(ts1timestamp.replace(" ","T")+".000Z")/1000);
|
duration = Math.round(Date.parse(getRawTimestamp(line).replace(" ","T")+".000Z")/1000 - Date.parse(ts1timestamp.replace(" ","T")+".000Z")/1000);
|
||||||
} else {
|
} else {
|
||||||
|
@ -754,13 +760,17 @@ function getLastHeard(document, event) {
|
||||||
addToQSO = "";
|
addToQSO = "";
|
||||||
}
|
}
|
||||||
t_lh.rows( function ( idx, data, node ) {
|
t_lh.rows( function ( idx, data, node ) {
|
||||||
//if(data[2] == callsign){
|
|
||||||
if(data[2].indexOf(callsign) > -1){
|
if(data[2].indexOf(callsign) > -1){
|
||||||
rowIndexes.push(idx);
|
rowIndexes.push(idx);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (rowIndexes.length == 0 && line.indexOf(" end of transmission") > 0) {
|
||||||
|
logIt("Sende-Ende ohne Anfang!");
|
||||||
|
throw BreakException;
|
||||||
|
}
|
||||||
|
|
||||||
logIt("RowIndexes: " + rowIndexes);
|
logIt("RowIndexes: " + rowIndexes);
|
||||||
if (rowIndexes[0] == "0") {
|
if (rowIndexes[0] == "0") {
|
||||||
t_lh.row(rowIndexes[0]).remove().draw(false);
|
t_lh.row(rowIndexes[0]).remove().draw(false);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
var dashboard_version = "2021-04-30 19:52:34";
|
var dashboard_version = "2021-05-01 10:51:24";
|
||||||
|
|
Loading…
Reference in a new issue