use the latest available thread
This commit is contained in:
parent
520ddbb034
commit
4f07c62cc9
@ -96,6 +96,9 @@ Js8Threader.prototype.findThread = function(freq) {
|
|||||||
// max frequency deviation: 5 Hz. this may be a little tight.
|
// max frequency deviation: 5 Hz. this may be a little tight.
|
||||||
return thread.isOpen() && Math.abs(thread.getAverageFrequency() - freq) <= 5;
|
return thread.isOpen() && Math.abs(thread.getAverageFrequency() - freq) <= 5;
|
||||||
});
|
});
|
||||||
|
matching.sort(function(a, b){
|
||||||
|
return b.getLatestTimestamp() - a.getLatestTimestamp();
|
||||||
|
});
|
||||||
return matching[0] || false;
|
return matching[0] || false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user