mirror of
https://github.com/ha7ilm/openwebrx.git
synced 2026-01-29 11:34:19 +01:00
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.
|
||||
return thread.isOpen() && Math.abs(thread.getAverageFrequency() - freq) <= 5;
|
||||
});
|
||||
matching.sort(function(a, b){
|
||||
return b.getLatestTimestamp() - a.getLatestTimestamp();
|
||||
});
|
||||
return matching[0] || false;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue