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);
|
messages.push(message);
|
||||||
|
|
||||||
if (!(callsign in stations)) {
|
if (!(callsign in stations)) {
|
||||||
stations[callsign] = {
|
stations[callsign] = {};
|
||||||
lastHeard: date,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
window.clearTimeout(stations[callsign].timeout);
|
window.clearTimeout(stations[callsign].timeout);
|
||||||
}
|
}
|
||||||
|
stations[callsign].lastHeard = date;
|
||||||
stations[callsign].delta = date - stations[callsign].lastHeard;
|
stations[callsign].delta = date - stations[callsign].lastHeard;
|
||||||
stations[callsign].timeout = window.setTimeout(
|
stations[callsign].timeout = window.setTimeout(
|
||||||
alertNotHeard, timeoutLength, callsign);
|
alertNotHeard, timeoutLength, callsign);
|
||||||
|
Loading…
Reference in New Issue
Block a user