1
0
Fork 0

Getting rid of watchdog-problem...

main
Kim Huebel 4 years ago
parent 5e178bc004
commit de8ce2dd22

@ -374,12 +374,12 @@ function getLastHeard(document, event) {
var rowIndexes = []; var rowIndexes = [];
t_lh.rows( function ( idx, data, node ) { t_lh.rows( function ( idx, data, node ) {
if (getMode(line) == "DMR Slot 1" ) { if (getMode(line) == "DMR Slot 1" ) {
if(data[0] == ts1timestamp){ if(data[0] == getLocaltimeFromTimestamp(ts1timestamp)){
rowIndexes.push(idx); rowIndexes.push(idx);
} }
return false; return false;
} else { } else {
if(data[0] == ts2timestamp){ if(data[0] == getLocaltimeFromTimestamp(ts2timestamp)){
rowIndexes.push(idx); rowIndexes.push(idx);
} }
} }
@ -389,7 +389,12 @@ 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") {
rowIndexes[0] = rowIndexes[1];
}
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],
@ -402,7 +407,9 @@ function getLastHeard(document, event) {
"", "",
getAddToQSO(line) getAddToQSO(line)
] ]
$('#lastHeard').dataTable().fnUpdate(newData,t_lh.data().rowIndexes[0],undefined,false); logIt(t_lh.row(rowIndexes[0]).data[2])
//$('#lastHeard').dataTable().fnUpdate(newData,t_lh.data().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);
t_lh.row(rowIndexes[0]).remove().draw(false); t_lh.row(rowIndexes[0]).remove().draw(false);
@ -445,6 +452,9 @@ function getLastHeard(document, event) {
} }
return false; return false;
}); });
if (rowIndexes[0] == "0") {
rowIndexes[0] = rowIndexes[1];
}
if (rowIndexes[0]) { if (rowIndexes[0]) {
newData = [ newData = [
@ -473,6 +483,9 @@ function getLastHeard(document, event) {
] ).draw(false); ] ).draw(false);
} }
} }
if (rowIndexes[0] == "0") {
rowIndexes[0] = rowIndexes[1];
}
if (rowIndexes[0]) { if (rowIndexes[0]) {
var row = t_lh.row(rowIndexes[0]).node(); var row = t_lh.row(rowIndexes[0]).node();
if (txing) { if (txing) {

Loading…
Cancel
Save