Fix resetting lastHeard on stations
This commit is contained in:
parent
aa9a676806
commit
1a85f4f0d6
@ -60,15 +60,13 @@ aprsStream.onmessage = function(event) {
|
||||
messages.push(message);
|
||||
|
||||
if (!(callsign in stations)) {
|
||||
stations[callsign] = {
|
||||
lastHeard: date,
|
||||
};
|
||||
stations[callsign] = {};
|
||||
}
|
||||
|
||||
else {
|
||||
window.clearTimeout(stations[callsign].timeout);
|
||||
}
|
||||
|
||||
stations[callsign].lastHeard = date;
|
||||
stations[callsign].delta = date - stations[callsign].lastHeard;
|
||||
stations[callsign].timeout = window.setTimeout(
|
||||
alertNotHeard, timeoutLength, callsign);
|
||||
|
Loading…
Reference in New Issue
Block a user