route lookup: variable name

This commit is contained in:
Matthias Wirth
2025-10-22 12:28:03 +00:00
parent 23f7805492
commit 6da6d66175
2 changed files with 4 additions and 4 deletions

View File

@@ -3036,7 +3036,7 @@ function routeDoLookup(currentTime) {
})
.fail((jqxhr, status, error) => {
g.route_check_in_flight = false;
g.route_cache_timer = Date.now()/1000 + 15;
g.route_next_lookup = Date.now()/1000 + 15;
console.log('route API request error, delaying next request by 15 seconds.');
});
}

View File

@@ -10,7 +10,7 @@ g.planesOrdered = [];
g.route_cache = [];
g.route_check_todo = {};
g.route_check_in_flight = false;
g.route_cache_timer = new Date().getTime() / 1000 + 1; // one second from now
g.route_next_lookup = 0;
g.mapOrientation = mapOrientation;
@@ -5741,9 +5741,9 @@ function checkMovement() {
}
let currentTime = new Date().getTime()/1000;
if (currentTime > g.route_cache_timer && !g.route_check_in_flight) {
if (currentTime > g.route_next_lookup && !g.route_check_in_flight) {
// check if it's time to send a batch of request to the API server
g.route_cache_timer = currentTime + 1;
g.route_next_lookup = currentTime + 1;
routeDoLookup(currentTime);
}